Shutdown chaos

G

Guest

Guest
Archived from groups: microsoft.public.windowsxp.help_and_support (More info?)

A simple problem; I want to automate the shutdown of the pc
at a specified time. But, to be sure that the process is
error free, I start in the Windows Command Processor before
scheduling the task.
I type:-
shutdown -i -l -s -t 30. Perfect.
This is copied into a batch file and run. Chaos. CPU
useage rises to 100% and the Command Processor scrolls my
commands at an almost unreadable rate.

Try 'shutdown/?', then add the computer name, as specified in
System Properties. i.e. shutdown -i -l -s \\computername
- t 30.
Doing this at the Command line produces the Remote Shutdown
Dialog which requires me to provide the name of a computer
(already given) AND a reason for shutdown. Obligingly, I
provide a specious reason and shutdown dutifully occurs.

Transferring this to the batch file - sans reason - repeat
of the former chaos.

Perhaps the location is at fault. The batch file is moved
from Desktop to Windows. No improvement.

Back to the Remote Shutdown Dialog: I try to browse for
the computer name and receive the message "The Directory
Service is currently unavailable"

Search 'Services' in Control Panel but can find no
'Directory Services'; but I change a couple of disabled
sevices to automatic on the offchance that they might be
responsible. Again, no joy.

Tried navigating to "shutdown.exe" in system32, creating a
shortcut, then amending the target line with the above
options, but this, when double clicked, merely brought me
back to the Remote Shutdown Dialog.

Am now totally at a loss. Since'Bill's bloatware' cannot be
at fault, I must bear the burden of resposibility. Can anyone
tell me, please, where I go from here to perform this simple
task? The administrator password could, conceivably, have a
bearing on this but, since I am already logged on, I don't see
how.

Tony.
 
G

Guest

Guest
Archived from groups: microsoft.public.windowsxp.help_and_support (More info?)

SHORTCUTS TO SHUTDOWN &
RESTART WINDOWS 2000 & XP
http://aumha.org/win5/a/shutcut.php

--
Carey Frisch
Microsoft MVP
Windows XP - Shell/User
Microsoft Newsgroups

Get Windows XP Service Pack 2 with Advanced Security Technologies:
http://www.microsoft.com/athome/security/protect/windowsxp/choose.mspx

-------------------------------------------------------------------------------------------

"Tony" wrote:

| A simple problem; I want to automate the shutdown of the pc
| at a specified time. But, to be sure that the process is
| error free, I start in the Windows Command Processor before
| scheduling the task.
| I type:-
| shutdown -i -l -s -t 30. Perfect.
| This is copied into a batch file and run. Chaos. CPU
| useage rises to 100% and the Command Processor scrolls my
| commands at an almost unreadable rate.
|
| Try 'shutdown/?', then add the computer name, as specified in
| System Properties. i.e. shutdown -i -l -s \\computername
| - t 30.
| Doing this at the Command line produces the Remote Shutdown
| Dialog which requires me to provide the name of a computer
| (already given) AND a reason for shutdown. Obligingly, I
| provide a specious reason and shutdown dutifully occurs.
|
| Transferring this to the batch file - sans reason - repeat
| of the former chaos.
|
| Perhaps the location is at fault. The batch file is moved
| from Desktop to Windows. No improvement.
|
| Back to the Remote Shutdown Dialog: I try to browse for
| the computer name and receive the message "The Directory
| Service is currently unavailable"
|
| Search 'Services' in Control Panel but can find no
| 'Directory Services'; but I change a couple of disabled
| sevices to automatic on the offchance that they might be
| responsible. Again, no joy.
|
| Tried navigating to "shutdown.exe" in system32, creating a
| shortcut, then amending the target line with the above
| options, but this, when double clicked, merely brought me
| back to the Remote Shutdown Dialog.
|
| Am now totally at a loss. Since'Bill's bloatware' cannot be
| at fault, I must bear the burden of resposibility. Can anyone
| tell me, please, where I go from here to perform this simple
| task? The administrator password could, conceivably, have a
| bearing on this but, since I am already logged on, I don't see
| how.
|
| Tony.
 
G

Guest

Guest
Archived from groups: microsoft.public.windowsxp.help_and_support (More info?)

You might want to try entering shutdown.exe instead of just
shutdown. Enter this in you batch file:

shutdown.exe -i -l -s -t 30

Also, I believe that you need to put the -m switch in front of
\\computername.

shutdown.exe -i -l -s -m \\computername

I also suspect that the message you're receiving about "Directory
Service" might be referring to the Active Directory service used
in a domain. It has nothing to do with the services running on
the local computer.

--
Nepatsfan
<tonyboten@yahoo.co.uk> wrote in message
news:1116705851.079076.113880@g49g2000cwa.googlegroups.com...
>A simple problem; I want to automate the shutdown of the pc
> at a specified time. But, to be sure that the process is
> error free, I start in the Windows Command Processor before
> scheduling the task.
> I type:-
> shutdown -i -l -s -t 30. Perfect.
> This is copied into a batch file and run. Chaos. CPU
> useage rises to 100% and the Command Processor scrolls my
> commands at an almost unreadable rate.
>
> Try 'shutdown/?', then add the computer name, as specified in
> System Properties. i.e. shutdown -i -l -s \\computername
> - t 30.
> Doing this at the Command line produces the Remote Shutdown
> Dialog which requires me to provide the name of a computer
> (already given) AND a reason for shutdown. Obligingly, I
> provide a specious reason and shutdown dutifully occurs.
>
> Transferring this to the batch file - sans reason - repeat
> of the former chaos.
>
> Perhaps the location is at fault. The batch file is moved
> from Desktop to Windows. No improvement.
>
> Back to the Remote Shutdown Dialog: I try to browse for
> the computer name and receive the message "The Directory
> Service is currently unavailable"
>
> Search 'Services' in Control Panel but can find no
> 'Directory Services'; but I change a couple of disabled
> sevices to automatic on the offchance that they might be
> responsible. Again, no joy.
>
> Tried navigating to "shutdown.exe" in system32, creating a
> shortcut, then amending the target line with the above
> options, but this, when double clicked, merely brought me
> back to the Remote Shutdown Dialog.
>
> Am now totally at a loss. Since'Bill's bloatware' cannot be
> at fault, I must bear the burden of resposibility. Can anyone
> tell me, please, where I go from here to perform this simple
> task? The administrator password could, conceivably, have a
> bearing on this but, since I am already logged on, I don't see
> how.
>
> Tony.
>
 
G

Guest

Guest
Archived from groups: microsoft.public.windowsxp.help_and_support (More info?)

It just occured to me that naming your batch file shutdown.bat
would also cause the problem you're having. Try renaming it
something else.

--
Nepatsfan
<tonyboten@yahoo.co.uk> wrote in message
news:1116705851.079076.113880@g49g2000cwa.googlegroups.com...
>A simple problem; I want to automate the shutdown of the pc
> at a specified time. But, to be sure that the process is
> error free, I start in the Windows Command Processor before
> scheduling the task.
> I type:-
> shutdown -i -l -s -t 30. Perfect.
> This is copied into a batch file and run. Chaos. CPU
> useage rises to 100% and the Command Processor scrolls my
> commands at an almost unreadable rate.
>
> Try 'shutdown/?', then add the computer name, as specified in
> System Properties. i.e. shutdown -i -l -s \\computername
> - t 30.
> Doing this at the Command line produces the Remote Shutdown
> Dialog which requires me to provide the name of a computer
> (already given) AND a reason for shutdown. Obligingly, I
> provide a specious reason and shutdown dutifully occurs.
>
> Transferring this to the batch file - sans reason - repeat
> of the former chaos.
>
> Perhaps the location is at fault. The batch file is moved
> from Desktop to Windows. No improvement.
>
> Back to the Remote Shutdown Dialog: I try to browse for
> the computer name and receive the message "The Directory
> Service is currently unavailable"
>
> Search 'Services' in Control Panel but can find no
> 'Directory Services'; but I change a couple of disabled
> sevices to automatic on the offchance that they might be
> responsible. Again, no joy.
>
> Tried navigating to "shutdown.exe" in system32, creating a
> shortcut, then amending the target line with the above
> options, but this, when double clicked, merely brought me
> back to the Remote Shutdown Dialog.
>
> Am now totally at a loss. Since'Bill's bloatware' cannot be
> at fault, I must bear the burden of resposibility. Can anyone
> tell me, please, where I go from here to perform this simple
> task? The administrator password could, conceivably, have a
> bearing on this but, since I am already logged on, I don't see
> how.
>
> Tony.
>
 
G

Guest

Guest
Archived from groups: microsoft.public.windowsxp.help_and_support (More info?)

Nepatsfan wrote:
> It just occured to me that naming your batch file shutdown.bat
> would also cause the problem you're having. Try renaming it
> something else.

Thanks. The '-m' helped, but only brought me back to the Remote
Shutdown Dialog. Otherwise 'snafu'. I took all your advice on board at
one fell swoop so I don't know which part of it caused the improvement.

Regarding Carey's comment, I have SP2 and automatic updating so that's
not the problem.
 
G

Guest

Guest
Archived from groups: microsoft.public.windowsxp.help_and_support (More info?)

<tonyboten@yahoo.co.uk> wrote in message
news:1116780489.237701.57900@f14g2000cwb.googlegroups.com...
> Nepatsfan wrote:
>> It just occured to me that naming your batch file shutdown.bat
>> would also cause the problem you're having. Try renaming it
>> something else.
>
> Thanks. The '-m' helped, but only brought me back to the Remote
> Shutdown Dialog. Otherwise 'snafu'. I took all your advice on
> board at
> one fell swoop so I don't know which part of it caused the
> improvement.
>
> Regarding Carey's comment, I have SP2 and automatic updating so
> that's
> not the problem.
>

First off, if you don't want to see the Remote Shutdown dialog,
don't use the -i switch.

Next, I should have picked up on this earlier. You shouldn't
have both the -l and the -s switches included. It's either one or
the other. The -l switch logs off the current user but leaves the
computer running. The -s switch logs off the current user and
shuts down the computer.

Also, is your goal to turn off a local computer or a remote
computer? If you're trying to turn off the local machine, you
don't need to include the -m switch. In other words, if the batch
file resides somewhere on the machine's hard drive, your batch
file should look like this:

shutdown -s -t 60

You would save this file as something like sdlocal.bat.

If you're trying to shutdown a remote computer, your batch file
would be:

shutdown -s -t 60 -m \\remotepc

You would save this file as something like sdremote.bat.

You might want to include the -c switch with a comment warning
the user to close all open applications in order to avoid losing
any data. Just put the comments inside quotation marks, something
like this:

shutdown -s -t 60 -c "Close all open applications in order to
avoid losing data".

Just so you know, it was renaming your batch file that stopped
the command prompt window problem you were having. You had two
files on your computer named shutdown, shutdown.exe and
shutdown.bat. The command prompt window will usually execute
commands without extensions in this order of preference, .com
then .exe then .bat. The exception to this rule is if the
location in which the command prompt window is launched contains
a version
of the file it will run that command. Since your batch file,
shutdown.bat, launched the command prompt window from it's
location and the command inside was simply "shutdown" it got
caught in a loop trying to execute shutdown.bat over and over
again instead of running shutdown.exe. I hope that explains what
happened.

Going back to your original question, keep in mind that if you're
planning on using Scheduled Tasks to run this batch file at a
certain time it will have to be setup using an account that has a
password. The only way around this restriction is to edit the
registry. Take a look here for that procedure:

http://www.kellys-korner-xp.com/xp_s.htm

Scroll down to this heading, "Scheduled Tasks - Applying/Running
tasks without a password".

Good luck

Nepatsfan
 
G

Guest

Guest
Archived from groups: microsoft.public.windowsxp.help_and_support (More info?)

Many thanks; it's much clearer now.
It's a common failing of mine to overelaborate things and constantly
ignore the KISS principle.

Tony.
 
G

Guest

Guest
Archived from groups: microsoft.public.windowsxp.help_and_support (More info?)

<tonyboten@yahoo.co.uk> wrote in message
news:1116945080.424876.213700@g44g2000cwa.googlegroups.com...
> Many thanks; it's much clearer now.
> It's a common failing of mine to overelaborate things and
> constantly
> ignore the KISS principle.
>
> Tony.
>

You're welcome.

Nepatsfan
 

TRENDING THREADS