views:

267

answers:

1

Hi!

This question is related to my question about how to create a clean minimal setup here: http://stackoverflow.com/questions/1074013/how-to-create-a-robust-minimal-installer-for-windows

I managed to create a simple msi installer in visual studio 2008 that does nothing else than installing a .scn file into %systemroot% and it also adds an option to "Control Panel -> Add or Remove Programs". To provide the uninstall functionality, it automatically caches an msi file in %windir%/installer

The only problem left i have is that i'd like to use my custom icon (which i also use as icon for the .scn file) for the display within "Control Panel -> Add or Remove Programs". Visual Studio has the option to chose the "AddRemoveProgramsIcon", but it allows only to use .ico files that get actually copied to the destination computer.

I have found in the %windir%/installer folder a lot of folders with names like {FDD8070F-E3B9-0409-822C-CCFE5E82C14D} and many of them simply contain an icon file, so i guess it's exactly what i need to do - to create such a folder there and copy my icon into it.

My question is, what is the right way to create this folder (from within a Visual Studio 2008 Installer Project)? Should i use "add userdefined folder" and name it by hand, or is there a correct automatical way to create this folder? (such that for example if i update the product code of my project, that automatically also the name of this folder is adapted)

Thanks for the help!

A: 

Have you tried creating a custom installer class by following the instructions here:

http://msdn.microsoft.com/en-us/library/system.configuration.install.installer.aspx

Then during the Install method you could 'simply' create a folder in the Windows directory by using the variables of the Environment class.

I can't comment on whether or not adding the folder and icon there will solve your problem, but I'm pretty sure you could create the folder you want using this method.

Robba