can't eject cdrom after setup is done - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

jtss
Posts: 15
Joined: Wed Nov 05, 2008 3:23 am

can't eject cdrom after setup is done

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,
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: can't eject cdrom after setup is done

Hi,

Is the package using Enhanced User Interface feature? You can check this in Themes page, Settings tab. If it is activated can you please disable it and try again?

To be sure that this is the problem you can replace our EXE with a normal MSI file, a test one, created with Advanced Installer or another third party MSI.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
jtss
Posts: 15
Joined: Wed Nov 05, 2008 3:23 am

Re: can't eject cdrom after setup is done

no, enhanced user interface is turned off (using Classic theme, fyi)
jtss
Posts: 15
Joined: Wed Nov 05, 2008 3:23 am

Re: can't eject cdrom after setup is done

never mind. it looks like something else is going on with the iso image.
Can you hide/delete this thread?
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: can't eject cdrom after setup is done

Hi,

There is no need to delete/hide the post.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”