File Association Icon

Great to see the new Paquet Builder 3.2 and the help file showing how to add a template to File Association to our XLS Padlock .exe programmes. I have tried it and works great! I see there is a setting in the Action Template provided that the associated file uses the default icon of the .exe programme.

Defines the application that contains the icon for the extension (,0 indicates the ID of the icon in the EXE)
"%DESTPATH%\yourapp.exe",0

My question through this forum is can you make this a custom icon instead of use the default icon? … e.g., can you use/assign a icon to the associated file other than the default?

Thank you for any help and direction on this…

Sure, you can use your own icon, but it is better if it is in an EXE or DLL file. For instance, you can use our tool GConvert to compile your icon(s) into a DLL file.
Then add the DLL to the Paquet Builder installer, and reference it as: “%DESTPATH%\myfile.dll”,0 (0 for first icon) or “%DESTPATH%\myfile.dll”,1 (1 for second icon).

Register File Association… I still cannot get this to work. I have both Paquet Builder and Padlock needed to do this. Do you have a working example so I can try a build of my own icons and files to see if it works… Also I have 6 .exe files in a bundle and the template gives me a line to only work off one program… is there a way its can be associated to all of them since its a .xlsc file.

I still think adding this function to XLS Padlock would be a better idea… just the ability to add a custom icon for your .xlsc saved files… we dont even need them to be associated to the program just the ability to change the icon and customize it so it looks better …

Unfortunately, this cannot be implemented in XLS Padlock because this would require the compiled workbook to have administrative rights for modifying file associations. A Setup program is more pertinent.

If you have several EXE files, then yes, you shouldn’t associate one of them to all XLSC files. Based on your request, you can do this in Paquet Builder:

Select the entire XML code below, go to Custom Actions in Paquet Builder, Action Tools and click “Paste Block”. This will create the custom actions as shown as on the screenshot above.

<?xml version="1.0" encoding="utf-8"?>
<pbgroup><action GUID="VADNF"><type>TCommentInfo</type><desc>&lt;FONT color=&quot;clGreen&quot;&gt;&lt;I&gt;Registers .ext extension with ProgID MyExtensionDemo&lt;/I&gt;&lt;/FONT&gt;</desc><img>30</img><prop><Comment>Registers .ext extension with ProgID MyExtensionDemo</Comment></prop></action><action GUID="U70MI"><type>TWriteRegInfo</type><desc>Write &quot;default value=CompiledExcelWorkbook&quot; of the registry key &quot;.xlsc&quot;</desc><img>2</img><prop><RootKey>hkClassesRoot</RootKey><Key>.xlsc</Key><Value>CompiledExcelWorkbook</Value><ValueType>regSZ</ValueType><AddUninstRef>True</AddUninstRef></prop></action><action GUID="HARVA"><type>TWriteRegInfo</type><desc>Write &quot;default value=Excel Workbook Save&quot; of the registry key &quot;CompiledExcelWorkbook&quot;</desc><img>2</img><prop><RootKey>hkClassesRoot</RootKey><Key>CompiledExcelWorkbook</Key><Value>Excel Workbook Save</Value><ValueType>regSZ</ValueType><AddUninstRef>True</AddUninstRef></prop></action><action GUID="9RQD9"><type>TCommentInfo</type><desc>&lt;FONT color=&quot;clGreen&quot;&gt;&lt;I&gt;Defines the application that contains the icon for the extension (,0 indicates the ID of the icon in the EXE)&lt;/I&gt;&lt;/FONT&gt;</desc><img>30</img><prop><Comment>Defines the application that contains the icon for the extension (,0 indicates the ID of the icon in the EXE)</Comment></prop></action><action GUID="TF8UD"><type>TWriteRegInfo</type><desc>Write &quot;default value=&amp;quot;%DESTPATH%\yourapp.exe&amp;quot;,0&quot; of the registry key &quot;CompiledExcelWorkbook\DefaultIcon&quot;</desc><img>2</img><prop><RootKey>hkClassesRoot</RootKey><Key>CompiledExcelWorkbook\DefaultIcon</Key><Value>&quot;%DESTPATH%\yourapp.exe&quot;,0</Value><ValueType>regSZ</ValueType><AddUninstRef>True</AddUninstRef></prop></action><action GUID="HT9C6"><type>TCommentInfo</type><desc>&lt;FONT color=&quot;clGreen&quot;&gt;&lt;I&gt;Tells Windows what to do when the user wants to open a file with .ext extension&lt;/I&gt;&lt;/FONT&gt;</desc><img>30</img><prop><Comment>Tells Windows what to do when the user wants to open a file with .ext extension</Comment></prop></action></pbgroup>

Then you must replace %DESTPATH%\yourapp.exe by the path to your workbook EXE file. If your workbook is MyWorkbook.exe, then use %DESTPATH%\MyWorkbook.exe

You can also customize the description for instance.

Thanks!
I finally got this to work! Thanks for the code i could not get this to work from the template and I also think it may worked as it was important to use the custom code “After File Extraction” and not during installation…
As a work around to get the custom icon i wanted for my applications I created a protected .exe file name “_.exe” with the custom icon I wanted and and now with the Application files when I save it as an .xlsc it saves with the custom icon and labeled as the data file… See examples below screen shot: