To be able to use a notepad file check this out:
http://www.lavasofts...showtopic=56533After you done what it says below the easiest thing to do to restore your system is to use the system restore facility - Start -> Run -> msconfig. Good luck, it solved my problems!!
First you will need to restore the .exe file association. In notepad create a new file and enter all the text the the code box below:
CODE
' VBScript to restore .exe file association with Windows XP
Option Explicit
Dim strComputer
Dim objRegistry,objDictionary
strComputer = "."
Set objRegistry=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &_
strComputer & "\root\default:StdRegProv")
Set objDictionary = CreateObject("Scripting.Dictionary")
objDictionary.Add "HKCR",&h80000000
Call RegAddString( "HKCR", ".exe", "", "exefile")
Call RegAddString( "HKCR", ".exe", "Content Type",_
"application/x-msdownload" )
Call RegAddString( "HKCR", ".exe\PersistentHandler", "",_
"{098f2470-bae0-11cd-b579-08002b30bfeb}" )
Call RegAddString( "HKCR", "exefile", "", "Application" )
Call RegAddBinary( "HKCR", "exefile", "EditFlags", "38,07,00,00" )
Call RegAddString( "HKCR", "exefile", "TileInfo",_
"prop:FileDescription;Company;FileVersion" )
Call RegAddString( "HKCR", "exefile", "InfoTip",_
"prop:FileDescription;Company;FileVersion;Create;Size" )
Call RegAddString( "HKCR", "exefile\DefaultIcon", "", "%1" )
Call RegAddString( "HKCR", "exefile\shell", "", "" )
Call RegAddString( "HKCR", "exefile\shell\open", "", "" )
Call RegAddBinary( "HKCR", "exefile\shell\open",_
"EditFlags", "00,00,00,00" )
Call RegAddString( "HKCR", "exefile\shell\open\command", "",_
Chr(34) & "%1" & Chr(34) & Space(1) & "%*" )
Call RegAddString( "HKCR", "exefile\shell\runas", "", "" )
Call RegAddString( "HKCR", "exefile\shell\runas\command", "",_
Chr(34) & "%1" & Chr(34) & Space(1) & "%*" )
Call RegAddString( "HKCR", "exefile\shellex", "", "" )
Call RegAddString( "HKCR", "exefile\shellex\DropHandler",_
"", "{86C86720-42A0-1069-A2E8-08002B30309D}" )
Call RegAddString( "HKCR", "exefile\shellex\PropertySheetHandlers", "", "" )
Call RegAddString( "HKCR", "exefile\shellex\PropertySheetHandlers\PifProps",_
"", "{86F19A00-42A0-1069-A2E9-08002B30309D}" )
Call RegAddString( "HKCR", "exefile\shellex\PropertySheetHandlers\ShimLayer Property Page",_
"", "{513D916F-2A8E-4F51-AEAB-0CBC76FB1AF8}" )
Function RegKeyExists(rootkey, keypath)
Dim arrValueNames, arrValueTypes
If objRegistry.EnumValues(objDictionary(rootkey), keypath, arrValueNames, arrValueTypes) = 0 Then
RegKeyExists = True
Else
RegKeyExists = False
End If
End Function
Sub RegAddKey(rootkey, keypath)
objRegistry.CreateKey objDictionary(rootkey),keypath
End Sub
Sub RegAddString(rootkey, keypath, valuename, valuedata)
If Not RegKeyExists(rootkey, keypath) Then
Call RegAddKey( rootkey, keypath )
End If
objRegistry.SetStringValue objDictionary(rootkey),keypath,valuename,valuedata
End Sub
Sub RegAddBinary(rootkey, keypath, valuename, valuearray)
Dim arrValue(),arrHexValue,i,HexVal
arrHexValue = Split(Trim(valuearray),",")
i=0
For Each HexVal in arrHexValue
Redim Preserve arrValue(i)
arrValue(i) = "&h" & HexVal
i=i + 1
Next
objRegistry.SetBinaryValue objDictionary(rootKey),keypath,valuename,arrValue
Redim arrValue(0)
End Sub
In notepad now select file, select save, under "save in" use the pull down menu and select c:\regfixes and for file name enter xp_exe_fix.vbs and under "Save as type" use the pull down menu and select "All files".
Navigate to c:\regfixes and right mouse click on xp_exe_fix.vbs and select open. This will run the script and restore the registry keys associated with the exe file type. If you are running Ad-Watch if it pops an alert whilst this script is running you will need to accept the update to the registry.
Now the .exe file association is restored you will be able to run regedit.exe.