antiviruscoder Posted August 1, 2007 Share Posted August 1, 2007 I was wanting to know if there is a code i can insert into a script to get a computer to reboot in safe mode? I allready know how to do it manually but I was wanting to automate it so that it doesnt take as long. basically im looking for a code that when ran, will force the computer to reboot into safe mode. [center][spoiler]My little joke!!!![/spoiler][/center][center]!!!!!!!!!!!!!!!!!!!!!!!!!!!!![/center][center]Best code site ever[/center][center]!!!!!!!!!!!!!!!!!!!!!!!!!!!!![/center][center][spoiler]My litte joke!!!![/spoiler][/center] Link to comment Share on other sites More sharing options...
antiviruscoder Posted August 1, 2007 Author Share Posted August 1, 2007 Come on ppl, nobody knows? Im not going to use this for anything bad in fact, i dont think it could be used in a bad script. Even if it could, im not so childish that I would use auto it for anything like that. [center][spoiler]My little joke!!!![/spoiler][/center][center]!!!!!!!!!!!!!!!!!!!!!!!!!!!!![/center][center]Best code site ever[/center][center]!!!!!!!!!!!!!!!!!!!!!!!!!!!!![/center][center][spoiler]My litte joke!!!![/spoiler][/center] Link to comment Share on other sites More sharing options...
qazwsx Posted August 1, 2007 Share Posted August 1, 2007 is there an option to reboot in safe mode. I think safe mode is dependent on accessing something during startup. And i don't know if you could do that. What os do you have? Link to comment Share on other sites More sharing options...
antiviruscoder Posted August 1, 2007 Author Share Posted August 1, 2007 vista [center][spoiler]My little joke!!!![/spoiler][/center][center]!!!!!!!!!!!!!!!!!!!!!!!!!!!!![/center][center]Best code site ever[/center][center]!!!!!!!!!!!!!!!!!!!!!!!!!!!!![/center][center][spoiler]My litte joke!!!![/spoiler][/center] Link to comment Share on other sites More sharing options...
MHz Posted August 1, 2007 Share Posted August 1, 2007 vistaHave a look at BCDEdit.exe. It does not mention Safe Mode explicitly but it may do it. Just use BCDEdit /? at the command prompt to see options. Use BCDEdit only to enumerate the active settings. Link to comment Share on other sites More sharing options...
weaponx Posted August 1, 2007 Share Posted August 1, 2007 I'm not sure if this is legit or not but:http://www.superadblocker.com/bootsafe.htmlBootsafe prompts for reboot type:Safe mode minimalSafe mode with networkingSafe mode directory services repair Link to comment Share on other sites More sharing options...
bluebearr Posted August 1, 2007 Share Posted August 1, 2007 Here is how to force a boot into safe mode (Windows 2000/XP/2003, tested [manually] on Windows XP):Suggestion: Backup C:\boot.ini , since if you screw up the computer may not boot. If the computer won't boot, you can restore this copy using the recovery console.$myboot = IniRead("C:\boot.ini", "boot loader", "default")Read through C:\boot.ini line by line and store in a variable ($newBoot). When you get to the line "[operating systems]", add the following line: $myBoot & '="Safe Mode" /safeboot:minimal /sos /bootlog' NOTE: This MUST be the first value of the "[operating systems]" section, and the key will duplicate your normal boot option, so I don't think you should use INIWrite to write this value. But you may be more adventurous than I. Write out $newBoot to a new boot.ini file (like c:\boot2.ini). Verify that everything is right in the file. Then copy back to C:\boot.ini. Note that boot.ini is often read only and hidden.When you reboot, the computer will look at the default boot option and take the first one that matches from the "operating systems" section. Even though there will be two matches, your Safe mode boot will be first, and so it will take precedence.You might also want to change the value of 'timeout' in the 'boot loader' section so that the user doesn't have a chance to change to the normal boot. The normal boot will still be there, and if you are fast you can still get to it with the F5 key, but most users won't know this.If you are adventurous, you can just grab the default boot option and then write a new Safe Mode boot into that option under "operating systems" using INIWrite. But I like how with the procedure above you preserve the normal boot option. In a pinch you can walk someone through pressing F5 and choose this option if need be. BlueBearrOddly enough, this is what I do for fun. Link to comment Share on other sites More sharing options...
flyingboz Posted August 1, 2007 Share Posted August 1, 2007 one could also use MSCONFIG to perform this function. Not sure about vista support, but version of MSCONFIG will function from win98 to XPP. Reading the help file before you post... Not only will it make you look smarter, it will make you smarter. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now