pastiesrus
asked on
System reboot
i have looked around the net and found a few pieces of code that say it shutsdown the system but not mine.
i have a command button and all i want it to do is reboot the system.
can u help
Pastiesrus
i have a command button and all i want it to do is reboot the system.
can u help
Pastiesrus
Can you please show us what you have already attempted to use?
ASKER
Private Declare Function ExitWindowsEx Lib "user32" (ByVal uFlags As Long, ByVal dwReserved As Long) As Long
Private Const EWX_REBOOT = 2
Private Sub cmdShutDown()
ExitWindowsEx EWX_REBOOT, 2
End Sub
Private Const EWX_REBOOT = 2
Private Sub cmdShutDown()
ExitWindowsEx EWX_REBOOT, 2
End Sub
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
note to future viewers.
The code i used to reboot was:
Shell ("C:\Windows\System32\Shut down -r")
Works great
Happy codeing
The code i used to reboot was:
Shell ("C:\Windows\System32\Shut
Works great
Happy codeing
Just be aware that you are using an external EXE called "shutdown" that may not be present on all systems.
It can be moved or deleted easily. =)
It can be moved or deleted easily. =)