View Full Version : Where to put DoInstall ???
rcloutier
09-16-2002, 03:42 PM
Hi,
Here's my case: when a specific component is checked for the installation (custom install), a DoInstall needs to perform a silent setup.
1. Where to put the DoInstall instruction when OnFirstUIBefore event is done (after SdStartCopy2 dialog box)? All this to let the user cancels the setup...
2. Also, how to keep a live ProgressBar while installing a child setup? I do not want the setup to be lock at 76% about 10 sec (for example...) Something like passing the percentage in a parameter...
I tried Component1_Installing() but the ProgressBar already indicates 100%...
I have seen Document ID: Q105040
(HOWTO: Passing the Parent Setup TARGETDIR to a Child Setup That is Being Launched By the Parent)
"[...] In order to pass the correct TARGETDIR to the child setup, you must launch the child setup in an event that is executed after the OnFirstUIBefore() event[...]"
Yes but where's the best event ???
Thanks a lot for help,
Rejean Cloutier
StefanPaetow
09-17-2002, 09:45 AM
First, have you made provision for the space required by the silent setup? If not, do so before the SdStartCopy2 dialog, or factor that into your component somehow.
Second, you can use the OnMoving event. Just make sure the code for the silent install tests the REMOVEALLMODE variable (if it is FALSE, you can proceed, if it is non-FALSE, your install is in UNINSTALL mode).
Place your code BEFORE the ComponentTransferData call. This call is the actual file copy process. It will call the OnMoving and OnMoved events, as well as each component's OnInstalling and OnInstalled (or OnUninstalling and OnUninstalled) events.
Stefan
rcloutier
09-17-2002, 02:41 PM
Hi Stefan,
The child setup component is empty - no files at all.
So I get the space required from the \CHILD\data2.cab file size... I know it's an approximative space but it's not so bad: .cab file includes 2 demoshield .dbd files: one in french and another in english installed depending on the SELECTED_LANGUAGE...
Question:
Do you have an idea on how to increase the setup size programmatically?
I guess the percentage is calculated using the cumulative size of all selected components within the setup. All this is to get a real % processing - like adding 40 mb on the total setup size.
I just want entering into the Child_Installing event with a percentage below 100%...
Thanks a lot for reply,
Rejean Cloutier
StefanPaetow
09-18-2002, 05:56 AM
If anything, you would have to create a script media set and display that instead and then select and unselect the items in your file media depending on the options selected in the script media.
Alternatively, can't you include your .DBD files in separate filegroups in the main install and set the language for the filegroups and then call ComponentFilterLanguage to filter out the unwanted language?
Stefan
rcloutier
09-18-2002, 08:04 AM
Here's my case:
Menu setup (built with DemoShield) autorun on the CD.
3 CommandButtons let you start-up 3 different setups:
"Complete Software", "Software Demo" and "Software Tutorial".
"Complete Software" is the main setup and is divided into 3 components: [SOFTWARE], [DEMO], [TUTORIAL]. The 2 lasts components are empty: that is, when selected (by default and can be deselected in the custom install window) 2 child setups are called using DoInstall -s parameter.
The problem is that when running the main setup, [DEMO] and [TUTORIAL] components are installed without a ProgressBar: 100% is displayed about 1 min...!"/$%?&*()
Your solution is to have 2 times the [DEMO] and [TUTORIAL] packed on the CD (about 40 mb each); both on the main setup and on the child setups: I don't think it's the best solution... but maybe the only one...
Are InstallShield Support there (email support is not so great)???
DevinEllingson
09-18-2002, 09:08 PM
rcloutier,
It is not possible for the setup to continue to update the status bar based on file transfer not controlled directly by the setup, as the setup doesn't run during this time, so it would not know when to do this.
There are several possible approaches I can think of to solve this problem:
1. Display an SdShowMsg during the DoInstall, this is similiar to how the 7.x objects (MDAC etc.) work when you specify the StatusText parameter.
AND/OR
2. Instead of calling StatusUpdate(ON, 100) call it with (ON, 90), launch the EXE then update it 100 after the DoInstall is completed, that way it looks like the setup is not finished.
Also, note that you can temporarily disable status updating during file transfer if you want by calling StatusUpdate(OFF, 0) and then StatusUpdate(ON,100) after, this is useful if you need to do an XCopyFile or something in the middle of file transfer.
Devin Ellingson
InstallShield Software Corporation
rcloutier
09-19-2002, 07:55 AM
Hi Devin,
It would be nice to have 2 ProgressBars something like:
In main setup:
ShowProgressBar (2, TRUE);
DoInstall ("setup.exe", "-s", ...);
ShowProgressBar (2, FALSE);
In child setup:
If MODE = SILENTMODE Then
SetProgressBar (2, 0, 100);
Endif;
Just an idea...
I solved my problem including files on both setups but without compressing within cab file (directly on a CDROM folder). That way, files are only one time on the CD and anyway, DemoShield .dbd files was already compressed...
Thanks a lot for help,
See ya!
Rejean Cloutier
DevinEllingson
09-19-2002, 07:06 PM
rcloutier,
I'm not sure what you mean by 2 progress bars, do you mean a smaller (sub) progress bar?
Devin Ellingson
InstallShield Software Corporation
rcloutier
09-20-2002, 07:49 AM
Hi Devin,
You're right.
A Main ProgressBar always visible including all processes (main setup an child setups) and another one only visible when a child setup is started (a call to DoInstall function) and including only that child setup process.
Only a suggestion (I solved my problem using CDROM folder; that is, files are included in the 2 setups but are present only one time on the CD - data as files)
Thanks for listening... :)
See ya!
Rejean Cloutier
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.