TIP: CD/DVD Icon on XP...
Hello Everyone,
I know this isn't specifically NSIS related, but it IS installer related and drove me crazy. I have an autorun.inf file with the following contents (see below). When I burn the contents to a CD/DVD with the proper structure and autorun file, then place the disc in a drive, I don't get the desired or expected results.
My autorun.inf contains:
code:
[autorun]
open=myapps\setup.exe
icon=myicon.ico,1
label="MyStrangeSetup"
and my CD/DVD disc has the following structure:
myapps\Setup.exe
myapps\readme.txt
autorun.inf
myicon.ico
The autorun open portion works fine, but the icon only displays in Windows Explorer IF and only IF the Operating System is 95/98/ME/NT/2K but NOT XP.
In XP I do NOT get the icon associated. :-( It only shows the OS default icon.
Tried this on ~20 different machines, all the XP ones fail, all the others mentioned were tested and passed.
It is a Windows bug, have a cookie!
WAIT.. the answer is simple.
You CANNOT specify BOTH ICON and LABEL in the autorun.inf !
It produces inconsistent results, usually not showing the icon. Depending on the icon order, you may get other results on older Windows versions, as well.
The best way to do it? Label the disc properly in your burning app and just not use label= in autorun.inf. Removing the "label=" option solves the problem.
Oh, and keep the CD labeltext under 16 chars. There's another bug lurking there...
Hint:
If your burning software lets you set file burning precedence (such as Nero), set the autorun.inf to be low, and whatever program autoruns as well as the installer to
high. If the icon is its own .ico file, set that to low. Leave all other files at medium. This has helped me make discs that feel far more responsive on lower-end hardware (i.e. Win98 w/ 4x CD-ROM). Setting the priority to high also helps speed up the CRCCheck slightly.
Success creating better installers with NSIS.
Emin