PDA

View Full Version : Incorrect install drive for user destination folder



GeoMEM
02-05-2009, 06:41 AM
This problem has just appeared in set-ups that worked correctly in ISX12, ISX2008 and ISX2009 - until the latest series of creating installers.

In addition to installing the main program and support files into the standard [ProgramFilesFolder] I install a series of specialist apps into their own folder which should be off the root of the current destination drive.
This folder is named: Matlab Apps

Other the past 12 months this has been correctly created and the apps installed on the destination drive.
So, if installing to drive C: the user folder is: C:\Matlab Apps

However, in the latest attempts ISX seems to have gone stupid....
It installs the folder onto another (higher letter) drive for no apparent reason (there is plenty of space on the install drive and all permissions are ok!)
So, if the main application is installed to:
C:\Program Files\... etc.

The Matlab Apps may appear on D:\MatLab Apps
If I temporarily remove drive D: letter from the system, ISX2009 will install to the next drive (E:\Matlab Apps).

So how do I force ISX2009 to create and install my folder on the requested INSTALLATION DRIVE rather than arbitarily deciding that it wants to put it somewhere else WITHOUT using VB Script? This function should be inbuilt - for example allowing a specifier such as: [INSTALLDRIVE]Matlab Apps under the user defined destination folder. But it isn't.

Why is ISX2009 now showing this aberrant behaviour when it was working in previous compilations of the system.

I don't want to hard code the drive letter (e.g. C:\) because the software could be installed on any drive.

Any help, comments greatly appreciated.

Thanks
James

GeoMEM
02-05-2009, 10:36 AM
We have found the solution - Use Inno Setup which allows great control over the installation process, is Open Source and customisable.

Sorry, InstallShield, after 10 years of use with your buggy but "paid for" installer which I can't customise nor see the scripts for, it's time for a new approach.

joshstechnij
02-06-2009, 08:36 PM
Please note that the drive that an installation defaults installing to is determined by the Windows Installer. InstallShield is not involved at runtime of an Express project in determining what drive letter is chosen. The Windows Installer will default to installing to the drive with the largest amount of free space available:
ROOTDRIVE Property - http://msdn.microsoft.com/en-us/library/aa371372(VS.85).aspx

Additional information can be found at:
Installing to TARGETDIR - http://blogs.msdn.com/heaths/archive/2007/07/12/installing-to-targetdir.aspx

GeoMEM
02-11-2009, 04:58 AM
Hi Josh

Thanks for your reply on this. It looks like it's problem with installing onto a drive with most space available - though why Windows Installer should decide that 24Gbyte available on the main Windows drive is too little space is beyond me.

It still leaves us with the problem that the installer (I accept that it is Windows component) is behaving in a way that is not intended when the installation is made up. And it seems an overly complex method of operation for a fairly simple process - especially when I compare Windows MSI to the smooth, fast, and on the whole, safe installation processes under Linux.
As Microsoft designed their installation process surely it is up to them to create a simple process rather than building layer upon layer of complexity that leads to many potential failure or problem points?

Regards
James

joshstechnij
02-11-2009, 04:26 PM
I'm not sure on why MSI chooses to set ROOTDRIVE/TARGETDIR to the drive with the largest amount of free space. This may have been a design decision for the original version of MSI created as a part of Office 2000, or it may have been a more general design to allow for distributing MSI packages through ActiveDirectory/Group Policy and allow for the MSI install to succeed if the Windows volume didn't have enough space but another attached drive did; I'm mostly speculating on possible reasons.

If you wanted to, you should be able to author the install to avoid installing to the largest drive with one of the following methods:
- Hard-code your install path to C:\YourPath in your Express project (this has an unfortunate side-effect of causing a 1606 runtime error if the C:\ drive is not present on a target machine)
- Use a custom action (VBScript or DLL) to force INSTALLDIR to be a path on the C:\ drive
- Use a path such as [WindowsVolume]\Program Files\Your Company\Your Product for the install path