Tuesday, July 13, 2010

Automatically Boot into Safe Mode

This batch file will backup your current boot.ini file, then add two safe mode options to your boot.ini file.
One is the same you would get when pressing F8 and choosing Safe Mode, the other is the just the minimal safe mode with no logging or display of drivers.
Copy the text in the code block into Notepad and save the file on your desktop as addsafe.bat (Be sure to change the Save as Type box in Notepad's Save dialog to All Files)
Double click the file to add the Safe Mode options.
Double click again to remove them.

Code:
@Echo Off
SetLocal EnableDelayedExpansion
PushD %SystemDrive%\
If Not Exist boot.ini Echo Unable to locate the boot.ini file&Goto _End
Attrib -H -R -S boot.ini
If Exist boot.TO~ (
Attrib -H -R -S boot.TO~
Del Boot.ini
Ren boot.TO~ boot.ini>Nul
Echo Safe Mode options have been removed from the boot menu
Goto _End
) Else (
Copy boot.ini boot.TO~>Nul
Attrib +H +R +S boot.TO~
)
If Exist boot.tmp Del boot.tmp
For /F "Tokens=1,2 Delims==" %%I In (boot.ini) Do (
Set _line=%%I
If /I "%%I"=="default" Set _Def=%%J
If "!_line:~0,1!"=="[" (
>>boot.tmp Echo.%%I
) Else (
>>boot.tmp Echo.%%I=%%J
))
>>boot.tmp Echo.%_Def%="Windows XP Safe Mode (minimal)" /safeboot:minimal
>>boot.tmp Echo.%_Def%="Windows XP Safe Mode (F8)" /safeboot:minimal /sos /bootlog /noguiboot
Del boot.ini
Ren boot.tmp boot.ini
Echo Safe Mode options have been added to the boot menu
:_End
Attrib +H +R +S boot.ini>Nul
PopD
Pause

Tuesday, July 6, 2010

Can't open EXE files

SYMPTOMS
When you try to open EXE files, you may get errors messages like: "Access Deny",...

When you try to open EXE files, you may get errors messages like: "Access Deny", "Runtime error" etc.

CAUSE
Corrupt registry settings or some third party product (or virus) can change the...

Corrupt registry settings or some third party product (or virus) can change the default configuration for running EXE files. This may lead to failed operation when you try to run EXE files.

1. Click Start, and then click Run.


2. Type "command.com" , and then press Enter. (A DOS window opens.)


3. Type the following:

"cd\"

"cd \windows"

Press Enter after typing each one.

4. Type copy "regedit.exe regedit.com" and then press Enter.

5. Type "start regedit.com" and then press Enter.

6. Navigate to and select the key:

HKEY_CLASSES_ROOT\exefile\shell\open\command

7. In the right pane, double-click the (Default) value.

8. Delete the current value data, and then type:

"%1" %*

Tip: Type the characters: quote-percent-one-quote-space-percent-asterisk.

9. Close Regedit utility.


Note: If you are using Windows XP and you enable "System Restore" , you need to
disable "System Restore" in "Safe Mode" before using the instructions above.