(Yes, I understand that it is not related in any way to the BCM itself).
***WARNING*** BEGIN_TECHNICAL_NONSENSE
The wrapper performs these operations:
1. Check for presence of Microsoft Installer Runtime. If it's not installed, or if it's older than the version packaged inside the wrapper, then the wrapper installs the MSI Runtime, and reboots the system. Also, it registers the wrapper to be run again when the system reboots (via the RunOnce key).
(The wrapper .EXE has the MSI runtime distribution inside in a standard CAB archive)
2. The wrapper then searches for a temporary place capable of storing a .MSI package contained within the wrapper. This is exactly the place where integer overflow problems occur.
3. The wrapper extracts the .MSI package to chosen temporary location. Oddly, it does this multi-megabyte copying that can take several minutes completely in the background, without any possibility to cancel it except killing via the Task Manager.
4. After the .MSI is unpacked, the 'msiexec /i <.MSI file name>' (or similar command, I didn't test if it runs exactly this command) is launched.
5. The wrapper justs hangs until the msiexec process quits (probably with WaitForSingleObject or similar API call). After the msiexec quits, it removes all temporary files created, and exits.
6. The .MSI package itself works well (it copies the .MSI file to the temporary directory yet another time, but disk space detection is correct).
-----
Now, about the Nasty Bug that crippled into the Wrapper from the era of 60 mb hard drives
***WARNING*** BEGIN_EVEN_MORE_TECHNICAL_NONSENSE
The problem is that they use old GetDiskFreeSpace API for checking free space.
There is an ancient API 'GetDiskFreeSpace'. It returns only lower 32 (or sometimes 31) bits of free disk space. So, if you have exactly 4 GB free (that is, 4294967296 bytes), it will report as if you were having 0 bytes free on that drive (at least, that is the way it behaves under Win2K). If you have 8.01 GB free, for example, then the free space reported with this API will be only 0.01 GB.
(According to Windoze documentation, it's even wrapped to 2GB, not to 4GB.)
This is a quote from a MSDN page for this API:
The GetDiskFreeSpace function cannot report volume sizes that are greater than 2 GB.
To ensure that your application works with large capacity hard drives, use the GetDiskFreeSpaceEx function.
The GetDiskFreeSpaceEx function is available beginning with Windows 95 OEM Service Release 2 (OSR2), and you should use it whenever possible. The GetDiskFreeSpaceEx function returns correct values for all volumes, including those that are larger than 2 gigabytes.
How they (InstallShield) should have done it right (IMHO): since the GetDiskFreeSpaceEx is not available on ancient pre-OSR2 systems, directly importing GetDiskFreeSpaceEx would cause DLL link resolve errors when starting on pre-OSR2 win95. They should have tried to get the GetDiskFreeSpaceEx address via a GetProcAddress(hKernelDll,"GetDiskFreeSpaceExA") call, an if it fails, use the ancient GetDiskFreeSpaceA function (that's not a problem, since old Windoze didn't support large partitions anyway).
END_EVEN_MORE_TECHNICAL_NONSENSE
Getting the bug on your system:
Now, several words about how the Wrapper searches for a location. First, it will check (mis-check ) if your TEMP directory is capable of holding the .MSI package. If it succeeds, it will unpack the MSI for example, to "C:Documents and Settingsv0rtexLocal SettingsTemp_is2EBattlecruiser Millennium Demo E2.msi". If it thinks that your TEMP directory lacks free space, it will try to use other local drives. For example, I deliberately left 4.01 GB on my C: drive and it unpacked the .MSI file to "D:_is32Battlecruiser Millennium Demo E2.msi". But i am a bad boy and for the next run I left on the D: drive only 4.01 GB
Then I got this nice screen (it didn't even have text on a button):
OS used: Windows 2000 Pro (russian).
PS: I wonder why this tiny buggy MSI wrapper is even called InstallShield, the well-recognized brand name. The MSI technology is free (available for download from MS), why do they resell it under another name? Hmmm...i'm disappointed about it... In fact, I can write a better wrapper in a day or two (just some bragging )
Please forgive me for loads of USELESS technical NONSENSE, i just enjoy writing this crap
I think that this bug is already known, but I couldn't find an exact description of it on the board.
And of course,
Long Live BC !
Long Live the SC !

Help













