| View previous topic :: View next topic |
| Author |
Message |
DW Contributor

Joined: 21 Mar 2003 Posts: 175 Location: UK
|
Posted: Sun May 16, 2004 8:18 am Post subject: Safe Mode |
|
|
| How can I detect if windows is in safe mode? |
|
| Back to top |
|
 |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Tue May 18, 2004 12:56 am Post subject: |
|
|
I would like to know myself...that is a good question i hope some one can answer it....sorry DW i don't know  _________________ Have a nice day  |
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
|
| Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Tue May 18, 2004 12:10 pm Post subject: |
|
|
Here's some VB code to do this:
| Code: | Option Explicit
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' Copyright ©1996-2004 VBnet, Randy Birch, All Rights Reserved.
' Some pages may also contain other copyrights by the author.
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' Distribution: You can freely use this code in your own
' applications, but you may not reproduce
' or publish this code on any web site,
' online service, or distribute as source
' on any media without express permission.
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Public Declare Function GetSystemMetrics Lib "user32" _
(ByVal nIndex As Long) As Long
Public Const SM_CLEANBOOT = 67
Private Sub Command1_Click()
Select Case GetSystemMetrics(SM_CLEANBOOT)
Case 1: Label1.Caption = "System started in Safe Mode."
Case 2: Label1.Caption = "System started in Safe Mode with network support."
Case Else: Label1.Caption = "Windows is running normally."
End Select
End Sub
'--end block--' |
I'll try and make a VDS script out of this in a little bit.  _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
Posted: Tue May 18, 2004 1:48 pm Post subject: |
|
|
This should work (converted from FreezingFire's example... ).
| Code: | #define function,WindowStatus
info Windows is running: @WindowStatus()
exit
:WindowStatus
loadlib user32
%1 = @lib(user32,GetSystemMetrics,INT:,INT:67)
if @equal(%1,1)
%1 = SAFEMODE
elsif @equal(%1,2)
%1 = SAFEMODEWITHNETWORK
else
%1 = NORMAL
end
freelib user32
exit %1 |
_________________ [ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial! |
|
| Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Tue May 18, 2004 9:17 pm Post subject: |
|
|
ok Skit made a script so I wont post mine that I said I was working on. _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
|
| Back to top |
|
 |
|