Results 1 to 9 of 9

Thread: Remote shutdown

  1. #1
    5 Star Lounger
    Join Date
    Mar 2002
    Location
    Buenos Aires, Argentina
    Posts
    877
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Remote shutdown

    I have two workstations within a network. I know really little about networking, so I'm not sure what kind of network it is. Both machines have WinXP and they can see one another's IP number.

    Let's call them A and B (B acts as a files server for several machines).

    I have set both to power on at 9 pm from the system BIOS. After the boot process, A shows the log-on screen. B, however, does not show this log-on screen (Windows and all scheduled tasks start working normally).
    At 9:15 PM B does an information backup to A (yes, although A hasn't logged, it is still visible to B and the backup job is done alright).
    Some hours later, when the backup job is supposed to have finished, I'd like both workstations to shut down.
    For machine B I've written a small AutoIt script that will shut it down 2 hours later if it's a weekday; if it's Saturday or Sunday, it will shut down the computer before the backup is run (since there's no HD activity on Saturdays and Sundays, doing a backup would just create exact copies of the Friday backup).
    Now, my problem is: how do I shut down computer A? Since the boot process stops at the logon screen, no programmed tasks are ever run, nor AutoIt scripts can be launched at startup.

    Is it possible to remotely shut down A? Maybe some kind of ping from B? Any clues?

    TIA
    <img src=/w3timages/blue3line.gif width=33% height=2>
    <img src=/S/flags/Argentina.gif border=0 alt=Argentina width=30 height=18> <big><font color=4682b4><font face="Comic Sans MS">Diegol</font face=comic></font color=4682b4> </big>

  2. #2
    Plutonium Lounger
    Join Date
    Oct 2001
    Location
    Lexington, Kentucky, USA
    Posts
    12,107
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Remote shutdown

    Wouldn't the simplest thing for you to do at this point be to make A also NOT stop at the logon screen as you've done with B? Don't know what your situation is on the B machine, but TweakUI is one way.

  3. #3
    Administrator
    Join Date
    Mar 2001
    Location
    St Louis, Missouri, USA
    Posts
    23,584
    Thanks
    5
    Thanked 1,058 Times in 927 Posts

    Re: Remote shutdown

    Check out PsShutdown in Sysinternals Freeware - PsTools. You should be able to add it to your AutoIt script.

    Joe
    Joe

  4. #4
    5 Star Lounger
    Join Date
    Mar 2002
    Location
    Buenos Aires, Argentina
    Posts
    877
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Remote shutdown

    Hi Joe,

    I've been trying a while with PsExec and PsShutdown but somehow I can't get them to work.
    What I did is unzip both tools to C:Windows. For example for PsShutdown, then I:

    run | psshutdown ipaddress

    as this didn't work, I also tried

    run | psshutdown ipaddress -u username -p password

    where "username" is the username of the remote PC admin and "password" is the password for the remote PC admin user account.

    Again, to no avail

    In both cases all I see is a black cmd-like screen that disappears as soon as some words are printed onscreen.
    I get an analog result when trying PsExec.

    Is there something obvious I'm doing wrong?
    <img src=/w3timages/blue3line.gif width=33% height=2>
    <img src=/S/flags/Argentina.gif border=0 alt=Argentina width=30 height=18> <big><font color=4682b4><font face="Comic Sans MS">Diegol</font face=comic></font color=4682b4> </big>

  5. #5
    Administrator
    Join Date
    Mar 2001
    Location
    St Louis, Missouri, USA
    Posts
    23,584
    Thanks
    5
    Thanked 1,058 Times in 927 Posts

    Re: Remote shutdown

    Open a command window (Start | run | cmd.exe) and the use PsShutdown. You'll get to see any messages.
    Joe

  6. #6
    Silver Lounger
    Join Date
    Jan 2001
    Location
    Brantford, Ontario, Canada
    Posts
    2,391
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Remote shutdown

    Using XP Pro, there is a commandline "shutdown" command.

    <code>shutdown /s /m computername /t 30</code>

    That should do the trick for you, where the flag s = shutdown, m = the computername, and t = time (in seconds) for warning.

    You could also specify /f to force the shutdown of all applications without warning the user.

    I've used this at work a few times when trying to troubleshoot problems on remote PCs.

    This also will shutdown (from XP) a Windows 2000 PC or server.
    Christopher Baldrey

  7. #7
    Platinum Lounger
    Join Date
    Jan 2001
    Location
    Quedgeley, Gloucester, England
    Posts
    5,333
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Remote shutdown

    Another way of doing this is to click on Start then on Run and type cmd /k into the entry area box followed by the command you want to execute, as in
    cmd /k psshutdown mycomputer <followed by any parameters>
    This keeps the Command Prompt window visible on the screen.

    John
    <font face="Script MT Bold"><font color=blue><big><big>John</big></big></font color=blue></font face=script>

    Ita, esto, quidcumque...

  8. #8
    5 Star Lounger
    Join Date
    Mar 2002
    Location
    Buenos Aires, Argentina
    Posts
    877
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Remote shutdown

    Joe, Chris, John,

    Thank you for all the alternatives. I've been trying to pull out any of your tricks, but unfortunately I always get an "Access Denied" notification. I'm completely clueless.
    I attach an image of what the network looks like when viewed with Windows Explorer (in case it might be something related to the network).

    I'm trying to shut down workstation Peru-011 from Peru-14. Both have WinXP Pro installed.

    Is there a chance it might be something related to the "Nmp analisis" group permissions? Where can I change those permissions? (if in turn I do have permissions to do so)

    Thanks
    <img src=/w3timages/blue3line.gif width=33% height=2>
    <img src=/S/flags/Argentina.gif border=0 alt=Argentina width=30 height=18> <big><font color=4682b4><font face="Comic Sans MS">Diegol</font face=comic></font color=4682b4> </big>

  9. #9
    5 Star Lounger
    Join Date
    Mar 2002
    Location
    Buenos Aires, Argentina
    Posts
    877
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Remote shutdown

    We've come to decide we'll manage with Al's solution. I wanted to try the "hard" way to learn something new, but truth is I'm new to networking and this will do.

    Thank you all very much!
    <img src=/w3timages/blue3line.gif width=33% height=2>
    <img src=/S/flags/Argentina.gif border=0 alt=Argentina width=30 height=18> <big><font color=4682b4><font face="Comic Sans MS">Diegol</font face=comic></font color=4682b4> </big>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •