|
Answer» shutdown -l -s -f -m \\computername -t 5 -c "Pc shutting down in 5 seconds" -d up:125:1
that is what i put in the bat file. Now i get it supposed to logoff the user, shutdown after 5 seconds and i dont get what the -d up:125:1 is for but its there. I ran it but it wont shutdown the pc. I just see writting all over the screen. Looks like its looping or something. I'm new to bat files so ye , i pulled this off somewhere. Just wandered where im going wrong. Any help will be appreciated, thank you.
oh im running xp service pack 2. dos ver 5.1 ANYTHING i left out plz let me know.check the help for shutdown by typing shutdown /? on your COMMAND line. Get a feel of what those switches mean.im doing the same thing and found that if i type shutdown -r -m \\computername into a cmd prompt it restarts the computer fine. However if i try and make this a batch file it just loops the cmd over and over without actually doing anything.... is there a simple mistake im making here???I assume you are using XP ? the shutdown command does not allow -l to be used with -m you have -l and -m ... i guess that's where its not working.. Code: [Select]shutdown -l -s -f -m \\computername -t 5 -c "Pc shutting down in 5 seconds" -d up:125:1
Also, -l is for logging off....and not shutdown...there's a difference . shutdown is -s if you specify -l and -s , exactly what do you want to do ? logoff or shutdown??
remove the switches you don't need, and it will be alrightBe sure you aren't naming the batch file "shutdown.bat" or something like that. And / or specify extensions in your batch file, like: Code: [Select]shutdown.exe -s -f -m \\computername -t 5 -c "Pc shutting down in 5 seconds" The -d is the reason code for the shutdown.shutdown.exe -s -f -t 5 -c "Pc shutting down in 5 seconds" -d up:125:1
that the final one. and it works. THANX everyone for the help. I did everything all your replies said. Thanx guys. It works now.ok im still confused what is the code to shutdown in computer in a time period?? :-? and i need to no a batch file that will open up a folder for me that has all of my WORK in it?
can i get the code from the beginning plzunlovedwarrior: It is usually better to start your own question. Go to the forum and click on "Start a new topic" to ask your questions.I posted the final code already. In my previous post in the topic is the code.
edit: here it is Code: [Select]shutdown.exe -s -f -t 5 -c "Pc shutting down in 5 seconds" -d up:125:1 will shut down after 5 seconds. I cant find the link to the site where it EXPLAINS what each thing does. the s shutsdown, t is timer c is the message.Here is the link to the site that explains what each thing does: http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/shutdown.mspxthanks guys, does exactly what i wanted now. cheers.
|