views:

106

answers:

3

I have a setup CD to install a visual studio C++ application I made. It has three files: setup.exe, AUTORUN.INF, and app.msi. When I insert the CD the Windows AutoPlay popup shows a generic icon. How do I have my own icon displayed for setup.exe. I also want this for the drive icon after I insert the CD, I think they're related.

+2  A: 

I hate autostart.

In AUTORUN.INF, you can specify the drive icon just next to the setup program:

[AutoRun]
open=setup.exe
icon=*youricon*.ico
ypnos
Most of us, developers, hate autostart. But most of us also know how to navigate to the cd and decide if run the setup.exe bootstraper or the MSI file directly. Normal people need some help.
Sergio Acosta
Autostart does not only help users, you know... Sometimes (all times?) it's just not such a good idea to sacrifice security for comfort.
ypnos
+2  A: 

in the [autorun] section on AUTORUN.INF, add a line like:

icon=filename.ext

I believe the file can be an image file or an executable, in which case it will use the first icon resource.

Ferruccio
+2  A: 

You can specify an icon file in autorun.inf

icon=whatever.ico

I think you can also specify icons embedded in programs by putting the program/dll name then a comma and (i think) the icon number.

icon=whatever.dll,5
R. Bemrose