Archive: Autorun under windows 7


Autorun under windows 7
Hi,

I know that autorun issues are a bit offtopic here, but since we all have to deploy our apps from time to time :-), I think a few other prople should have encountered the same problem as me.

I am deploying 3 (NSIS-) installers on one CD, call them installer_a.exe, installer_b.exe, installer_c.exe.

I burn them on a cd together with a autorun.inf, which looks like


[autorun]
shell\insta\command=installer_a.exe
shell\insta=Installation of application A
shell\instb\command=installer_b.exe
shell\instb=Installation of application B
shell\instc\command=installer_c.exe
shell\instc=Installation of application C

On windows xp, this configuration will automatically execute installer_a.exe when inserting the CD.

---edit---
ah, I forgot to say that the three options are shown in the context-menu of the cd-drive in windows explorer.
---/edit---

On windows 7, it does not execute any installer, instead this windows-dialog pops up, asking what I want to do with the CD. This would be absolutely fine, if this dialog contained the 3 specified items "Installation of .."

How do you handle autorun issues under windows 7?
What about Windows vista?
To be honest, up to now I tried to circumvent all contacts to these new versions of Windows.

Thank you for your great support in advance,
best regards,
Olli

Is that the whole .inf file? You should have a open=app.exe (or shellexecute=foo) entry or shell=insta

As to why your items are not displayed, I don't know, but I do know that autorun has had issues with people faking the Open in explorer entry, so maybe they don't allow you to display a full list in 7


Thanks for your reply.

I have tested all these options:

shell=insta

open=installer_a.exe

but they don't work.

How do you all handle an autostart option on your cds?


how are you testing your autorun.inf? you might have to burn it on a cd (or create a cd image) to be certain. microsoft modified the default behaviour of autorun lately.

"In Windows XP, Windows Vista, and Windows Server 2003, AutoRun entries were populated for all devices that had mass storage and had a validly formatted AutoRun.inf file in the root directory. This included CDs, DVDs, USB thumb drives, external hard disks, and any volume that exposed itself as mass storage. This update disables AutoRun entries in AutoPlay, and displays only entries that are populated from CD and DVD drives. Effectively, this prevents AutoPlay from working with USB media."

-http://support.microsoft.com/kb/971029


Actually, I have burned (in every sense :-) ) over 10 cds today.

So, I really tried to have a realistic testing environment.


i just tested the original windows 7 dvd and it's autorun doesn't execute the installer (on windows 7). neither do i get an autorun option from the context-menu. holding the shift-key while opening the context-menu usually displays hidden entries - but nothing from the autorun.inf shows up. the only thing that works is the dvd icon being displayed.

so, it looks like this is the way windows 7 is supposed to behave.


hmm, so this sucks, or what?
there must be some way to have your app start when inserting the cd!
maybe they changed the whole procedure, and we're just too blind to see it?
What about vista? do the same problems occur there too?


Does "open=" at least present you a choice to run the installer? Starting with Vista they showed a dialog asking you what to do, one of the choices to run setup/installer.

Having programs automatically execute from a CD or other media when inserted is a really bad idea. It doesn't have to be from a John Doe, it can be a big name like Sony who stealthily installed their DRM rootkit via autorun, and exploiting the fact that most people always ran as administrator because that was how Windows set it up.


Yes, yes, I totally agrre with you.

What I want is *not* to open a setup or something like that (eg. a small selfmade menu that would take the users choice).

My cd will contain 3 installers, and I would really like to use this built-in feature of windows.

also, because I have never seen such a menu-helper app that looks good and works as expected everywhere.


Have you digitally signed the autorun? I've seen the updates I provide my customers not execute on Vista if it was not signed. I actually made my autorun with NSIS. I'll have to see if it displays on Win7.


No I did not sign the setup.

I have given up the idea of using the built-in options of windows. I will try to set up a small exe that offers a menu to the user