shutdown multiple computers using batch file

  • Thread starter Thread starter Remush via WindowsKB.com
  • Start date Start date
R

Remush via WindowsKB.com

Hi all,

I'm trying to learn how to shutdown windows xp pro and home computers across
a network from a main office computer, cause people always forget to turn
them off at the end of the day.

I've been practacing from my windows xp pro computer to try and shutdown a
windows xp home laptop using the following at the command prompt

shutdown -s -m \\COMPUTERNAME

When I run this command I get the following error message.

"The network path could not be found"

This is odd cause I can ping the laptop and access shares on the laptop.

Does anyone have any advice ?
 
I'm trying to learn how to shutdown windows xp pro and home computers across
a network from a main office computer, cause people always forget to turn
them off at the end of the day.

I've been practacing from my windows xp pro computer to try and shutdown a
windows xp home laptop using the following at the command prompt

shutdown -s -m \\COMPUTERNAME

When I run this command I get the following error message.

"The network path could not be found"

This is odd cause I can ping the laptop and access shares on the laptop.

Does anyone have any advice ?

One possible way to try is to get the psshutdown tool from:
http://www.microsoft.com/technet/sysinternals/miscellaneous/psshutdown.mspx

In some situations it works better than shutdown.

Hans-Georg
 
Hi all,

I'm trying to learn how to shutdown windows xp pro and home computers across
a network from a main office computer, cause people always forget to turn
them off at the end of the day.

I've been practacing from my windows xp pro computer to try and shutdown a
windows xp home laptop using the following at the command prompt

shutdown -s -m \\COMPUTERNAME

When I run this command I get the following error message.

"The network path could not be found"

This is odd cause I can ping the laptop and access shares on the laptop.

Does anyone have any advice ?

You can't do a remote shutdown of a computer running Windows XP Home. XP Home,
with Simple File Sharing and only Guest access, lacks networked administrative
authority.
<http://nitecruzr.blogspot.com/2005/06/file-sharing-under-windows-xp.html#Guest>
http://nitecruzr.blogspot.com/2005/06/file-sharing-under-windows-xp.html#Guest

--
Cheers,
Chuck, MS-MVP 2005-2007 [Windows - Networking]
http://nitecruzr.blogspot.com/
Paranoia is not a problem, when it's a normal response from experience.
My email is AT DOT
actual address pchuck mvps org.
 
I am now trying to do this from xp pro to xp pro, and I keep getting access
is denied errors or no response at all, this is also happening for psshutdown.






[quoted text clipped - 14 lines]
Does anyone have any advice ?

You can't do a remote shutdown of a computer running Windows XP Home. XP Home,
with Simple File Sharing and only Guest access, lacks networked administrative
authority.
<http://nitecruzr.blogspot.com/2005/06/file-sharing-under-windows-xp.html#Guest>
http://nitecruzr.blogspot.com/2005/06/file-sharing-under-windows-xp.html#Guest
 
I am now trying to do this from xp pro to xp pro, and I keep getting access
is denied errors or no response at all, this is also happening for psshutdown.

Could you make a little experiment and map a drive to the target
computer before trying to shut it down? For example, you could
open Windows Explorer on the controlling computer and use the
command Tools, Map network drive.

It doesn't matter which drive you map---just any should do.

Then try the remote shutdown or psshutdown.

Strange that nobody fixes these obvious defects, not even the
Sysinternals guys.

Hans-Georg
 
Could you make a little experiment and map a drive to the target
computer before trying to shut it down? For example, you could
open Windows Explorer on the controlling computer and use the
command Tools, Map network drive.

It doesn't matter which drive you map---just any should do.

Then try the remote shutdown or psshutdown.

Strange that nobody fixes these obvious defects, not even the
Sysinternals guys.

Hans-Georg

You could always use task scheduler and have it shut down the
computers automatically.
 
Chuck said:
[quoted text clipped - 14 lines]
Does anyone have any advice ?

You can't do a remote shutdown of a computer running Windows XP Home. XP Home,
with Simple File Sharing and only Guest access, lacks networked administrative
authority.
<http://nitecruzr.blogspot.com/2005/06/file-sharing-under-windows-xp.html#Guest>
http://nitecruzr.blogspot.com/2005/06/file-sharing-under-windows-xp.html#Guest
I am now trying to do this from xp pro to xp pro, and I keep getting access
is denied errors or no response at all, this is also happening for psshutdown.

Are they XP Pro with Advanced File Sharing, and properly activated non-Guest
accounts? Remember Guest won't give you administrative access, and remote
control commands won't work.
<http://nitecruzr.blogspot.com/2005/06/file-sharing-under-windows-xp.html#Guest>
http://nitecruzr.blogspot.com/2005/06/file-sharing-under-windows-xp.html#Guest

--
Cheers,
Chuck, MS-MVP 2005-2007 [Windows - Networking]
http://nitecruzr.blogspot.com/
Paranoia is not a problem, when it's a normal response from experience.
My email is AT DOT
actual address pchuck mvps org.
 
You can shutdown a XP Home machine remotely. The solution lies in granting the Guest account the privilege to access the shutdown. Here are the details:

To do this you need to use the NtRights.exe file found in the XP Resource Kit, here http://www.microsoft.com/downloads/...69-57FF-4AE7-96EE-B18C4790CFFD&displaylang=en

Download the kit from Microsoft.
Copy the NtRights.exe program to %windir%\system32.
Next log-in as an administrator on the box to be shutdown remotely
Perform the following commands from a command window:

NtRights –u Guest +r SeRemoteShutdownPrivilege
NtRights –u Guest +r SeShutdownPrivilege

Be careful about the spelling – note there is no ‘t’ in the priv name where you would expect it to read SetRemoteShutdownPrivilege

See here for a full description of the NtRights.exe program http://support.microsoft.com/kb/279664

Now you should be able to use the shutdown.exe programs from a remote computer. When you do the shutdown message on your XP Home machine will read ‘Shutdown initiated by \\<pcName>\Guest’
 
Back
Top