CodeItBetter Programming Another VB Programming Blog

How to Determine Windows Startup Mode

Posted on July 8, 2011
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
'System & API - How to Determine Windows Startup Mode

Option Explicit
 
Public Declare Function GetSystemMetrics Lib "user32" (ByVal nIndex As Long) As Long
Public Const SM_CLEANBOOT = 67
 
Private Sub Form_Load()
    Select Case GetSystemMetrics(SM_CLEANBOOT)
    Case 1
        MsgBox "Safe Mode."
    Case 2
        MsgBox "Safe Mode with Network support."
    Case Else
        MsgBox "Windows is running normally."
    End Select
End Sub
Comments (0) Trackbacks (0)

No comments yet.


Leave a comment


 

No trackbacks yet.