Rik HS
Posts: 8
Joined: Tue Sep 25, 2007 6:22 pm

CD Installation Problems

Tue Jan 22, 2008 4:36 pm

I'm having a couple of problems with installation from CD.

Installer is created with "Place files unpacked in folders next to MSI database" with a bootstrapper and an "Install the package" Autorun launcher with defines the CD label in the autorun.inf.

The installer is then written to a CD for duplication and distribution for customers.

Initial installtion works fine.

If (after installation and when the CD is not in the drive) Add / Remove Programs -> Modify is invoked to add a feature that is not installed by default then the "The feature you are trying to use is on a CD-ROM or other removable disk that is not available" dialog appears but the "Use source" popup is empty. Surely this should contain a disk label?

If the disk is inserted at this point and OK is pressed then an error message appears "The file " is not a valid installation package for the product <product name>. Try to find the installation package <product name>.msi' in a folder from which you can install <product name>.

Clearly these things should not happen. Is this a bug you need to fix?

The other issue is to do with autorun behaviour. When the CD is inserted the first time the installer autoruns, as it should. However, when the CD is inserted after the product is installed the installer still autorun's. This is not convenient and most products don't do this, ie. the autorun should detect that the product is installed and then do nothing. Can this behaviour be changed in Advanced Installer?

Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact:  Website

Tue Jan 22, 2008 5:36 pm

Hi,
If (after installation and when the CD is not in the drive) Add / Remove Programs -> Modify is invoked to add a feature that is not installed by default then the "The feature you are trying to use is on a CD-ROM or other removable disk that is not available" dialog appears but the "Use source" popup is empty. Surely this should contain a disk label?
Please note that this dialog is shown by Windows Installer, not by Advanced Installer (it is a normal behavior and it cannot be changed).

This dialog does not have a default value for the Source field because the installation uses the cached MSI (Windows caches the MSI package when installing an application). Since the MSI is cached, the SourceDir property is empty (nothing is displayed in the Source field).
If the disk is inserted at this point and OK is pressed then an error message appears "The file " is not a valid installation package for the product <product name>. Try to find the installation package <product name>.msi' in a folder from which you can install <product name>.
You receive this error because you have not specified a correct path for the MSI. If you use the "Browse" button and specify a correct path then the installation will be performed correctly.
This is not convenient and most products don't do this, ie. the autorun should detect that the product is installed and then do nothing. Can this behaviour be changed in Advanced Installer?
I'm afraid that this is not supported by Advanced Installer. However, you can use the "Launch installed file or Install the package" option which will launch your application if the package is already installed.

Also, I have added this feature on our TODO list and it will be available in the next version of Advanced Installer which is scheduled for the release in the next month. Thank you for your suggestion.

A workaround for this would be to use the "Launch installed file or Install the package" option and set it to run a dummy BAT file which does nothing if the application is already installed.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Rik HS
Posts: 8
Joined: Tue Sep 25, 2007 6:22 pm

Wed Jan 23, 2008 6:55 pm

Thank you for your prompt and helpfull reply Cosmin.

I'll look forward to the autorun enhancement, in the meantime I'll use the workaround as you suggest.

I did realise that the "Insert disk" dialog was from Microsoft Installer but was a little confused by your reply because I've seen this work on many products over the years. So I decided to have a dig around and I've found out how to make this work.

The problem is caused by the "Use source" popup being blank. Obviously users can browse for the msi on the CD (as you suggest) but this is not very friendly as apart from anything else the dialog says "Insert the CD and press OK" - which then fails because "Use source" is blank.

The way to make this work is to populate the DiskPrompt and VolumeLabel fields for media 1 in the MSI database Media table. If DiskPrompt is set to "<Product Name> CD" and VolumeLabel to something sensible (it doesn't actually seem to matter what this is, it works whether this matches the CD volume label or not) then the "Use source" popup contains the string from the DiskPrompt field. If you then press OK it finds the MSI on the CD and everything works. Whether it just looks in the drive that is recorded as the InstallSource registry value for the product, or just looks for CD drives I don't know (I didn't check that out) but populating the those fields in the Media table unlocks the functionality of this "Insert CD" dialog from Microsoft Installer.

It must cache these values somewhere (although I didn't find where) as editing the cached MSI does not change anything, it has to be in the MSI before it is installed.

I can make this work by editing the MSI using Orca once Advanced Installer has created it, but obviously it would be good if you can provide the means to fill in the Media Table fields for media 1 from within the Advanced Installer project. Maybe you can add this to your To Do list?

Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact:  Website

Thu Jan 24, 2008 8:57 am

Hi,

It seems that we overlooked this solution. I have added this improvement on our TODO list and it will be available in a future version of Advanced Installer.

Thank you for bringing this to our attention.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”