There are some registry values in the windows that stops shutdown
check this out also. Windows is a flat system that harder to debug.
Btw that command wont work on vista i dont think
MSDN says if you have a windows version 2000 above , this will works.Read the MSDN. Anyway if you refering about that "shutdown" shell command then if it's not working in the windows shell then it will surely not working inside your program too.
That may be a registry error.
This may be a user priviledge problem ,
But there should be a reason , so we are going to debug it.
Oky what is the error code ? Then just open the Error Lookup tool
in VS and submit that value and check it.
There is a error but there should be a something reason. Hopefully
there can be slove exists for that problem. ( anyway not every problem have an answer).