0

This question is related to my question about how to create a clean minimal setup here: 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!

Community
  • 1
  • 1
Mat
  • 11,263
  • 10
  • 45
  • 48

2 Answers2

0

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
  • 7,684
  • 12
  • 48
  • 76
0
  1. Right Click Installer Project
  2. View --> File System (on Target Machine)
  3. Right Click Application Folder-->Add-->Folder-->Rename Folder
  4. Right Click new Folder Created-->Add-->File-->Select Multiple Files
  5. Rebuild Setup Project

:) Happy Coding----------

Himalaya Garg
  • 1,525
  • 18
  • 23