Follow via:
RSS
Email Alert
Question
0 Votes
+ -

Network/Computer Technician

I am trying to figure out a way to automatically shutdown windows xp computers but also give the user the option to abort the shutdown in case they are on and using the computer. This is in efforts to shutdown computers at night that should have been shutdown by the user before they leave for the day to conserve energy in these difficult budget times. Does anyone have a VB Script that will automatically start the shutdown process? The plan would be to have a scheduled task on each machine to kick off the VB Script. I need help in showing a box saying "This computer will shutdown at 8:00pm" and have that box appear on the computer screen 10 minutes before the actual shutdown. I also want there to be an option (cancel button) for the user to cancel or abort the shutdown in case they are there using the computer. Any help would be greatly appreciated.

Thanks
13th Mar 2009

Answers (3)

0 Votes
+ -
Re: Shutdown
You can create a scheduled task to run shutdown.exe located in the system32 folder. The command line switches you would want to include -f to force the shutdown and -s to shutdown. In the "Advanced Options" for the scheduled task is a check box to stop the task if the computer ceases to be idle (i.e. somebody is using it at that time). You could create a script to do this and have the scheduled task run the script but the scheduled task alone should do the trick.

If you need a more detailed explanation or you have further questions, please let me know. Thanks.
13th Mar 2009

Replies

really the question raised a question which is in my brain for long time.

i provide IT support for small company. in my antivirus server, i make daily scan schedule for all the PCs in the night. i told the users to do not shutdown their PCs. but some users forget to do that.

how i prevent the users to do not shutdown their pcs, and instead they can hibrnate the pc or logo ff only?

how i can schedule the PCs to hibernate by itslef?

how i can enforce wake the PCs from server?


alashhar@... 13th Mar 2009
by using Group Policy 'Administrative templates' > 'Windows components' > 'Start Menu and Taskbar' > 'Remove and prevent access to the shutdown command'

ComputerCookie 14th Mar 2009
You can create a batch file with the following commands in it:
@echo off
shutdown.exe -s -f -t 90 -c "Double Click abort Icon on Desktop to keep using this workstation!"

Use the job scheduler to run this batch file at your preferred time.

This gives the person 90 seconds to abort before the shutdown initiates, and gives them a message prompting them to abort if they want to keep working.

Then, put a shortcut on each user's desktop to abort the shutdown. To do this, nav to c:\windows\system32 and right-drag shutdown.exe to the desktop. Choose "create shortcut here." Rename the shortcut to Abort Shutdown and then edit the properties of the shortcut. On the Shortcut tab of the properties window, change the target to C:\WINDOWS\sytem32\shutdown.exe -a (this is the abort.) Then click the change con button and choose the red circle with the slash through it. Test, and you're done.
petere@... 1st Apr 2009
0 Votes
+ -
forget VB try batchfile
have a look at the shutdown help data, anyone with some skill can type in the run command shutdown -a
13th Mar 2009
0 Votes
+ -
you could try a batchfile...
syntax: shutdown -m (remote machine switch) x.x.x.x (ip) -f (force action) -s (shutdown, can use -r to restart) -t (delay time switch, 30 seconds is default if -t switch is not used) xx (warning time, in seconds)

ex.) "shutdown -m 192.168.1.2 -f -s -t 45"

save as a batchfile then use windows task scheduler to run when you want.

hope this helps post back
Updated - 1st Apr 2009
Answer the question
Formatting +
BB Codes - Note: HTML is not supported in forums
  • [b] Bold [/b]
  • [i] Italic [/i]
  • [u] Underline [/u]
  • [s] Strikethrough [/s]
  • [q] "Quote" [/q]
  • [ol][*] 1. Ordered List [/ol]
  • [ul][*] · Unordered List [/ul]
  • [pre] Preformat [/pre]
  • [quote] "Blockquote" [/quote]

Join the TechRepublic Community and join the conversation! Signing-up is free and quick, Do it now, we want to hear your opinion.