IF setconsole("hide") ENDIF ; ; NT/95 notepad for unknown file associations - Kixtart 3.62, 363, 4.00 ; ; (c) scripting@wanadoo.nl - 2000, 2001 ; ; vs 2.03 - program (easily use notepad to open unknown file) ; ; 1.00 (20000715) original version ; 2.00 (20010325) - fix: correction for creation of "HKCR\unknown" registry settings. cleanup key first. ; 2.01 (20010401) - kixtart 2001 beta1 compliancy (fix ReadType) ; 2.02 (20010701) - kixtart 2001 RC1 compliancy ; - show completion information ; 2.03 (20011120) - layout corrections ; $prgm_version="2.03" IF (ExistKey("HKEY_CLASSES_ROOT\unknown") <> 1) $result=DelTree("HKEY_CLASSES_ROOT\unknown") $result=AddKey("HKEY_CLASSES_ROOT\unknown") $result=AddKey("HKEY_CLASSES_ROOT\unknown\Shell") $result=AddKey("HKEY_CLASSES_ROOT\unknown\Shell\open") $result=AddKey("HKEY_CLASSES_ROOT\unknown\Shell\open\command") ENDIF ; $ikey="HKEY_CLASSES_ROOT\unknown\Shell\open" $ikey_ex=ENUMVALUE($ikey, 0) $default_notepad="Quickview with Notepad" IF (ExistKey($ikey+"\"+$ikey_ex) = 0) $result_data_type=ReadType($ikey, $ikey_ex) IF (@error <> 0) OR (len($result_data_type) = 0) $result_data_type="REG_SZ" ENDIF ELSE $result_data_type="REG_SZ" ENDIF IF (WriteValue($ikey, $ikey_ex, $default_notepad, $result_data_type) = 0) IF (WriteValue($ikey, $ikey_ex, $default_notepad, "REG_SZ") = 0) ENDIF ENDIF ; $ikey="HKEY_CLASSES_ROOT\unknown\Shell\open\command" $ikey_ex=ENUMVALUE($ikey, 0) $default_notepad_exe="notepad.exe %1" IF (ExistKey($ikey+"\"+$ikey_ex) = 0) $result_data_type=ReadType($ikey, $ikey_ex) IF (@error <> 0) OR (len($result_data_type) = 0) $result_data_type="REG_SZ" ENDIF ELSE $result_data_type="REG_SZ" ENDIF IF (WriteValue($ikey, $ikey_ex, $default_notepad_exe, $result_data_type) = 0) IF (WriteValue($ikey, $ikey_ex, $default_notepad_exe, "REG_SZ") = 0) ENDIF ENDIF break on flushkb :end ? "Informative KIX "+@kix": create notepad for 'unknown file associations'."