The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

PaulLinton (17) [Avatar] Offline
I'm attempting to use Listing 7.9 but just on my local machine. When I use Win32Shutdown(5) I get
Exception calling "Win32Shutdown" : "Privilege not held. "
There are many hits for this on Google but they are all quite old. The problem seems to have been known about in 2005. Does anyone know more recent information on how to shutdown the computer that a script is running on? Does the script in Listing 7.9 only work for remote computers?
Win 7, .Net 4
PaulLinton (17) [Avatar] Offline
Re: Win32Shutdown - "Privilege not held"
Red Face - Wrong book, sorry