Turn off Computer
BlitzPlus Forums/BlitzPlus Programming/Turn off Computer
| ||
Does anyone have code that turnes off your computer? If you do can you post it of post a link if it is already posted. Thanks |
| ||
ExecFile("Shutdown.exe -s -c "+Chr$(34)+"Because I said so"+Chr$(34)+" -d p -t 10") That starts up a program in dos that should shut down the computer. The chr$(34)'s represent quotation marks (which are kind of hard to add in in blitz without that command). |
| ||
Is there a way to terminate this action so the computer doesn't turn off? |
| ||
Yeah, use ExecFile("Shutdown.exe -a") to abort shutdown. Bear in mind however, that this command will only work on Windows XP. |
| ||
Thanks Seb, is there a list of different system commands like this? |
| ||
I need someone to post what the different commands in the code line that turns off your computer do. Like the "-s". I got rid of it and it screwed up my computer I had to restart it to get anything to work right. |
| ||
This code archive entry has them. http://www.blitzbasic.com/codearcs/codearcs.php?code=1195 |
| ||
Thank you all for your help |
| ||
I'm not sure writing a game that turns the players PC off is such a good idea!?!? (jk) |
| ||
If they cheat they will be punished. (Joking) I will not put that in a real game, I use it just for fun. |