Jump to content
Sign in to follow this  
mpking

Boot into Safemode

Recommended Posts

I have two questions.

1. Has anyone written a script that will restart your computer and force it to boot into safemode

2. Is there a way to start a script automaticly in safe mode? (assuming you can get the computer to boot into safemode)

This is for a generic Cleaning CD i'm trying to make. Most of the students that my IT dept supports couldn't find the F8 button if it bit them.

Share this post


Link to post
Share on other sites

Well, I don't know about other operating systems, but in WinXP, you can edit your boot.ini to go into Safe Mode.

For instance, my boot.ini looks like this after I used msconfig.exe to turn on SafeBoot:

[boot loader]

timeout=30

default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS

[operating systems]

multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /fastdetect /noguiboot /NoExecute=OptIn /safeboot:minimal

Although I'm sure boot.ini varies from computer to computer, so you might be better off just having the script open up msconfig, navigate to the BOOT.INI tab, and check off the /SAFEBOOT checkbox.

Share this post


Link to post
Share on other sites

I believe it's a safe mode feature that nothing automatically runs....

Basically that's true. But windows starts what it needs to run (like explorer.exe or another shell) and it starts some basic services. So in theory you should be able to mark your script as a required service or as the shell.

But before you're asking: I've never done this, so I dont know how to do this or even if it's possible. And I think you should check if you really need safe mode for what you want to do.

Edited by sugi

Share this post


Link to post
Share on other sites

If it's possible that means nasty viruses could do bad things. I think safe mode is purposefully to avoid this, in the event you get a nasty virus.


"I thoroughly disapprove of duels. If a man should challenge me, I would take him kindly and forgivingly by the hand and lead him to a quiet place and kill him." - Mark TwainPatient: "It hurts when I do $var_"Doctor: "Don't do $var_" - Lar.

Share this post


Link to post
Share on other sites

I just came across this info which says:

By default, the value of a RunOnce key is deleted before the command line is run. You can prefix a RunOnce value name with an exclamation point :lmao: to defer deletion of the value until after the command runs. Without the exclamation point prefix, if the RunOnce operation fails the associated program will not be asked to run the next time you start the computer.

By default, these keys are ignored when the computer is started in Safe Mode. Starting with Windows NT 4.0 SP3, the value name of RunOnce keys can be prefixed with an asterisk (*) to force the program to run even in Safe mode.


Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...