# [SOLVED] Disable Safe Mode from Command prompt?



## fcojmejia (Mar 6, 2008)

Hi, my computer is infected with some type of malware, but in trying to fix it i might have caused more damage. 

Malware/virus had disabled the "Run" option from the start menu, as well as the Task manager. I tried to start it in safe mode (by rebooting/ F8/ Safe mode) but the computer would stop in the middle of the process and shut down. So i restarted the computer in normal mode, searched for msconfig and selected the option to start in safe mode by default. I somehow thought that doing so would guarantee that the safe mode process would be completed. Looking back, i should have thought it out better...

Now, the computer immediately tries to start in safe mode, but again it stops in the middle of the process and shuts down.

Is there any way to disable starting in safe mode from the command prompt? (since I can still access it through Recovery console)....

thanks for your advice


----------



## justpassingby (Mar 11, 2007)

*Re: Disable Safe Mode from Command prompt?*

Hi fcojmejia !

What happens when you press F8 at startup and choose last known good configuration or normal mode ?

If the above doesn't work you'll need to modify the boot.ini file. Checking the safe mode option in msconfig adds a /safeboot:minimal option at the end of the operating system line in the boot.ini file. You can either boot on an XP CD, enter the recovery console and type bootcfg /rebuild at the c:\windows\ prompt to rebuild a normal boot.ini file, or boot using another bootable CD that supports NTFS to edit the boot.ini file manually.

Once you're back in Windows follow these instructions to post a log and get some help from our security analysts about your malware infection.


----------



## fcojmejia (Mar 6, 2008)

*Re: Disable Safe Mode from Command prompt?*

Hi, thanks for your reply. I did what you suggested and now windows seems to start normally. i get to the point where i see my desktop but then windows logs off automatically. I see the Welcome screen, click on my username (the only account there is) but then im kicked off automatically again to the same screen. Any ideas?

thanks


----------



## Klint (Oct 18, 2007)

*Re: Disable Safe Mode from Command prompt?*

Can you do a system restore to a day or two back?

In safe mode Start > Programs > Accessories > Systems tools > System Restore


----------



## justpassingby (Mar 11, 2007)

*Re: Disable Safe Mode from Command prompt?*

I wouldn't use system restore to solve an infection issue, it won't get rid of everything and could come in the way of the future cleaning process.

If you can log in in safe mode (if your account doesn't work try the administrator account) I strongly suggest you post a log following these instructions : http://www.techsupportforum.com/f50...-posting-for-malware-removal-help-305963.html

Use an USB flash drive to transfer the needed programs and logs between your computer and one with internet access (don't try to go on the internet while in safe mode). Make sure the other computer has an up-to-date antivirus and firewall.


----------



## fcojmejia (Mar 6, 2008)

*Re: Disable Safe Mode from Command prompt?*

Whenever i try to boot in safe mode, I still get the same problem mentioned earlier, i.e. it stops in the middle of the process and shuts down. I notice it always happens when opening the file gagpkx.sys.

if i try to boot normally, it seems to open, displays the desktop background and then immediately logs off. There is only one user account at this Welcome screen.

Im stuck without being able to access windows normally or via safe mode.


----------



## justpassingby (Mar 11, 2007)

*Re: Disable Safe Mode from Command prompt?*

Press F8 at startup and try safe mode with command prompt. If you can get at the command prompt type sfc /scannow.

If safe mode with command prompt doesn't work then try the last known good configuration.

Do you have the XP CD ?


----------



## fcojmejia (Mar 6, 2008)

*Re: Disable Safe Mode from Command prompt?*

No Safe mode option is able to complete the process. Simple safe mode, with command prompt and with networking all reach to the same file and then reboot.

Last known good configuration starts windows normally, but then logs me off to the Welcome screen. Whenever i click on the (only) user account, it seems to open, displays the desktop background but before anything else happens, it logs me out automatically. 

I accessed the command prompt (via Recovery console, since it is the only way i can access it now) and typed sfc /scannow. I received the following error message: "The command is not recognized. Type HELP for a list of supported commands"

I have a bootable XP CD which i have been using to access command prompt. However it is from another computer i have with XP Pro, the computer with the problem is XP home. I am trying to get a bootable XP Home CD from a friend. 


So far i have tried Safe mode and Last Known Good. After pressing F8 i still have these options that i havent used yet: 

VGA Mode
Directory Services Restore Mode
Boot logging
Debugging mode

will any of them help? :sigh:


----------



## justpassingby (Mar 11, 2007)

*Re: Disable Safe Mode from Command prompt?*

Don't think the other options would help much.

- VGA Mode => uses another video driver, could give it a try but I doub't it'll help.
- Directory Services Restore Mode => only when you're on a domain.
- Boot logging => creates a c:\windows\ntbtlog.txt file with the drivers loaded and the ones that weren't loaded. It can help determining at what point the computer restarts but it's hard to use when you don't have a regular ntbtlog.txt to compare it with (the log gets overwritten at each startup).
- Debugging mode => sends informations to another computer using the com 2 ports. Never used it.

The recovery console only allows for a very limited set of commands, sfc is not one of them.

Enter the BIOS at startup, locate the hardware monitor screen and report the temps, fan speeds and voltages to make sure there's nothing wrong there.

In the recovery console type chkdsk c: /R. Once the scan is over (it'll take some time) retry to start in safe mode and normally.

Don't you have your own XP CD ? If this is an OEM installation (is this some brand computer ?) then tell us about it.


----------



## fcojmejia (Mar 6, 2008)

*Re: Disable Safe Mode from Command prompt?*

yes, it is an OEM installation. It's an Acer Aspire 5000 with WinXP Home.
I entered the BIOS but couldnt find a hardware monitor screen. However, the fan is quiet as usual, the overall temperature is normal and the fact that the computer manages to boot semi-normally (until it logs me off automatically and then remains at the welcome screen) makes me think it is not a hardware issue. I even left the computer on for approximately 2 hours after it ran chkdsk, and it didnt reheat or turn off.

I entered recovery console and run chkdsk. it gave me a volume serial number and the message that it was checking the volume and then that it was performing additional checking or recovery. The final results mentioned the total kb of disk space (47042880) and how many are available (16821024)

32768 bytes in each allocation unit
1470090 total allocation units on disk
525657 allocation units available on disk

that's it.

Also, since I ran bootcfg/rebuild earlier, i now have 3 boot options at startup: 
the original WinXP Home edition, one at the root directory (C:/) and another one at C:/Windows (im not 100% certain about the locations, though)

i tried them all again, and here's what happens:
- with WinXP home edition, it reboots constantly in safe mode (original problem)
- with the second option (C:/, i think) it happens what i described earlier: safe mode restarts endlessly, normal mode logs me off automatically to the Welcome screen.
- the third option (C:/ windows ?) gives me the following error message:
"Windows could not start because the following file is missing or corrupt:
\Minint\SYSTEM32\CONFIG\SYSTEM"

Is it normal to have these 3 options after bootcfg/rebuild? Could i repair this corrupt file? i looked for ways to do it, but the instructions i found warned against doing it for OEM 

as usual, your advice is greatly appreciated


----------



## justpassingby (Mar 11, 2007)

*Re: Disable Safe Mode from Command prompt?*

Since it's an OEM installation your repair options are limited. What's the exact model of the Acer laptop : 5100, 5110, ... ? Do you have the Acer recovery CD ? If you didn't get one with the computer then you were supposed to create it when you started the computer the first time, you can order it from Acer for a small fee if needed. The best option is probably to backup your data then use the recovery CD or the recovery partition to wipe the drive and restore the factory installation.

Here are some bootable CD's that should allow you to browse your data and save it on an external USB drive :
Knoppix
Ubuntu (download the 32bit CD here)
UBCD for Windows (requires a retail XP CD)

Else you can take the hard drive out, place it in a 20$ 2.5'' external USB enclosure (sata) and hook it to another computer to browse your files within Windows. If you get an access denied error trying to access your documents follow these instructions.

Once everything is backed up press Alt+F10 at startup to access the recovery partition or boot on the recovery CD.



> Windows could not start because the following file is missing or corrupt:
> \Minint\SYSTEM32\CONFIG\SYSTEM"


There are 2 issues with this warning : 
1) the recovery method can lock you out of the computer if used on an OEM installation.
2) the path (minint) isn't the path of your windows installation, it's either a leftover of a previous installation or it's part of the recovery partition. In both cases you don't want to mess with it.

Doing a repair install using a retail XP Home CD could work but you'll need to backup all your personal data beforehands to stay on the safe side. First uninstall IE7 using the recovery console. Then slipstream the service pack that was installed on the Acer into the XP CD : if the CD is XP Home SP2 and your computer was updated to SP3 you'll need to slipstream SP3 on the CD. Boot on the XP CD, press 'enter' to "setup windows XP now", press F8 to accept the licence, select your current installation and press 'R' to "repair the selected installation". If you don't get that option then exit and report here. Problems may arise if you're asked to provide a licence key during the installation, don't know if the retail XP CD will take your OEM acer product key.


----------



## justpassingby (Mar 11, 2007)

*Re: Disable Safe Mode from Command prompt?*

Just found this, give it a try :
http://thinkinginpixels.com/quick-fixes/fix-windows-xp-log-onlog-off-loop/


> Did you recently install some software, do a Windows Update, or run a Spybot: Search & Destroy scan with an older version of Spybot and now when you try and log on to Windows XP it automatically logs you off?


If you can get within Windows then follow the malware removal instructions link I gave in post #2.


----------



## fcojmejia (Mar 6, 2008)

*Re: Disable Safe Mode from Command prompt?*

i backed up all my data and used the recovery disks to restore the factory installation. it seemed faster than trying to fix that booting issue and then clean the trojan that infected my machine.
Thank you all for your suggestions, especially to justpassingby


----------

