remote power off using login script

I have the poweroff.exe program recommended in another question on this website.

http://users.telenet.be/jbosman/applications.html

Using the login script at my company, just a standard .bat file that maps drives and file copies etc.  I copied the poweroff.exe to the root of the C: drive.

Now, using the login script I want to apply the paramaters to the poweroff.exe program to setup a schedule to shutdown all computers at 8pm every night.  I've followed the help/FAQ on the website above and put the following commands intot he login script.

C:\poweroff.exe shutdown -create_service -warn -warntime 120 -msg "You pc will Shutdown in 2 minutes\nPlease save your work"  -force -scheduled -time 20:00 -days m,t,w,th,f,s,su -allow_remote -remote_pswd password -save_settings -save_svc_set

However this doesn't seem to work and it doesn't set the para's to the program!!!  Can anyone help, as i need to get this enabled asap.

Thanks
brandadditionAsked:
Who is Participating?
 
sumit_Connect With a Mentor Commented:
It seems as though you don't need the -save_svc_set parameter. Try the following,

C:\poweroff.exe shutdown -warn -warntime 120 -msg "You pc will Shutdown in 2 minutes\nPlease save your work"  -force -scheduled -time 20:00 -days m,t,w,th,f,s,su -allow_remote -remote_pswd password -save_settings -create_service

Note the -create_service parameter is last, I think that creates the service with the settings you specify before it.
0
 
djimenez5066Commented:
Are you using windows xp or vista? You can also create a scheduled task.
0
 
brandadditionAuthor Commented:
Using XP.  Wanted to save going around to all PC's to setup the scheduled task and do this via the login script, unless there is a way to setup a scheduled task via the login script?

Thanks
Andy
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.