[izpack-users] file type association
Csizmadia Peter
szocsp at freemail.hu
Mon Sep 17 08:27:08 CEST 2007
> I want to associate a file type (.sls) to my application. Unfortunately, the only documented method, https://izpack.github.io/wiki/how_to_associate_file_types_in_windows is wrong (let me not go into details, but I'm afraid the author has never even tried it). Even if it would work, the absolute paths appearing in the exported .reg file would make it impossible to use the same file in another installation.
> I think the right way is to make a RegistrySpec.xml. However, I'm not a windows expert to make such a file and I couldn't find any examples.
> d a working solution, see the end of this letter.
It is far from perfect.
A registry entry is not really good place for java command line options (-Xmx384m), because it can only be changed by a windows expert. Instead of directly running java, it would be better to run a script. I tried the open command 'wscript.exe "$INSTALL_PATH\bin\slideproject.vbs" %1', but it does not work, the file argument (%1) is not passed to my script. Even if it would work, another windows problem is that the virus scan software pops up annoying dialogs when running .VBS files. So the only improvement of using VBS instead of batch, is that the superfluous terminal window is replaced by an annoying virus warning.
It would also be good have file type associations on Linux and Mac.
If anyone knows how to improve it, then please let me know.
Peter
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<registry>
<pack name="Core">
<!-- -------------------------------------------------------------
Register the SlideProject.SLSFile type in HKLM\software\classes\.
It is also written automatically to HKCR\SlideProject.SLSFile.
------------------------------------------------------------- -->
<key root="HKLM"
keypath="software\classes\SlideProject.SLSFile"/>
<value root="HKLM"
keypath="software\classes\SlideProject.SLSFile"
name="" string="SlideProject Slides"/>
<!-- icon of .sls files in explorer -->
<value root="HKLM"
keypath="software\classes\SlideProject.SLSFile\DefaultIcon"
name="" string="$INSTALL_PATH\icons\slideproject.ico,0"/>
<key root="HKLM"
keypath="software\classes\SlideProject.SLSFile\shell"/>
<key root="HKLM"
keypath="software\classes\SlideProject.SLSFile\shell\open"/>
<value root="HKLM"
keypath="software\classes\SlideProject.SLSFile\shell\open\command"
name="" string='javaw.exe -Xmx384m -jar "$INSTALL_PATH\lib\slideproject.jar" %1'/>
<!-- -------------------------------------------------------------
Register the .sls file extension in HKLM\software\classes\.
It is also written automatically to HKCR\.sls.
------------------------------------------------------------- -->
<value root="HKLM"
keypath="software\classes\.sls"
name="" string="SlideProject.SLSFile"/>
<!-- -------------------------------------------------------------
Register the .sls extension in
HKCU\software\microsoft\currentversion\explorer\fileexts\open\.
------------------------------------------------------------- -->
<key root="HKCU"
keypath="software\microsoft\windows\currentversion\explorer\fileexts\open\.sls"/>
<value root="HKCU"
keypath="software\microsoft\windows\currentversion\explorer\fileexts\open\.sls\OpenWithProgIds"
name="SlideProject.SLSFile"><bin data=""/></value>
</pack>
</registry>
Kizárólag a Zeneáruházból töltheted le Király Linda legújabb maxiját.
http://zenearuhaz.t-online.hu/index.php?m=info&albumid=49331&sty=3
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.berlios.de/pipermail/izpack-users/attachments/20070917/59cba018/attachment.html
More information about the izpack-users
mailing list