|  |
10-29-2009, 07:03 AM
|
#1 (permalink)
|
Newb Techie Join Date: Oct 2009 Posts: 1
| Shutdown 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.
Last edited by harrislo; 10-29-2009 at 07:31 AM.
|
| |
10-29-2009, 08:29 AM
|
#2 (permalink)
|
Theg Ame Join Date: Dec 2008 Location: Oxfordshire, UK, waving our red white and blue. Posts: 1,956
| Re: Shutdown Copied from another forum: Quote:
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"
| |
| |
10-29-2009, 08:32 AM
|
#3 (permalink)
|
Monster Techie Join Date: Mar 2004 Location: Plant City, FL Posts: 1,304
| Re: Shutdown 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.
Last edited by HoLoCroN; 10-29-2009 at 08:38 AM.
|
| |
10-29-2009, 08:34 AM
|
#4 (permalink)
|
Theg Ame Join Date: Dec 2008 Location: Oxfordshire, UK, waving our red white and blue. Posts: 1,956
| Re: Shutdown Quote:
Originally Posted by HoLoCroN A word document does not provide you with the ability to execute commands other than launch the word processor .exe | Unless you save the word document as a .bat file. |
| |
10-29-2009, 09:20 AM
|
#5 (permalink)
|
Join Date: Jul 2005 Location: England Posts: 2,167
| Re: Shutdown Quote:
Originally Posted by Yamikotai Unless you save the word document as a .bat file. | .doc files are not plain text, they are binary so just changing the extension will not work.
__________________ MSI P43 Neo|Enermax Pro82+ 425W|E5200|silent 8500GT|250GB Samsung spinpoint F1|Samsung SATA DVD RW|4GB Corsair|Antec SOLO|openSUSE11 
There are in order of increasing severity: lies, darn lies, statistics, and computer benchmarks. - diskinfo man page |
| |
10-29-2009, 09:53 AM
|
#6 (permalink)
|
Electrical Systems Design Join Date: Jun 2008 Location: Maine, USA Posts: 1,646
| Re: Shutdown 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.
__________________ - Operating system(s) : Windows 7 Home Premium x64 | Ubuntu 9.10
- CPU : Pentium Dual-Core E5200 @ 2.50GHz /Socket 775 LGA
- Memory: 2X 2GB DDR2 SDRAM
- Hard drive: 640 GB Western Digital Caviar Blue 7200rpm WD6400AAKS-75
- Motherboard : Dell 0U880P
- Video: nVidia GeGorce 8400GS
- Chipset : Intel G41
<<<<< If you found anything I said helpful, please click the  or under my avatar |
| |
10-29-2009, 10:02 AM
|
#7 (permalink)
|
Join Date: Jul 2005 Location: England Posts: 2,167
| Re: Shutdown 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.
__________________ MSI P43 Neo|Enermax Pro82+ 425W|E5200|silent 8500GT|250GB Samsung spinpoint F1|Samsung SATA DVD RW|4GB Corsair|Antec SOLO|openSUSE11 
There are in order of increasing severity: lies, darn lies, statistics, and computer benchmarks. - diskinfo man page |
| |
10-29-2009, 10:07 AM
|
#8 (permalink)
|
Electrical Systems Design Join Date: Jun 2008 Location: Maine, USA Posts: 1,646
| Re: Shutdown Yeah, I'm pretty sure batches I have done was with Notepad, well anyway, I think the OP could try that route.
__________________ - Operating system(s) : Windows 7 Home Premium x64 | Ubuntu 9.10
- CPU : Pentium Dual-Core E5200 @ 2.50GHz /Socket 775 LGA
- Memory: 2X 2GB DDR2 SDRAM
- Hard drive: 640 GB Western Digital Caviar Blue 7200rpm WD6400AAKS-75
- Motherboard : Dell 0U880P
- Video: nVidia GeGorce 8400GS
- Chipset : Intel G41
<<<<< If you found anything I said helpful, please click the  or under my avatar |
| |
10-29-2009, 02:07 PM
|
#9 (permalink)
|
Join Date: Jan 2005 Location: The South Posts: 19,929
| Re: Shutdown Until the OP can provide a valid reason for wanting this... |
| |  | | Thread Tools | | | | Display Modes | Linear Mode |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | | |