|
-
Aug 21st, 2001, 05:25 AM
#1
Detect if in Safe Mode
Is it possible to detect whether Windows is running in "Normal" mode or Safe Mode from within your VB app? Thanks.
-
Aug 21st, 2001, 06:18 AM
#2
Sure is. Try this:
Private Declare Function GetSystemMetrics Lib "user32" (ByVal nIndex As Long) As Long
Private Const SM_CLEANBOOT = 67
Select Case GetSystemMetrics(SM_CLEANBOOT)
Case 0: MsgBox "Normal boot"
Case 1: MsgBox "Safe Mode"
Case 2: MsgBox "Safe Mode with network boot"
End Select
-
Aug 21st, 2001, 06:20 AM
#3
Great stuff! Thanks!
Does that work for all OS's? I can only try it on Windows 98 and Me.
-
Aug 21st, 2001, 06:23 AM
#4
As far as I know it does. If you run into something in which it doesn't work, let me know.
-
Aug 21st, 2001, 06:23 AM
#5
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|