remote power off using login script

Posted on 2008-11-15
Last Modified: 2012-05-05
I have the poweroff.exe program recommended in another question on this website.

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.

Question by:brandaddition
    LVL 3

    Accepted Solution

    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.

    Expert Comment

    Are you using windows xp or vista? You can also create a scheduled task.

    Author Comment

    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?


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Suggested Solutions

    You may have already been in the need to update a whole folder stucture using a script. Robocopy does it well and even provides a list of non-updated files in a log (if asked to). Generally those files that were locked by a user or a process by the …
    I have published numerous articles here at Experts Exchange that present programs/scripts written in a language called AutoHotkey. Each of those articles has a brief paragraph describing where to download the product and how to install it. I have al…
    This video discusses moving either the default database or any database to a new volume.
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now