'ExeFileFix.vbs - verifies the Registry, and restores the default values for .exe files '© Mikhail Zhilin, Microsoft MVP (DTS), mwz@aha.ru '15 Nov 2001 Option Explicit:Dim ws, t, e, v, q, Ask Set ws = WScript.CreateObject("WScript.Shell") t = "Verify and restore the default .exe values" e = ws.RegRead("HKEY_CLASSES_ROOT\.exe\") If e<>"exefile" then Ask = MsgBox("DANGER!" & vbcrlf & vbcrlf & _ ".exe default value is: " & e & vbcrlf & _ "instead of: exefile" & vbcrlf & vbcrlf& _ "Do you want to restore the default value just now?",20,t) If Ask = 6 Then ws.RegWrite "HKEY_CLASSES_ROOT\.exe\","exefile" Else Ask = MsgBox("Restore the .exe default value" & vbcrlf & _ "as soon as possible!",16,t) End If End If q=chr(34) & "%1" & chr(34) & " %*" 'i.e. "%1" %* v = ws.RegRead("HKEY_CLASSES_ROOT\exefile\shell\open\command\") If v<>q then Ask = MsgBox("DANGER!" & vbcrlf & vbcrlf & _ "Exefile default value is: " & v & vbcrlf & vbcrlf & _ "The name before " & q & " may be the virus name!" & vbcrlf & vbcrlf& _ "Do you want to restore the default value just now?",20,t) If Ask = 6 Then ws.RegWrite "HKEY_CLASSES_ROOT\exefile\shell\open\command\",q Else Ask = MsgBox("Restore the default value for exefile" & vbcrlf & _ "as soon as possible!",16,t) End If Else Ask=MsgBox("Exefile default value is already correct!",64,t) End If