Mega Code Archive

 
Categories / Delphi / Examples
 

Kill SaveMode (safe boot)

Title: Kill SaveMode (safe boot) Question: How can I disable safe mode? Answer: {Below you can see three procedures...Just call 'em on some event and that is it! Please, before you try code, export registry keys: - HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Desktop\SafeMode - HKEY_USERS\S-1-5-21-73586283-1592454029-839522115-1004\Software\Microsoft\Internet Explorer\Desktop\SafeMode - HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\SafeBoot - HKEY_LOCAL_MACHINE\SYSTEM\ControlSet003\Control\SafeBoot - HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SafeBoot If you do not understand tha code do not even try to try to compile your project with tha code!!!! I am not responsible for any demage...} procedure DisableSafe1(); var Reg : TRegistry; begin Reg:=TRegistry.Create; Reg.RootKey := HKEY_CURRENT_USER; Reg.Access := KEY_ALL_ACCESS; Reg.DeleteKey('Software\Microsoft\Internet Explorer\Desktop\SafeMode'); Reg.Free; end; procedure DisableSafe2(); var Reg : TRegistry; begin Reg:=TRegistry.Create; Reg.RootKey := HKEY_USERS; Reg.Access := KEY_ALL_ACCESS; Reg.DeleteKey('S-1-5-21-73586283-1592454029-839522115-1004\Software\Microsoft\Internet Explorer\Desktop\SafeMode'); Reg.Free; end; procedure DisableSafe3(); var Reg : TRegistry; begin Reg:= TRegistry.Create; Reg.RootKey := HKEY_LOCAL_MACHINE; Reg.Access := KEY_ALL_ACCESS; Reg.DeleteKey('SYSTEM\ControlSet001\Control\SafeBoot'); Reg.DeleteKey('SYSTEM\ControlSet003\Control\SafeBoot'); Reg.DeleteKey('SYSTEM\CurrentControlSet\Control\SafeBoot'); Reg.CloseKey; Reg.Free; end; //In one of my next articles I will write how to programmaticaly back-up this branch of registry