How can I tell if my PC is running in Safe Mode?

User avatar
John Gray
PlatinumLounger
Posts: 5408
Joined: 24 Jan 2010, 08:33
Location: A cathedral city in England

How can I tell if my PC is running in Safe Mode?

Post by John Gray »

Not something one does very often, but I was a little surprised to find that my domain logon script executed in the usual way when running an XP Pro PC in "Safe Mode with Networking".

I've checked the environment variables in Safe Mode and in Normal=Unsafe Mode, and can't see anything which would enable me to tell if the PC was running in safe mode.

Does anyone have any ideas of what might be checked from a BATch file? Thanks!
John Gray

"(or one of the team)" - how your appointment letter indicates you won't be seeing the Consultant...

User avatar
Claude
cheese lizard
Posts: 6241
Joined: 16 Jan 2010, 00:14
Location: Sydney Australia

Re: How can I tell if my PC is running in Safe Mode?

Post by Claude »

How about the environment variable %SAFEBOOT_OPTION%

SAFEBOOT_OPTION=NETWORK if you're booting in safe mode with network.
Cheers, Claude.

User avatar
John Gray
PlatinumLounger
Posts: 5408
Joined: 24 Jan 2010, 08:33
Location: A cathedral city in England

Re: How can I tell if my PC is running in Safe Mode?

Post by John Gray »

Thanks, Claude - I thought I'd checked all the environment variables but clearly I missed the obvious!
John Gray

"(or one of the team)" - how your appointment letter indicates you won't be seeing the Consultant...