Revenera Documentation site will be unavailable on July 2nd due to scheduled maintenance. For more information see the status dashboard.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
overlordchin
Level 6

Installscript questions

Is it possible to have a custom dialog and or buttons in a dialog in an installscript project or is that limited to an msi project? If it is possible where can I find information related to going about this particular task?

Also what is the equivalent of cout / printf / debug from various languages to see the value of a variable? Do I need to out put the var to a log just to check the value?

If I am wrapping to other installers and I cancel midway through one but the other has already completed I want to be able to roll back the install. But it seems to only catch the current installer. I think its calling LaunchAppAndWait
can i just capture the result of this number nResult = LaunchAppAndWait?
If not what is the recommended way to go about catching the result and rolling back both installers based on it?


Thanks in advance for any assistance or advice
Labels (1)
0 Kudos
4 Replies
overlordchin
Level 6

overlordchin wrote:
Is it possible to have a custom dialog and or buttons in a dialog in an installscript project or is that limited to an msi project?


Yes it is possible to have both custom buttons and custom dialogs. If you click on the dialogs section of the IDE in an install script project then click on the "All Dialogs" folder. Once it is selected either his insert or right click and select new dialog to add a custom dialog. To add a custom button select your dialog and on the menu bar look for a small graphic icon that says 'ab' and if you hover over it the context popup displays 'push button' You can select this and drag the appropriate desired size on your dialog and the new button will appear. You will have to add code where appropriate in your install scripts for the button to do anything.


I still could use help with the other issues I mentioned. If anyone has any information please post.
0 Kudos
overlordchin
Level 6

I can't be the only one who has ever tried this?
0 Kudos
overlordchin
Level 6

overlordchin wrote:
Also what is the equivalent of cout / printf / debug from various languages to see the value of a variable? Do I need to out put the var to a log just to check the value?


The easiest way I have found is to use a MessageBox() dialog which pops a dialog box and allows you to display the contents of a variable or a string you wish to display. EX: MessageBox(szVariableHere, WARNING);
where szVariableHere is a string variable containing what you want to check.

overlordchin wrote:

If I am wrapping to other installers and I cancel midway through one but the other has already completed I want to be able to roll back the install. But it seems to only catch the current installer. I think its calling LaunchAppAndWait
can i just capture the result of this number nResult = LaunchAppAndWait?
If not what is the recommended way to go about catching the result and rolling back both installers based on it?
thanks in advance for any assistance or advice

yes you can capture the results of LaunchAppAndWait in this manner. However, see the following two posts for additional details and problems associated with this:
http://community.flexerasoftware.com/showthread.php?t=137980

http://community.flexerasoftware.com/showthread.php?t=140619


It looks like even if you cancel midway through an install called by LaunchAppAndWait, you still get a 0 return (successful) as it launched successfully. So if you want to catch the value and roll back another install based on the results you will have to use some other method. If I figure it out I will post it here. If anyone else knows it please post it.
0 Kudos
overlordchin
Level 6

overlordchin wrote:

If I am wrapping to other installers and I cancel midway through one but the other has already completed I want to be able to roll back the install. But it seems to only catch the current installer. I think its calling LaunchAppAndWait
can i just capture the result of this number nResult = LaunchAppAndWait?
If not what is the recommended way to go about catching the result and rolling back both installers based on it?

Thanks in advance for any assistance or advice


So what I found is that InstallShield automatically handles an event for this and provides the OnCanceling() function for this purpose.

If you define a method for the event you can have your own custom cancel event. Look in the help for installshield and search for OnCanceling for an example of this.
0 Kudos