Announcement

Collapse
No announcement yet.

Powerdown an xp computer from another xp computer

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Powerdown an xp computer from another xp computer

    Hello,

    Sorry for my english, i'm french ;-)

    i don't have the permission (access denied) for shutdown a computer on my lan.

    (ex : shutdown -r -m \\computer2 --> Access denied)

    i can't authorise this with the administrative tools.
    [img]/infopop/emoticons/icon_confused.gif[/img] [img]/infopop/emoticons/icon_confused.gif[/img]
    Help me please.

    Thank you !

    Jérôme

    #2
    How do you login to your computers? Are you using the same login name and password? Are they in the same workgroup such as "WORKGROUP" by XP install default?

    I believe you need to login as administrator or adminmistrator equivlent to be able to shut down another PC remotely.

    Hope it helps,

    Simon

    Comment


      #3
      I just shut down my domain controller from another PC successfully using your command: shutdown -r -m \\domain_cont

      However, my home network is on a domain so I'm not sure if you can do it in a workground environment.

      Also, check out this link for other shutdown commands:

      http://www.tweakxp.com/tweakxp/display.asp?id=723

      Simon

      Comment


        #4
        If you're running a workgroup, you'll need to have your script authenticate to the machine you're trying to shut down by mapping a drive to it before attempting the shut down. Here's a sample:
        '------------------------------------------------------------
        Set WSHNet = CreateObject("WScript.Network")
        Set WshShell = CreateObject("WScript.Shell")

        WshNet.MapNetworkDrive "X:", "\\COMPUTER2\C$", "False", "COMPUTER2\ADMINISTRATOR", "AdministratorPWOnCOMPUTER2"

        WshShell.Exec("shutdown.exe -r -m \\computer2")

        WshNet.RemoveNetworkDrive "X:", TRUE
        '----------------------------------------------------------
        This should do the trick for you.

        Justin

        Comment


          #5
          Hello,

          Thank you for your replies, i will try your response.

          See you later !!!

          [img]/infopop/emoticons/icon_eek.gif[/img]


          Jerome

          Comment


            #6
            Or using WMI:

            <pre class="ip-ubbcode-code-pre">
            Option Explicit

            Const EWX_LOGOFF = 0
            Const EWX_SHUTDOWN = 1
            Const EWX_REBOOT = 2
            Const EWX_FORCE = 4
            Const EWX_POWEROFF = 8

            sub main(args)

            dim strRemoteSystem

            strRemoteSystem = "YourXPHostName"

            call Shutdown(strRemoteSystem)


            end sub

            sub Shutdown(strRemoteSystem)

            dim OpSysSet, OpSys

            Set OpSysSet = GetObject("winmgmts:{(Debug,RemoteShutdown)}//" _
            & strRemoteSystem & "/root/cimv2").ExecQuery("SELECT * FROM Win32_OperatingSystem WHERE Primary=true")

            for each OpSys in OpSysSet
            'Commented out to implement poweroff using constants
            'OpSys.Shutdown()
            OpSys.win32shutdown EWX_POWEROFF
            next

            hs.WriteLog "PC Shutdown Info", "Sent shutdown command to " & strRemoteSystem & "."

            set OpSysSet = Nothing

            end sub
            </pre>
            Plug-ins: UltraMon, UltraM1G, UltraCID, Ultra1Wire, UltraLog, UltraWeatherBug, UltraPioneerAVR, UltraGCIR

            Comment


              #7
              Check out PsShutdown from Sysinternals. I swear by their entire PsTools suite. (and its free)

              -Nitrox

              Comment


                #8
                UJ,

                That'll work, unless you need to authenticate to the remote within a workgroup [img]/infopop/emoticons/icon_smile.gif[/img]

                Justin

                Comment


                  #9
                  Check out Girder. It will do everything you can think of doing with a keyboard and mouse.

                  It will take external triggers to activate it.
                  You can send a call over the network as a trigger and a local version of the program will shutdown the computer.

                  My only problem at this point is the send keys does not seem to be working to send the trigger from Homeseer. Worked fine in PowerHome but I have switched to Homeseer.

                  It is free and it is awesome.

                  http://www.girder.nl

                  Rob

                  Comment


                    #10
                    Ok, i can shutdown now my computer on the lan.

                    I use Girder, thanks everybody...

                    Comment


                      #11
                      The Sysinternals freeware looks great (www.sysinternals.com). I see several utilities I can use. Thanks for the information.

                      Comment

                      Working...
                      X