using v8.1.3
I have an advanced installer setup program for a usb mobile broadband dongle that includes as a prerequisite an external setup exe (not created by advanced installer) for the drivers (from the dongle manufacturer), and my application.
I have a utility to flash the CD image (as an iso) including my setup program onto the dongle.
The problem is that if my setup program runs beyond the msm merge module, then the dongle's cd-rom cannot be ejected by any software means (however, unplugging the dongle will of course cause Windows to recognize the cd as ejected).
This happens on Win 7 (64 and 32 bit), Vista and XP, so it doesn't appear to be OS-specific.
It worked fine when I was using a different setup program 2 years ago - it seems to be related to advanced installer somehow.
Here is what happens when you first plug the dongle into a machine:
1- the dongle enumerates as a generic cd-rom drive by Windows
2- my autorun.inf starts a C++ Windows app I created (called CDStart.exe) that does the following:
3- launches the setup (e.g. MySetup.exe) using ShellExecuteEx() windows api
4- waits for setup to complete using WaitForSingleObject() windows api on the the SHELLEXECUTEINFO.hProcess
5- calls my installed app with a param (inc. the CD-rom drive letter) to "eject" the CD
6 - exits
7 - my app (from hard drive) uses mciSendCommand with MCI_OPEN, then MCI_SET MCI_SET_DOOR_OPEN and then MCI_CLOSE MCI_WAIT (this code works when run directly from the hard drive and setup wasn't run off of the cd)
9 - once the cd-rom ejects (not physically, obviously), then the dongle gets enumerated as a mobile broadband modem and configures itself using the drivers that were installed by setup.
some important notes:
- if I change my CDStart to just launch the driver setup exe instead of MySetup.exe, then the cd will eject
- if I setup my machine such that MySetup run the driver setup exe, but then says that my main application is already installed with a same or newer version, the cd will eject
- in step 4, if I cancel MySetup after the driver gets installed, I believe that the cd will eject
- in step 4, I noticed that it takes a good 10 seconds before MySetup.exe disappears from Task Manager after I click the Finish button in the setup UI - is that normal? This is a fast intel core i5 machine.
- in step 4, it also then takes another 10 seconds before my CDStart.exe process exits, i.e. that WaitForSingleObject seems rather slow for some reason.
- in step 5, I used to just do the eject code listed in step 7 directly in CDStart.exe (and it worked, at least pre-Win7); I moved the eject code because I thought maybe Windows didn't like ejecting the cd-rom while code was being run that launced from the device; but that doesn't appear to be the case.
- in step 7, that code (taken from the Internet) works great at ejecting the dongle's cd-rom if I run it directly (i.e. I didn't just run setup from the dongle)
So what is the advanced installer created setup program doing that ties up the cd-rom?
thanks!
additional info on my advanced installer package Media settings:
- archive installation files into CAB files (compressed, one CAB file containing all files)
- bootstrapper: create EXE setup file, include install files in EXE, MSI location: included in EXE bootstrapper,
FOLLOW US
Get the latest news in Application Packaging