I have a problem creating file associations in registry

Started by spick56, April 02, 2006, 02:31:24 AM

Previous topic - Next topic

spick56


Randem

spick56,
 
Since InnoScript doesn't create the registry entries in the script, you can include them in a templat file to be place in the resulting script that is created.
 
I have never used quotes around those items but the way to check to see if it is correctly entered is to check the registry after running the installation and check to see if the values match another program that has the same type of entry in the registry (just check another extention for associations). This should give you all the info you need to determine if you need the quotes or not and if you do where exactly they should be.

spick56

Hi randem,
Thanks for your response. Over the last few days I've been trying out a few things with the assistance from jrsoftware.innosetup forum and have basically resolved the problem. Initially I forgot to include the icon file and that is why it didn't work. Once the icon file was included all was OK, as far as association was concerned.
 
My new problem was that my application wasn't able to obtain (properly) the name of file being opened. After some more experimentation with App file name (.exe) entry in File Associations window of InnoScript tool, I had to enclose the entry in quotes in order to produce the following result in the output script and work properly in my application:
 
Root: HKCR; SubKey: GemRack.DocumentShellOpenCommand; ValueType: string; ValueData: {app}GemRack.exe %1, open; Flags: uninsdeletevalue; Tasks: Association1
 
On the other forum it was suggested that I also enclose %1 in quotes, however that gave me wrong values in some instances. Does all this make sense to you and do you think I should use double quotes in the App file name (.exe) field of InnoScript tool and should %1 also be enclosed in double quotes and if so, how could I do that from InnoScript tool (to avoid having to manually change it every time)?  
 
Thanks for your response.
 
/Michael

Randem

spick56,
 
InnoScript does not create registry entries. Perhaps you mean ISTool?
 
Anyway try:
 
Root: HKCR; SubKey: .gemr; ValueType: string; ValueData: GemRack.Document; Flags: uninsdeletekey; Tasks: Association1
Root: HKCR; SubKey: GemRack.Document; ValueType: string; ValueData: GemRack Document; Flags: uninsdeletekey; Tasks: Association1
Root: HKCR; SubKey: GemRack.Document\Shell\Open\Command; ValueType: string; ValueData: {app}\GemRack.exe %1, open; Flags: uninsdeletevalue; Tasks: Association1
Root: HKCR; Subkey: GemRack.Document\DefaultIcon; ValueType: string; ValueData: {app}\SplashFinal32.ico, -1; Flags: uninsdeletevalue; Tasks: Association1  
 
and change {app}\ to be whereever these files are located if they are not in the applications folder.

spick56

Hi,
I'm having a problem creating a file association. InnoScript creates the following lines however that doesn't seem to work. Basically I would like to associate gemr extension with GemRack.exe application, being installed here (the rest of the script being excluded from this post).
 
[Tasks]
Name: Association1; Description: Associate GemRack Document; GroupDescription: Associate Files:
 
[Registry]
Root: HKCR; SubKey: gemr; ValueType: string; ValueData: GemRack.Document; Flags: uninsdeletekey; Tasks: Association1
Root: HKCR; SubKey: GemRack.Document; ValueType: string; ValueData: GemRack Document; Flags: uninsdeletekey; Tasks: Association1
Root: HKCR; SubKey: GemRack.DocumentShellOpenCommand; ValueType: string; ValueData: GemRack.exe %1, open; Flags: uninsdeletevalue; Tasks: Association1
Root: HKCR; Subkey: GemRack.DocumentDefaultIcon; ValueType: string; ValueData: SplashFinal32.ico, -1; Flags: uninsdeletevalue; Tasks: Association1
 
Is there anything obviously wrong with the above lines?
 
Regards,
     Michael