by Raghu (22 Submissions)
Category: Windows API Call/Explanation
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Wed 28th February 2001
Date Added: Mon 8th February 2021
Rating:
(1 Votes)
Code to Check the Mode in which Windows is Loaded (ie)Normal Mode,Safe Mode,Safe Mode With NetWorkSupport
API Declarations
Private Declare Function GetSystemMetrics Lib "User32" (ByVal nIndex as Long) As Long
'Constant
Private Const SM_CLEANBOOT = 67
Dim lngRet as Long
' 0 - Normal Mode
' 1 - Safe Mode
' 2 - SafeMode With NetWork Support
' Done By : S.Raghunathan
' Mail Me At : [email protected]
lngRet = GetSystemMetrics(SM_CLEANBOOT)
If lngRet = 0 Then
MsgBox "Normal Mode"
ElseIf lngRet = 1 Then
MsgBox "Safe Mode"
Elseif lngret = 2 then
MsgBox "Safe Mode with Network Support"
Endif
No comments have been posted about Code to Check the Mode in which Windows is Loaded (ie)Normal Mode,Safe Mode,Safe Mode With NetWorkS. Why not be the first to post a comment about Code to Check the Mode in which Windows is Loaded (ie)Normal Mode,Safe Mode,Safe Mode With NetWorkS.