Home > How-To Library > System & API
How to Determine Windows Startup Mode
**************************************************************** * © 2007 CodeItBetter http://www.codeitbetter.com * * This notice MUST stay intact for legal use * **************************************************************** 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
If you would like to submit your code here please us. Do not forget to mention your name. We are always thankful to each and everyone of you who submitted their code here.