Hello everyone
Plaease I need your help. I have a small application that runs in Windows 98 and windows 2000. I found this code that help me to ReStart the PC. For windows 98 works but windows 2000.
'===========
'CODE HERE: |
'===========
Const EWX_LOGOFF = 0
Const EWX_SHUTDOWN = 1
Const EWX_REBOOT = 2
Const EWX_FORCE = 4
Private Declare Function ExitWindowsEx Lib "user32" (ByVal uFlags As Long, ByVal dwReserved As Long) As Long
Private Sub Form_Load()
Let msg = MsgBox("THIS PROGRAM IS GOING TO REBOOT YOUR COMPUTER. PRESS [OK] TO CONTINUE...", vbCritical + vbOKOnly + 256, App.TITLE)
If (msg = vbOK) Then End
ret& = ExitWindowsEx(EWX_FORCE Or EWX_REBOOT, 0)
Exit Sub
End Sub
===========
QUESTIONS |
===========
I would like to acomplish the following task.
1- Detect the operating system (Windows 98 / windows 2000
2- Depending on the Operating system Restart the PC
Can somebody help me out in order to acomplish this task
Thanks in advance for your time
Danielvb
Hollywood, Florida
Plaease I need your help. I have a small application that runs in Windows 98 and windows 2000. I found this code that help me to ReStart the PC. For windows 98 works but windows 2000.
'===========
'CODE HERE: |
'===========
Const EWX_LOGOFF = 0
Const EWX_SHUTDOWN = 1
Const EWX_REBOOT = 2
Const EWX_FORCE = 4
Private Declare Function ExitWindowsEx Lib "user32" (ByVal uFlags As Long, ByVal dwReserved As Long) As Long
Private Sub Form_Load()
Let msg = MsgBox("THIS PROGRAM IS GOING TO REBOOT YOUR COMPUTER. PRESS [OK] TO CONTINUE...", vbCritical + vbOKOnly + 256, App.TITLE)
If (msg = vbOK) Then End
ret& = ExitWindowsEx(EWX_FORCE Or EWX_REBOOT, 0)
Exit Sub
End Sub
===========
QUESTIONS |
===========
I would like to acomplish the following task.
1- Detect the operating system (Windows 98 / windows 2000
2- Depending on the Operating system Restart the PC
Can somebody help me out in order to acomplish this task
Thanks in advance for your time
Danielvb
Hollywood, Florida