Shutdown - Techist - Tech Forum

Go Back   Techist - Tech Forum > Computer Hardware > Monitors, Printers and Peripherals
Click Here to Login
Closed Thread
 
Thread Tools Display Modes
 
Old 10-29-2009, 07:03 AM   #1 (permalink)
Newb Techie
 
Join Date: Oct 2009
Posts: 1
Default 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.
__________________

harrislo is offline  
Old 10-29-2009, 08:29 AM   #2 (permalink)
Lady Techie
 
Yami's Avatar
 
Join Date: Dec 2008
Location: UK
Posts: 7,772
Default 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"
__________________

__________________
Desktop i5-4440 - ASRock Z77 Extreme4 - EVGA GTX970 - 4x4GB 1600MHz - Samsung 850 EVO 250GB - Be Silent Base 800 - 3TB+1TB+1TB+640GB
Laptop i7-3740QM @ 2.7GHz, 2x4GB 1600Mhz, GT640M, OCZ Agility 3 120GB
Smartphone Galaxy S7 Edge

LinkedIn Kiera Mitchell
Yami is offline  
Old 10-29-2009, 08:32 AM   #3 (permalink)
Monster Techie
 
HoLoCroN's Avatar
 
Join Date: Mar 2004
Location: Plant City, FL
Posts: 1,305
Default 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.
HoLoCroN is offline  
Old 10-29-2009, 08:34 AM   #4 (permalink)
Lady Techie
 
Yami's Avatar
 
Join Date: Dec 2008
Location: UK
Posts: 7,772
Default Re: Shutdown

Quote:
Originally Posted by HoLoCroN View Post
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.
__________________
Desktop i5-4440 - ASRock Z77 Extreme4 - EVGA GTX970 - 4x4GB 1600MHz - Samsung 850 EVO 250GB - Be Silent Base 800 - 3TB+1TB+1TB+640GB
Laptop i7-3740QM @ 2.7GHz, 2x4GB 1600Mhz, GT640M, OCZ Agility 3 120GB
Smartphone Galaxy S7 Edge

LinkedIn Kiera Mitchell
Yami is offline  
Old 10-29-2009, 09:20 AM   #5 (permalink)
Seg Fault'n
 
Join Date: Jul 2005
Location: The dried husk where America came from
Posts: 5,801
Default Re: Shutdown

Quote:
Originally Posted by Yamikotai View Post
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.
__________________


There are in order of increasing severity: lies, darn lies, statistics, and computer benchmarks. - diskinfo man page
"Get your money and let's go to court!" - Craig Mudie, MS
kmote is offline  
Old 10-29-2009, 09:53 AM   #6 (permalink)
Oldie but a goodie
 
oldskool's Avatar
 
Join Date: Jun 2008
Location: Maine, USA
Posts: 1,762
Default 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.
__________________
[SIGPIC][/SIGPIC]
oldskool is offline  
Old 10-29-2009, 10:02 AM   #7 (permalink)
Seg Fault'n
 
Join Date: Jul 2005
Location: The dried husk where America came from
Posts: 5,801
Default 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.
__________________


There are in order of increasing severity: lies, darn lies, statistics, and computer benchmarks. - diskinfo man page
"Get your money and let's go to court!" - Craig Mudie, MS
kmote is offline  
Old 10-29-2009, 10:07 AM   #8 (permalink)
Oldie but a goodie
 
oldskool's Avatar
 
Join Date: Jun 2008
Location: Maine, USA
Posts: 1,762
Default Re: Shutdown

Yeah, I'm pretty sure batches I have done was with Notepad, well anyway, I think the OP could try that route.
__________________
[SIGPIC][/SIGPIC]
oldskool is offline  
Old 10-29-2009, 02:07 PM   #9 (permalink)
Grandfather of Techist

\_(ツ)_/
 
Trotter's Avatar
 
Join Date: Jan 2005
Location: The South
Posts: 31,303
Default Re: Shutdown

Until the OP can provide a valid reason for wanting this...


__________________

__________________


My Rig: SABLE
Antec 300 Illusion / Antec EarthWatts EA650 650W / ASUS GeForce GTX 960 GTX960-DC2OC-2GD5
AMD FX 8320 x8 Black Edition / Gelid Tranquillo / MSI 970A-G43
Sandisk Ultra Plus 128GB / Samsung 840 120GB / WD Black 750GB / WD Green 1TB
2x4GB DDR3 1600 - 2x2GB DDR3 1600
Win10 Ent 64-bit - Mionix Naos 7000 Mouse - CM Storm QuickFire Rapid Mech Keyboard


R.I.P. Danny L. Trotter ... 14 Nov 1945 - 4 Sept 2009
Trotter is offline  
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Automatically Shutdown Computer After Firefox Downloads Finish Osiris Tips, Tricks & Tutorials 0 10-12-2009 08:08 AM
Xp Suddenly Goes Into Shutdown !! Brunoboy Microsoft Windows and Software 11 03-07-2008 04:40 AM
How To Remove Shutdown In Vista? mike4realz Microsoft Windows and Software 3 12-20-2007 08:15 AM
Shutdown problem when overclocking Zatio89 Overclocking and Modding 6 05-20-2007 09:50 PM
Vista wont complete shutdown Chrono Microsoft Windows and Software 2 05-13-2007 10:34 AM



Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -5. The time now is 04:22 AM.


Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.