Click here to Skip to main content
15,900,108 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi ppl
i have a school project that i have to do ....and i chose to remote a computer by another (server/client)
and i need some help in shutting down a pc (the server) by the client
i just need to know wut i have to do in the server program and i'll do the rest ...i mean i'll be happy if somebody can help me:)
thx
plz it's so important
Posted

1 solution

It can be done using P/Invoke and the user32.dll ExitWindowsEx[^] function.
There may be a way in WMI, you could also try using shutdown.exe[^]
Process.Start("shutdown","/s /t 0");
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900