Link to home
Start Free TrialLog in
Avatar of bluedragon99
bluedragon99Flag for United States of America

asked on

Visual basic restart remote computer

Hello I am looking for a module that will allow me to restart remote computers.  Thanks
Avatar of Zyloch
Zyloch
Flag of United States of America image

Hi

I don't know about remote computers, but you can force a system restart as long as your VB file is on their computer:

http://support.microsoft.com/default.aspx?scid=kb;EN-US;168796

A problem in NT and 2000 and XP
http://support.microsoft.com/default.aspx?scid=kb;en-us;176695#appliesto

Regards,
Zyloch
Avatar of rsriprac
rsriprac

Here is a VB script to reboot remote computer:

http://www.freevbcode.com/ShowCode.Asp?ID=4889

-Ram
Just use tsshutdn ... it included in Windows 2000 and up... you can use it to restart remote servers..
As long you've got right for it on that server.

You also can call the program from VB or something like that.. just use WinEXec command for it.

Shut down a server in a controlled manner.

TSSHUTDN [wait_time] [/SERVER:servername] [/REBOOT] [/POWERDOWN]
         [/DELAY:logoffdelay] [/V]

  wait_time           Seconds to wait after user notification before
                      terminating all user sessions (default is 60).
  /SERVER:servername  The server to shut down (default is current).
  /REBOOT             Reboot the server after user sessions are terminated.
  /POWERDOWN          The server will prepare for powering off.
  /DELAY:logoffdelay  Seconds to wait after logging off all connected
                      sessions (default is 30).
  /V                  Display information about actions being performed.


Greetings Sicos..
ASKER CERTIFIED SOLUTION
Avatar of Validor
Validor

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of bluedragon99

ASKER

Very nice clean working code that matches the description of the question.  Thanks!