Announcement

Collapse
No announcement yet.

Need to Remotely Start My PC

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

    Need to Remotely Start My PC

    I had to dump my hard drive and start from scratch again this weekend. I reloaded Ultra VNC, but I forgot to restart the pc so that the client runs as a service. I am an hour away from my house, and I will not be back until the weekend. It there a way I can remotely restart my pc? I have searched the forums, but it seems the only way to do it is to have a script call a shortcut already on the pc. I have no way of getting that shortcut on my pc from where I am. If there is a way to restart my pc with a simple script, could someone let me know? thanks.

    #2
    Can you access you HS web pages? If so you could write a reboot bat file and execute it.
    -Rupp
    sigpic

    Comment


      #3
      yes I can. What would the script look like?

      Comment


        #4
        Put this in a bat file

        rem 0 = Log Off
        rem 1 = ShutDOwn
        rem 2 = Restart
        rem 4 = Forced
        rem 8 = Poweroff

        rem You can combine these shotdown options by totaling their value. E.g. 12 = Poweroff + Forced

        C:\WINNT\system32\RUNDLL32.EXE shell32.dll,SHExitWindowsEx 2


        Good luck
        -Rupp
        sigpic

        Comment


          #5
          Rupp,

          Thanks. I have no idea how to execute this. I only have access to hs over the web, and only some pages work. What exactly do I have to do to run this? Thanks.

          Comment


            #6
            the first thing I would try is to start the service manually, a reboot can backfire if there is an issue during booting (happens a lot after installing new software, i.e. a password prompt). If you already set your VNC password, you could execute it using the net command.

            Create a new event through the web interface, and instead of pointing it to a script, have it execute "&hs.run net start winvnc4" assuming you downloaded the latest version of RealVNC. Then just execute the event and assuming there are no permissions issues, the service should now be up and running without a reboot.
            HSPRO 2.4 (ESXi 4.1) | my.Alert NEW | my.Trigger | HSTouch | ACRF2 | UltraM1G | BLWeather | BLLan | Rover
            (aka xplosiv)
            Do You Cocoon? Home Automation News, Tutorials, Reviews, Forums & Chat

            Comment


              #7
              Electron,

              I have ultra vnc, and I don't believe I set up the password yet. Is there a default? Is there any other way I can turn on the vnc server if I didn't set up the password? Thanks.

              Comment


                #8
                if the password isn't set, then it is going to prompt you for one and not start up. UltraVNC might use a different service name too, but that's easy to find out. But to get around the password issue, the only thing I can think of is by manually importing the registry entry with the password BEFORE starting the service.
                HSPRO 2.4 (ESXi 4.1) | my.Alert NEW | my.Trigger | HSTouch | ACRF2 | UltraM1G | BLWeather | BLLan | Rover
                (aka xplosiv)
                Do You Cocoon? Home Automation News, Tutorials, Reviews, Forums & Chat

                Comment


                  #9
                  Electron, if you have time, could you help me with this? I really don't have any knowledge in this field at all. Can I manually put in a registry entry through homeseer? I tried the script line you gave me, but I got an error. Maybe you are right and ultra vnc has a different name.

                  Comment


                    #10
                    Install UltraVNC on your own system, set the password, then go into the registry, and find the entry which stores the password (should be in local_machine under software somewhere). Export that entry to a .reg file (by going to the file menu) and put it on your desktop for now.

                    As for the service name, I believe it's winvnc for UltraVNC, but you can verify that by looking at your own system now.

                    Assuming regedit allows you to import files not using the .reg extension, the following should work:

                    This is where things can get a little tricky. You have to create a new script, remember the name and exact location of this script (in this example we'll use c:\homeseer\scripts\reg.txt), then copy the content of the exported .reg file into this script (nothing else, no main() function or anything). Then you have to create an event which will merge this entry into the registry, you can do this by having the event point to "&hs.run regedit /s c:\homeseer\scripts\reg.txt".

                    Hopefully there were no errors, and you should be able to start the service now using the winvnc name.

                    FYI: Keep in mind that I am writing this in a hurry, so if someone else could confirm this, go ahead, as working with the registry can screw things up (eventho this kind of entry shouldn't cause any problems if things do go wrong). I'll look at the post again when I get home in a bit, just to be sure.
                    HSPRO 2.4 (ESXi 4.1) | my.Alert NEW | my.Trigger | HSTouch | ACRF2 | UltraM1G | BLWeather | BLLan | Rover
                    (aka xplosiv)
                    Do You Cocoon? Home Automation News, Tutorials, Reviews, Forums & Chat

                    Comment


                      #11
                      Hi,
                      what about hs.Restartsystem
                      Stuart

                      Comment


                        #12
                        What's wrong with the reboot.bat file? Didn't he state he simply wanted to reboot his system?
                        -Rupp
                        sigpic

                        Comment


                          #13
                          Rupp,

                          I think I forgot to set up the vnc service on my pc, that's why.

                          I tried to enter the command &hs.run net start winvnc, but I get an expected end of script error. Is there a different way to write this command?

                          Comment


                            #14
                            If I want to start vnc from a hs command line, what would the command look like?

                            "C:\Program Files\UltraVNC\winvnc.exe"

                            Is the path to winvnc

                            Comment


                              #15
                              <BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>Originally posted by Rupp:
                              What's wrong with the reboot.bat file? Didn't he state he simply wanted to reboot his system? <HR></BLOCKQUOTE>

                              because he wants to restart it so the VNC service would start up, which won't happen since he didn't set a password.
                              HSPRO 2.4 (ESXi 4.1) | my.Alert NEW | my.Trigger | HSTouch | ACRF2 | UltraM1G | BLWeather | BLLan | Rover
                              (aka xplosiv)
                              Do You Cocoon? Home Automation News, Tutorials, Reviews, Forums & Chat

                              Comment

                              Working...
                              X