zimsms
9th September 2004 19:55 UTC
Autorun.inf not functioning properly on XP Prof.?
Hello Everyone,
I know this isn't specifically NSIS related, but it IS installer related. I have an autorun.inf file with the following contents (see below). When I burn the contents to a CD 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:
[autorun]
open=windows\setup.exe
icon=myicon.ico,1
label="Setup"
and my disc has the following structure:
windows\Setup.exe
windows\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 get the no icon associated icon. Any ideas?
P.S. I have tried this on 20 different machines, all the XP ones fail, all the others mentioned were tested and passed.
lewellyn
9th September 2004 21:57 UTC
You found a Windows bug, have a cookie! ;) I think there's a post around here somewhere about it, but 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.
--Matt
zimsms
10th September 2004 15:59 UTC
Thanks! Removing the "label=" option solved the problem. It's too bad though, now we have to remember to label the disc each time we burn the master cd. Thanks for the quick reply, it was much appreciated.
Cheers,
ZIMSMS
lewellyn
10th September 2004 20:32 UTC
Ya, it can be a pain. But take the opportunity to set all the fun fields like Publisher and Data Preparer, as well. :)
On the bright side, setting the label ensures that even users with autorun disabled will be able to see the disc's label. (As well as users not using 32-bit Windows, such as DOS, UNIX, and Linux...) Oh, and keep the label under 16 chars. There's another bug lurking there... :)
Another 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.
--Matt
zimsms
13th September 2004 13:06 UTC
Sweet. Thanks for the tips!