A Windows XP help forum. PCbanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » PCbanter forum » Microsoft Windows XP » General XP issues or comments
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Win XP SP3 Shutdown/Power off



 
 
Thread Tools Display Modes
  #1  
Old October 7th 14, 09:05 PM posted to microsoft.public.windowsxp.general
AAH[_3_]
external usenet poster
 
Posts: 104
Default Win XP SP3 Shutdown/Power off


1) I need a batch file (.BAT) command line to Shutdown/Power off Win
XP SP3.

2) Batch file (.BAT) command line to turn off and restart the same.

Please help me ?
Thanks.


Ads
  #2  
Old October 7th 14, 09:26 PM posted to microsoft.public.windowsxp.general
Paul
external usenet poster
 
Posts: 18,275
Default Win XP SP3 Shutdown/Power off

AAH wrote:
1) I need a batch file (.BAT) command line to Shutdown/Power off Win
XP SP3.

2) Batch file (.BAT) command line to turn off and restart the same.

Please help me ?
Thanks.


Put something like this in a shortcut ?

"PsShutdown v2.52"
http://technet.microsoft.com/en-us/s...rnals/bb897541

Sysinternals is your first stop, when looking for things
that should have been in the OS in the first place.

*******

If you click your mouse on the desktop surface (i.e. make
sure the desktop has the focus), you can get the
computer shutdown menu to pop up. You use Alt-F4.
It sounds like you want more than that. I use the Alt-F4
for situations where the "menu" is busted. For example,
the other day on Windows 8, all the decorations died, Start
button didn't work, Charms bar was dead, but the mouse
still moved and I could still do work (with the applications
that were still running). By using Alt-F4, I was able to bring
up the shutdown menu, and do a controlled restart, to "fix it".
As you can imagine, I was muttering a few expletives, while
the system was rebooting.

Paul

  #3  
Old October 7th 14, 11:28 PM posted to microsoft.public.windowsxp.general
John Dulak[_2_]
external usenet poster
 
Posts: 61
Default Win XP SP3 Shutdown/Power off

On 10/7/2014 4:05 PM, AAH wrote:
1) I need a batch file (.BAT) command line to Shutdown/Power off Win
XP SP3.

2) Batch file (.BAT) command line to turn off and restart the same.

Please help me ?
Thanks.



AAH:

Try one of these.

Shutdown: %windir%\System32\shutdown.exe -s
Reboot: %windir%\System32\shutdown.exe -r
Logoff: %windir%\System32\shutdown.exe -l
Standby: %windir%\System32\rundll32.exe powrprof.dll,SetSuspendState
Hibernate: %windir%\System32\rundll32.exe powrprof.dll,SetSuspendState
Hibernate

I've put the "Standby:" command in a desktop shortcut.

HTH & GL

John

--
\\\||///
------------------o000----(o)(o)----000o----------------
----------------------------()--------------------------
'' Madness takes its toll - Please have exact change. ''

  #4  
Old October 8th 14, 12:30 PM posted to microsoft.public.windowsxp.general
Norm Cook
external usenet poster
 
Posts: 17
Default Win XP SP3 Shutdown/Power off

"AAH" wrote in message
...

1) I need a batch file (.BAT) command line to Shutdown/Power off Win
XP SP3.

2) Batch file (.BAT) command line to turn off and restart the same.

Please help me ?
Thanks.


I just use the power off button.
Anything wrong with that?


  #5  
Old October 8th 14, 03:36 PM posted to microsoft.public.windowsxp.general
Ken Blake, MVP[_4_]
external usenet poster
 
Posts: 1,699
Default Win XP SP3 Shutdown/Power off

On Wed, 8 Oct 2014 06:30:06 -0500, "Norm Cook"
wrote:

"AAH" wrote in message
...

1) I need a batch file (.BAT) command line to Shutdown/Power off Win
XP SP3.

2) Batch file (.BAT) command line to turn off and restart the same.

Please help me ?
Thanks.


I just use the power off button.
Anything wrong with that?



Yes! You should never do that. You can cause all sorts of problems
that way. You should never power off unless you have first shut down
Windows.
  #6  
Old October 8th 14, 05:03 PM posted to microsoft.public.windowsxp.general
Paul
external usenet poster
 
Posts: 18,275
Default Win XP SP3 Shutdown/Power off

Ken Blake, MVP wrote:
On Wed, 8 Oct 2014 06:30:06 -0500, "Norm Cook"
wrote:

"AAH" wrote in message
...
1) I need a batch file (.BAT) command line to Shutdown/Power off Win
XP SP3.

2) Batch file (.BAT) command line to turn off and restart the same.

Please help me ?
Thanks.

I just use the power off button.
Anything wrong with that?



Yes! You should never do that. You can cause all sorts of problems
that way. You should never power off unless you have first shut down
Windows.


There's a difference between the button on the front of the
computer, and the switch on the back.

The button on the front can be "bound" by the OS, to the proper
sequence. It can be set so pressing the front power button,
initiates a proper shutdown sequence. The button is not
directly tied to the power supply, so either the OS
or the BIOS can intercept the call and perform a
software-mediated response.

The front button is also "filtered", to protect against
accidental activation. The switch has two filter states.
At BIOS level, it can be set for immediate power off.
But while an OS is running, the filter is set to four
seconds. So to get the orderly shutdown sequence while
Windows is running, you might have to press and hold for
four seconds.

The rear switch is mechanical power off, and the OS doesn't
get a say in what happens then. That would result in a
"dirty" shutdown, if the OS happened to be running at
the time you decided to switch off at the back. If you
switch off while sitting in the BIOS screen, there should
be no harm from that. I sometimes temporarily "park" my systems
in the BIOS screen (or even the BUOS popup boot menu),
just for the option of switching off at the back.

Paul
  #7  
Old October 8th 14, 07:18 PM posted to microsoft.public.windowsxp.general
OldGuy
external usenet poster
 
Posts: 209
Default Win XP SP3 Shutdown/Power off

Because I do software development, I occasionally cause a lockup of
windows. The only option is to do the dirty power off using the switch
on the back of the PC. SO maybe I am lazy and should look for another
way but a cold boot does clean up after me.
BUT, I have never had any kind of problem after powering back up. Only
once in a while has the OS asked to do a disk check and then it usually
finds all is OK.
So a dirty shutdown is the last resort but I have never had any real
problems after that.


  #8  
Old October 8th 14, 08:21 PM posted to microsoft.public.windowsxp.general
Paul
external usenet poster
 
Posts: 18,275
Default Win XP SP3 Shutdown/Power off

OldGuy wrote:
Because I do software development, I occasionally cause a lockup of
windows. The only option is to do the dirty power off using the switch
on the back of the PC. SO maybe I am lazy and should look for another
way but a cold boot does clean up after me.
BUT, I have never had any kind of problem after powering back up. Only
once in a while has the OS asked to do a disk check and then it usually
finds all is OK.
So a dirty shutdown is the last resort but I have never had any real
problems after that.



This hints, that as a program developer, you're working on drivers.
Applications (running in Ring 3), aren't supposed to "take down" an
OS. But an Application could "bork" the desktop GUI, which is
a more likely scenario. You could try "pinging" the frozen computer
from a second computer, to see if it is really dead. It could be just
the GUI that is dead. If you push the shift lock key on the keyboard,
sometimes that gives a slight hint the thing is actually still alive.
Frozen machines can be frozen in more than one way, and to better
understand it, it helps to run a few different tests to tell what is
going on.

Some Windows development tool (windbg?) allows remote debugging.
I think you can connect a serial cable between computers, and
check out what the system is doing from a second computer. Again,
with the objective of determining whether "it's alive" or not.
The idea would be, if the GUI is dead, but the kernel and
the remote interface are still running, you can verify it's not
completely dead.

Drivers are in Ring0, with the kernel, while programs are in
Ring3. The GUI subsystem seems to be the most fragile part,
so a program in Ring3, could upset the GUI portion, but the
kernel should still be chugging away down there. Device drivers
on the other hand, can completely trash a computer, and there's
nothing worse than untrained driver writers. At work, our
driver writers were sent on a three month course of some sort,
to learn how to do it right. You take a course, specifically
designed for the OS you're working on. In that case, it was
SunOS they were trained on. We were making some VMEbus cards
for a prototype demo system, at the time.

http://en.wikipedia.org/wiki/Protection_ring

*******

Take a look under C:\Lost&Found (sp?) for signs of
the side-effects of damage. I run WinXP on FAT32, and
I used to occasionally get file fragments dumped in
there. But it hasn't happened now in a couple years.
I don't know what changed, to stop that from happening.
My computer is on a UPS, and for the most part, I don't
mistreat the machine by powering off at the back while
it is running. The last really ugly situation I had,
was running my copy of Windows 8 (multiboot machine).
Windows 8 got stuck bad enough, I had to stick a fork in it.
Task Manager was running, but absolutely refusing to
give me any degree of control. So I had to use the button.
Windows 8 happened to be low on Pool memory at the time,
and (apparently) doesn't handle that case very well at all.
This makes Windows 8 "not their best OS ever". And I'm pretty
sure this will not be fixed in time for Windows 10 "their
best OS ever" :-)

Paul
  #9  
Old October 9th 14, 12:22 AM posted to microsoft.public.windowsxp.general
Paul in Houston TX
external usenet poster
 
Posts: 744
Default Win XP SP3 Shutdown/Power off

Norm Cook wrote:
"AAH" wrote in message
...
1) I need a batch file (.BAT) command line to Shutdown/Power off Win
XP SP3.

2) Batch file (.BAT) command line to turn off and restart the same.

Please help me ?
Thanks.


I just use the power off button.
Anything wrong with that?


Yea, it leaves garbage all over the computer that won't get deleted.

  #10  
Old October 9th 14, 04:23 AM posted to microsoft.public.windowsxp.general
Bill in Co
external usenet poster
 
Posts: 1,927
Default Win XP SP3 Shutdown/Power off

Paul in Houston TX wrote:
Norm Cook wrote:
"AAH" wrote in message
...
1) I need a batch file (.BAT) command line to Shutdown/Power off
Win XP SP3.

2) Batch file (.BAT) command line to turn off and restart the
same.

Please help me ?
Thanks.


I just use the power off button.
Anything wrong with that?


Yea, it leaves garbage all over the computer that won't get deleted.


So does the power button perform a safe software shutdown (when you're in
Windows XP) as mentioned by the other Paul, or not? (haven't tried it and
am a bit leery of doing so :-)


  #11  
Old October 9th 14, 04:39 AM posted to microsoft.public.windowsxp.general
Paul in Houston TX
external usenet poster
 
Posts: 744
Default Win XP SP3 Shutdown/Power off

Bill in Co wrote:
Paul in Houston TX wrote:
Norm Cook wrote:
"AAH" wrote in message
...
1) I need a batch file (.BAT) command line to Shutdown/Power off
Win XP SP3.

2) Batch file (.BAT) command line to turn off and restart the
same.

Please help me ?
Thanks.
I just use the power off button.
Anything wrong with that?

Yea, it leaves garbage all over the computer that won't get deleted.


So does the power button perform a safe software shutdown (when you're in
Windows XP) as mentioned by the other Paul, or not? (haven't tried it and
am a bit leery of doing so :-)


I always shut this machine off using a desktop icon:
%windir%\system32\SHUTDOWN.exe -s -t 00
I have a friend that shuts down her XP machine by turning
off the power strip button. It leaves junk here and there but
otherwise seems to be ok. If it works for you I would not
worry about it.
I have to shut down the w7 machines every now and then by holding
down the power button for several seconds.
They go through a longer than usual startup but otherwise seem
to be ok. Most times I use a shutdown icon for shutdown, hibernate,
reboot, etc.
  #12  
Old October 9th 14, 05:14 AM posted to microsoft.public.windowsxp.general
Paul
external usenet poster
 
Posts: 18,275
Default Win XP SP3 Shutdown/Power off

Bill in Co wrote:
Paul in Houston TX wrote:
Norm Cook wrote:
"AAH" wrote in message
...
1) I need a batch file (.BAT) command line to Shutdown/Power off
Win XP SP3.

2) Batch file (.BAT) command line to turn off and restart the
same.

Please help me ?
Thanks.
I just use the power off button.
Anything wrong with that?

Yea, it leaves garbage all over the computer that won't get deleted.


So does the power button perform a safe software shutdown (when you're in
Windows XP) as mentioned by the other Paul, or not? (haven't tried it and
am a bit leery of doing so :-)



You can see the options here, in the
Power Options control panel.

http://i58.tinypic.com/rqz0aa.gif

And what it does, is described in the last paragraph here.

http://www.aumha.org/win5/a/shutcut.php

"This sets your computer so that when you press the
hardware power button it will first do a proper shutdown
of Windows, and then poweroff the computer."

HTH,
Paul
  #13  
Old October 11th 14, 12:13 PM posted to microsoft.public.windowsxp.general
Norm Cook
external usenet poster
 
Posts: 17
Default Win XP SP3 Shutdown/Power off

Should have mentioned that when I press the power button,
I get a message saying that Windows is shutting down.



"Norm Cook" wrote in message
...
"AAH" wrote in message
...

1) I need a batch file (.BAT) command line to Shutdown/Power off
Win XP SP3.

2) Batch file (.BAT) command line to turn off and restart the same.

Please help me ?
Thanks.


I just use the power off button.
Anything wrong with that?



  #14  
Old October 11th 14, 02:53 PM posted to microsoft.public.windowsxp.general
R.Wieser
external usenet poster
 
Posts: 1,302
Default Win XP SP3 Shutdown/Power off

Paul, Norm,

Yea, it leaves garbage all over the computer that won't get deleted.


That could only happens when you keep that button pressed for over ... 5
seconds IIRC and the power is just shut off (as if you would have yanked the
powercord).

This is not good, and could cause all kinds of troubles, including (program)
files getting damaged, causing information loss.

In cases where you press the powerbutton just momentarily (aka: less than
the above-mentioned 5 seconds) the OS will initiate a shutdow, just as if
you would get when using the Windows-F4 - "turn off" / "start" - "turn of
the computer" / using the described SHUTDOWN program.

If than any cr*p remains on your system you have some badly functioning
programs on your computer (which probably forgot to respond to the "shutting
down, close yourself" signal send to all open programs).

I use the above power-button press to shut down the computer regulary for
years, and have not seen any behaviour outof the ordinary.

Regards,
Rudy Wieser


-- Origional message:
Paul in Houston TX schreef in berichtnieuws
...
Norm Cook wrote:
"AAH" wrote in message
...
1) I need a batch file (.BAT) command line to Shutdown/Power off

Win
XP SP3.

2) Batch file (.BAT) command line to turn off and restart the

same.

Please help me ?
Thanks.


I just use the power off button.
Anything wrong with that?


Yea, it leaves garbage all over the computer that won't get deleted.



  #15  
Old October 11th 14, 07:31 PM posted to microsoft.public.windowsxp.general
Paul in Houston TX
external usenet poster
 
Posts: 744
Default Win XP SP3 Shutdown/Power off

R.Wieser wrote:
Paul, Norm,

Yea, it leaves garbage all over the computer that won't get deleted.


That could only happens when you keep that button pressed for over ... 5
seconds IIRC and the power is just shut off (as if you would have yanked the
powercord).

This is not good, and could cause all kinds of troubles, including (program)
files getting damaged, causing information loss.

In cases where you press the powerbutton just momentarily (aka: less than
the above-mentioned 5 seconds) the OS will initiate a shutdow, just as if
you would get when using the Windows-F4 - "turn off" / "start" - "turn of
the computer" / using the described SHUTDOWN program.

If than any cr*p remains on your system you have some badly functioning
programs on your computer (which probably forgot to respond to the "shutting
down, close yourself" signal send to all open programs).

I use the above power-button press to shut down the computer regulary for
years, and have not seen any behaviour outof the ordinary.

Regards,
Rudy Wieser


-- Origional message:
Paul in Houston TX schreef in berichtnieuws
...
Norm Cook wrote:
"AAH" wrote in message
...
1) I need a batch file (.BAT) command line to Shutdown/Power off

Win
XP SP3.

2) Batch file (.BAT) command line to turn off and restart the

same.
Please help me ?
Thanks.
I just use the power off button.
Anything wrong with that?

Yea, it leaves garbage all over the computer that won't get deleted.



Agreed. I was picturing the OP holding the shut off button
until the machine shuts off.
 




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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off






All times are GMT +1. The time now is 09:05 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 PCbanter.
The comments are property of their posters.