SysChat is a free online computer support community. Ask questions, share resources, contribute knowledge and discuss technology. Join our growing community to access all features. Register Now!

SysChat » Software Support » Development » Problem when creating batch file for shutdown multiple computers in LAN

Development

Support help and discuss software development and programming.

Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old 03-18-2009, 06:54 AM
bhanuk bhanuk is offline
Junior Member
 
About:
Join Date: Apr 2008
Posts: 11
bhanuk is on a distinguished road

Exclamation Problem when creating batch file for shutdown multiple computers in LAN


hi all,

I am working as a system administrator around with 90 systems and using server 2003.all systems are windows xp

I want to shutdown all 90 systems at once.it can be possible with batch file using "SHUTDOWn" command
I worte the batch file using that command but it is not working

My Batch file like this

Shutdown -s -m \\Test1 -t 60 -c "Your systems will be shutdown within 1 minite. please save your work"
Shutdown -s -m \\Test2 -t 60 -c "Your systems will be shutdown within 1 minite. please save your work"
Shutdown -s -m \\Test3 -t 60 -c "Your systems will be shutdown within 1 minite. please save your work"
Shutdown -s -m \\Test4 -t 60 -c "Your systems will be shutdown within 1 minite. please save your work"

this is my batch file.this is not working...please help me..

Note: When i exceute the same command form command prompt it will work fine...for that i have to type that same command for 90 times to shutdown all compters.

i am using another batch file..it shows like this...

@Echo off
cd\
Echo bunny=Program
REM ****************************
REM * Program Variables *
REM ****************************

set varcomputer=Test1
goto loop
:Test1

set varcomputer=Test2
goto loop
:Test2


Exit

REM ****************************
REM * Program *
REM ****************************

:loop
echo Shutting down %varcomputer%.
shutdown -s -m \\%varcomputer% -t 600 -c “The computer is shutting down. Please save your work.”
goto %varcomputer%

This is also not working..

Please any body help me....or tell me the code for do that...

Thanks in Advance..



Reply With Quote
  #2 (permalink)  
Old 04-07-2009, 07:15 AM
vikaskumargdra's Avatar
vikaskumargdra vikaskumargdra is offline
Junior Member
 
About:
Join Date: Jun 2008
Posts: 20
vikaskumargdra is on a distinguished road

Default


To shutdown
shutdown -m \\IP HERE -t TIME IN SECONDS HERE -c MESSAGE HERE -s

To Abort
shutdown -m \\IP HERE -a

I hope this will work.



Reply With Quote
  #3 (permalink)  
Old 04-12-2009, 10:30 AM
benjamingreggsmith benjamingreggsmith is offline
Member
 
About:
Join Date: Sep 2008
Posts: 61
benjamingreggsmith is on a distinguished road

Default


I remember being able to shutdown computers with either ip addresses or like you were doing: network names. the only problems i found were setting domain names and especially that the batch file will have to be launched from an administrative account or with an account with a higher privilege level than the users of the PCs you are trying to shutdown otherwise you get a windows security 'Access is denied' error. i am however no too sure on what switches you should use. try shutdown.exe /? and take it from there.



Reply With Quote
Reply





Similar Threads
Thread Thread Starter Forum Replies Last Post
Zip File Corruption if Downloaded Using BitTorrent Andrew Watson Articles 0 06-06-2008 03:23 AM
Zip File Corruption Due to Oversize Andrew Watson Articles 1 05-14-2008 04:51 PM
OST File Recovery and PST File Recovery Sami Backup and Data Recovery 1 09-07-2007 12:42 AM
.TIFF, JPEG, GIF: Photo files lingo and more eloisa_g Articles 0 05-30-2007 05:34 AM
Quick look at Popular Extensions dream_hunt General 0 08-06-2006 08:15 AM

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 Off
Pingbacks are Off
Refbacks are on



» Ads



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54