How to perform visual basic reboot computer ?

Asked By 0 points N/A Posted on -
qa-featured

Hi Experts,

I am having windows XP in my desktop and my visual basic editor gives error messages frequently. Does anyone know how to perform visual basic reboot computer to normal status. Thanks.

Regards,

Josephadamm

SHARE
Best Answer by Toni Linscomb
Answered By 0 points N/A #131067

How to perform visual basic reboot computer ?

qa-featured

Hi,

To reboot computer there are two methods in VB. I think you use .net code. I will give you both codes.

  • Shell command

Shutdown –r

  • .net command

           System.Diagnostics.Process.Start("shutdown", "/r") '

Changing letter “ r “ you can change the process to shutdown ,restart, or logoff.

Thanks.

Best Answer
Best Answer
Answered By 5 points N/A #131068

How to perform visual basic reboot computer ?

qa-featured

There are various commands to shut down the computer. Using the below code will shut down the computer after a 30 seconds delay:

System.Diagnostics.Process.Start("shutdown", "/r")

To avoid the delay you can use below command:

System.Diagnostics.Process.Start("ShutDown","/r /t 00")

See the below Thread for more options for restarting your computer using commands.
 
Answered By 590495 points N/A #131069

How to perform visual basic reboot computer ?

qa-featured

If you are having a problem with your Visual Basic editor, try installing the latest Service Pack. Download and install Service Pack 6 for Visual Basic 6.0. If this doesn’t work, try re-installing Microsoft Visual Basic. Click Start, Control Panel, and then “Add or Remove Programs”. Scroll down and select Microsoft Visual Basic then click Remove or Uninstall to uninstall the program. Restart your computer.

Next, install back Microsoft Visual Basic and then the Service Pack 6 for Visual Basic 6.0. See if this works. You can also download Visual Basic from Microsoft Visual Basic on Softonic. It requires Windows 2000, Windows 2003, Windows XP, Windows Vista, Windows 7, or Windows 8; 256 MB RAM; and 640 MB free hard drive space. It also requires .NET Framework 3.5.

If you don’t have it, download and install Microsoft .NET Framework 3.5 SP1 Full Package.

Related Questions