Old 10th December 2009, 11:58   #1
thegrinch
Junior Member
 
Join Date: Jul 2005
Location: Saarland, Germany
Posts: 16
Send a message via ICQ to thegrinch
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
code:

[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
thegrinch is offline   Reply With Quote
Old 10th December 2009, 12:51   #2
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,531
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

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 10th December 2009, 15:56   #3
thegrinch
Junior Member
 
Join Date: Jul 2005
Location: Saarland, Germany
Posts: 16
Send a message via ICQ to thegrinch
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?
thegrinch is offline   Reply With Quote
Old 10th December 2009, 17:31   #4
Yathosho
Forum King
 
Yathosho's Avatar
 
Join Date: Jan 2002
Location: AT-DE
Posts: 3,366
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
Yathosho is offline   Reply With Quote
Old 10th December 2009, 17:40   #5
thegrinch
Junior Member
 
Join Date: Jul 2005
Location: Saarland, Germany
Posts: 16
Send a message via ICQ to thegrinch
Actually, I have burned (in every sense :-) ) over 10 cds today.

So, I really tried to have a realistic testing environment.
thegrinch is offline   Reply With Quote
Old 10th December 2009, 18:16   #6
Yathosho
Forum King
 
Yathosho's Avatar
 
Join Date: Jan 2002
Location: AT-DE
Posts: 3,366
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.
Yathosho is offline   Reply With Quote
Old 10th December 2009, 19:33   #7
thegrinch
Junior Member
 
Join Date: Jul 2005
Location: Saarland, Germany
Posts: 16
Send a message via ICQ to thegrinch
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?
thegrinch is offline   Reply With Quote
Old 10th December 2009, 21:13   #8
redxii
Senior Member
 
Join Date: Nov 2005
Posts: 115
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.
redxii is offline   Reply With Quote
Old 10th December 2009, 21:32   #9
thegrinch
Junior Member
 
Join Date: Jul 2005
Location: Saarland, Germany
Posts: 16
Send a message via ICQ to thegrinch
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.
thegrinch is offline   Reply With Quote
Old 11th December 2009, 20:17   #10
Leo77
Junior Member
 
Join Date: Dec 2009
Location: NY
Posts: 1
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.
Leo77 is offline   Reply With Quote
Old 13th December 2009, 00:09   #11
thegrinch
Junior Member
 
Join Date: Jul 2005
Location: Saarland, Germany
Posts: 16
Send a message via ICQ to thegrinch
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
thegrinch is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump