View Full Version : Action after launch

04-04-2002, 05:29 AM

I need to perform different actions when clicking on a certain button within a scene. The first action is launching an installer that is also distributed on the same CD as the demo.

Is it in anyway possible to let the action after the launch only start when the user has ended the installation???
It seems that the action after the launch is executed as soon as the launch has been executed. Is doesn't wait until the program that has been launched, has ended.

At the start of this scene, I use some read registry events to set the initial state of the buttons. After a launch of a certain installer, I want to redo this read registry events to rescan the registry(because it has changed using a certain installer). My first thaught was to restart the scene from the beginning.

So my question: is it possible to use the restart scene after an installer has ended???

Thanks in advance.

Christoph Van Echelpoel

04-08-2002, 08:56 AM
To force the action to wait until the first launch application action has finished, you will need to make sure the Wait for Application to End option is selected. If this is selected and the action is not waiting, most likely the initial file being launched is simply launching another file and immediately closing. To keep this file open until the install has completed, try placing a /sms in the application command line.

For the Registry function you are trying to perform, if the Registry Key is placed in a Global Variable during setup the demo will only check these registry keys at the beginning of the demo. To be able to change the value of the registry keys, I would recommend using the Read Registry Key action. This action will allow you to read a registry key and place the value into a Global Variable at any time within your demo. If you want to check the registry key after the last install, you can use the action after the last Launch Application action. Then use a Trigger Event action to check the value returned.

I hope this helps.

04-10-2002, 01:58 AM

thanks for your help. When using /SMS, demoshield gets indeed only the control back if the installation program has ended.

But with the second point, the reading of the registry keys, I still encounter problems.

This is the situation: at the beginning of the scene(0.0 sec into scene time), I use an event to read a particular registry entry and store the value within a global string1. The next action within this event is a trigger of another event. This event evaluates the value stored within the global string.

If this string contains 'a' value, a button within the scene gets the text 'modify', if the string is empty(the registry key didn't exist), the button gets the text 'install'.
This works fine. Every time I re-enter this scene, the button gets the correct text.

When you click on the button when it got the 'install' text on it, an installer is launched for the first time (use the launch application with the /sms commandline). When the demo gets back the control, I use two set property actions for reset the start time of the two events I mention above. I put them respectively on 61sec and 62 sec start-time(my initial scene lenght is 60sec). After these set properties I use a trigger event to the read registry key event. I set the time property for this trigger event on 63 sec.
I should expect that the registry is read again and the global string updated so that the button text changes from 'install' into 'modify' but this is not happening.

Am I missing here something because I don't have any clue.

Can you help me?

Best regards,

Agfa Gevaert N.V.

04-10-2002, 03:33 PM
Are you using a Read Registry Key action to check the value of the Registry Key or are you setting a Registry Key within a Global Variable and then using an Event Object to check the returned value of the Registry Key and performing a comparison against that.

If you are setting a Registry Key in a Global Variable and then using a Global Variable to check the returned value, DemoShield will only check the value of this registry key at the start of the demo. Instead, I would recommend using the Read Registry Key action. This way the Registry Key will be read when the action is actually performed.

Also, you may want to consider duplicating the Event Objects and keeing two set to the start time of the scene and then setting the other two to a time outside of scene time. This way you do not need to use the Set Property action to reset the start time of the Event Object.

I hope this helps.

04-11-2002, 01:32 AM

many thanks for your fast answer but I found a solution myself.
I use indeed read registry key events.

I made a duplicate of the installation scene and when after a launch I got the control back, I do a 'goto duplicate scene'. As this is the same scene, the registry keys are read again at the beginning of the scene.

If the user clicks an installbutton within this scene, I do a 'goto original install scene' after I got the control back.

Maybe not the best solution in this way it is better for me to keep track of everything.