I know the dos command is "shutdown" then with your parameters of "-s -t xxx" etc.
Anyways so "How to shutdown your computer using C++?"
Thanks, Regards X
[URL="http://msdn.microsoft.com/en-us/library/aa376868(VS.85).aspx"]ExitWindowsEx()[/URL] Read More
[QUOTE]So what looks to be the problem?[/QUOTE] There might be many reasons, e.g. any application you have open may also abort the shutdown (since you are not forcing it), maybe your system does not support the power-off feature or your program lacks the shutdown privilege etc. To get a bit … Read More
[QUOTE=Ancient Dragon;829314]I think the user will have to be logged in under an Administrative account for that to work. [/QUOTE] Thats the thing with vista. Even IF you are an administrator, that doesnt mean you run programs as administrator. Programs always run with the lease privileges required. All an admin … Read More