detect save mode in Windows
Published: 26. January 2009 | Updated: 26. September 2011License: Microsoft Public License (MS-PL)
Categories: Windows
Tags: C# Windows Winforms
Import namespace
using System.Windows.Forms;
Code
if (SystemInformation.BootMode != BootMode.Normal) { Console.WriteLine("System is running in safe mode"); } else { Console.WriteLine("System is running in normal boot mode"); }
| Send us feedback about this snippet » |





