#141524 - 2005-06-14 02:16 AM
kix file assoc - a basic one
|
Lonkero
KiX Master Guru
   
Registered: 2001-06-05
Posts: 22346
Loc: OK
|
my green friend needed an easy way to access tokenizing and all that stuff, so I wrote him a basic script... Code:
$kixfile=readvalue("HKEY_CLASSES_ROOT\.kix","") if not len($kixfile) $kixfile = "KiXfile" endif $KXfile=readvalue("HKEY_CLASSES_ROOT\.kx","") if not len($KXfile) $KXfile = "KXfile" endif if not exist('%windir%\system32\'+@scriptexe) copy @scriptdir+'\'+@scriptexe '%windir%\system32\'+@scriptexe endif if not len(readvalue("HKEY_CLASSES_ROOT\"+$KXfile,"")) $=writevalue("HKEY_CLASSES_ROOT\"+$KXfile,"","KiXtart KX File","REG_SZ") endif if not len(readvalue("HKEY_CLASSES_ROOT\"+$KXfile+"\DefaultIcon","")) $=writevalue("HKEY_CLASSES_ROOT\"+$KXfile+"\DefaultIcon","","%SystemRoot%\system32\SHELL32.dll,76","REG_SZ") endif if not len(readvalue("HKEY_CLASSES_ROOT\"+$KXfile+"\shell","")) $=writevalue("HKEY_CLASSES_ROOT\"+$KXfile+"\shell","","Open","REG_SZ") endif if not len(readvalue("HKEY_CLASSES_ROOT\"+$KXfile+"\shell\Open\command","")) $=writevalue("HKEY_CLASSES_ROOT\"+$KXfile+"\shell\Open\command","",'"%windir%\system32\'+@scriptexe+'" "%%1"',"REG_SZ") endif if not len(readvalue("HKEY_CLASSES_ROOT\"+$kixfile,"")) $=writevalue("HKEY_CLASSES_ROOT\"+$kixfile,"","KiXtart Script File","REG_SZ") endif if not len(readvalue("HKEY_CLASSES_ROOT\"+$kixfile+"\DefaultIcon","")) $=writevalue("HKEY_CLASSES_ROOT\"+$kixfile+"\DefaultIcon","","%SystemRoot%\system32\SHELL32.dll,72","REG_SZ") endif if not len(readvalue("HKEY_CLASSES_ROOT\"+$kixfile+"\shell","")) $=writevalue("HKEY_CLASSES_ROOT\"+kixfile+"\shell","","Open","REG_SZ") endif if not len(readvalue("HKEY_CLASSES_ROOT\"+kixfile+"\shell\Open\command","")) $=writevalue("HKEY_CLASSES_ROOT\"+kixfile+"\shell\Open\command","",'"%windir%\system32\'+@scriptexe+'" "%%1"',"REG_SZ") endif if not len(readvalue("HKEY_CLASSES_ROOT\"+kixfile+"\shell\Edit\command","")) $=writevalue("HKEY_CLASSES_ROOT\"+kixfile+"\shell\Edit\command","",'"%windir%\system32\notepad.exe" "%%1"',"REG_SZ") endif if not len(readvalue("HKEY_CLASSES_ROOT\"+kixfile+"\shell\Tokenize\command","")) $=writevalue("HKEY_CLASSES_ROOT\"+kixfile+"\shell\Tokenize\command","",'"%windir%\system32\'+@scriptexe+'" "%%1" /t',"REG_SZ") endif if not len(readvalue("HKEY_CLASSES_ROOT\"+kixfile+"\shell\Debug\command","")) $=writevalue("HKEY_CLASSES_ROOT\"+kixfile+"\shell\Debug\command","",'"%windir%\system32\'+@scriptexe+'" "%%1" /d',"REG_SZ") endif
Edited by Lonkero (2005-06-14 03:55 AM)
_________________________
!download KiXnet
|
|
Top
|
|
|
|
#141530 - 2005-06-14 03:33 AM
Re: kix file assoc - a basic one
|
NTDOC
Administrator
   
Registered: 2000-07-28
Posts: 11629
Loc: CA
|
Associations are for the noobie GUI click happy people that don't know how to launch something on their own.
Can't believe I even see such from LINUX command-line basta 
|
|
Top
|
|
|
|
#141533 - 2005-06-14 06:18 AM
Re: kix file assoc - a basic one
|
Kdyer
KiX Supporter
   
Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
|
Quote:
Associations are for the noobie GUI click happy people that don't know how to launch something on their own.
Can't believe I even see such from LINUX command-line basta 
Doc - I agree to a point. If it is you developing the script then it is fine, but for the user populus - no way. I remember, MCA did an association with his KiXStrip/KiXRef programs too.
Kent
|
|
Top
|
|
|
|
#141537 - 2005-06-14 06:53 AM
Re: kix file assoc - a basic one
|
NTDOC
Administrator
   
Registered: 2000-07-28
Posts: 11629
Loc: CA
|
ROFLMAO
Well I'll be dipped in pig ^&%$
Would never have thought that Lonk.
Oh well, as long as it works the way you like, that's what counts. 
|
|
Top
|
|
|
|
Moderator: Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 1376 anonymous users online.
|
|
|