Shutdown

Status
Not open for further replies.

harrislo

Beta member
Messages
1
Is there anyway to command a word file to shutdown the computer? In other words, the computer will shutdown when the word file is run/executed.
 
Copied from another forum:
make a text file.

type the following line into it:

shutdown -f -s

save it as shutdown.bat and now you have a batch file that will immediately shut down the pc.

-s is "shutdown" and -f is "force applications to exit"
 
A word document does not provide you with the ability to execute commands other than launch the word processor .exe

It might be possible to embed some sort of macro that will call the shutdown.exe command but it is not probable.

These type of functions are considered security risks to most organization and is probably patched to prevent documents from executing code on a pc.

If you save the commands provided by Yamikotai into a text/word document and save it as a .bat, it is no longer a word document. It becomes a batch file that can be used to execute commands.
 
You could create it as a text file in Notepad, it uses ACII characters. I have created batch files before and if memory serves me, I used Notepad.
 
Scripts (batch or otherwise) are plain text files and so they can be written in plain text editors, Notepad is an example of a plain text editor. Word might be a plain text editor, I'm not sure, but the main format Word deals with is .doc, which is a binary format.
 
Yeah, I'm pretty sure batches I have done was with Notepad, well anyway, I think the OP could try that route.
 
Until the OP can provide a valid reason for wanting this...


closed2ur0.gif
 
Status
Not open for further replies.
Back
Top Bottom