To shut down a Windows PC you have to call ExitWindowsEx function from user32.dll. You can use Exit Windows VI from the Windows API Function Library, if desired, to do this.
If you have Windows 2000/NT you need to have SE_SHUTDOWN_NAME privilege for your ADE.
From the following link you can download an example that set this privilege in case that you have Windows 2000/NT prior to executing ExitWindowsEx function:
http://venus.ni.com/stage/we/niepd_web_display.DISPLAY_EPD4?p_guid=B45EACE3EE2756A4E034080020E74861&p_node=DZ53008&p_submitted=N&p_rank=&p_answer=&p_source=Internal
Hope this helps.
César Verdejo
Training and Certification | National Instruments