DoRiMaN
Posts: 6
Joined: Fri Oct 07, 2005 7:27 am

Launching message boxes?

Tue Nov 29, 2005 9:28 am

Hi there,

is it possible to launch message boxes to tell the user that the installation of prerequisites and/or the installation of a setup with a basic user interface have finished?

When you install prerequisites, you can chose that the main application will be installed automatically. but even in this case, i'd like a message box to pop up, telling the user that the prereq. install has completed.
The same thing with the installation of setups with a basic UI. when the installation completes, a popup should popup, telling the user that the installation completed.

Is this possible? and how?

Thanks and Greetz

DoRiMaN

Ionut
Posts: 605
Joined: Tue Nov 22, 2005 11:29 am
Contact:  Website

Tue Nov 29, 2005 4:09 pm

Hi,

It is possible to do this by using custom actions.

a. To display a message box when the setup finishes:
  1. Switch to the Custom Actions page, right-click InstallExecuteSequence, then select:
    Show Standard Action -> Before Finalization -> Install Finalize
  2. Right-click InstallFinalize, then select New Custom Action -> Script Inline.
  3. Set the following properties for the custom action you just added:
  4. Set Source Type to Visual basic script (*.vbs) and in the Script Text field type:

    Code: Select all

    MsgBox "Installation has completed"
  5. To prevent the above message from being displayed when uninstalling the application, set the Execution Condition to: NOT (REMOVE="ALL")
b. To display a message box after the prerequisites have been installed (actually when starting the installation of the main application):
  1. Right-click InstallExecuteSequence, then select:
    Show Standard Action -> Before Initialization -> AppSearch
  2. Follow the same steps described above (just change the text displayed by the message box).
  3. You can use the Search feature of Advanced Installer to improve the execution condition. For example, you may choose not to display the message box if the prerequisites are already installed. Please visit the following link for details:
    http://www.advancedinstaller.com/user-guide/search.html
Hope this helps.

Regards,
Denis
Denis Toma
Advanced Installer Team
http://www.advancedinstaller.com/

DoRiMaN
Posts: 6
Joined: Fri Oct 07, 2005 7:27 am

Tue Nov 29, 2005 4:25 pm

Hi,

thank you very much for your help! It works fine!

Now I'm trying to get the Search (for the Message to not popup if prereqs are installed) working with more Prerequisites. But I don't know how to do it :(
I have four prerequisites looking for a file to install.

Could you please help me?

Thank you!

Regards,
DoRiMaN

Ionut
Posts: 605
Joined: Tue Nov 22, 2005 11:29 am
Contact:  Website

Tue Nov 29, 2005 6:14 pm

Hi,

First, you should be able to determine whether a specific prerequisite has been installed. In what follows I shall assume that FooFile.dll is installed by one of your prerequisites in [SystemFolder].
  1. Switch to the Search page, and select the New File Search button from the toolbar.
  2. Enter a name for this new property, let say P1.
  3. In the Name field type FooFile.dll.
  4. Right click this property and select Add Location -> Folder.
  5. In the Path field type [SystemFolder]. You can also set the depth of the search.
  6. Now switch to the Custom Actions page and select the action you added previously under AppSearch (the one that displays the message box informing the user that the prerequisites have been installed).
  7. Change the Execution Condition to:

    Code: Select all

    (NOT P1) AND (NOT (REMOVE="ALL"))
  8. The message box will be displayed only if FooFile.dll is NOT found in the [SystemFolder], that is only if the prerequisite has been installed.
This is just a simple example regarding the Search feature. Please visit the link from my previous post for more details.

Regards,
Denis
Denis Toma
Advanced Installer Team
http://www.advancedinstaller.com/

DoRiMaN
Posts: 6
Joined: Fri Oct 07, 2005 7:27 am

Wed Nov 30, 2005 2:44 pm

Hi,

I tried what you suggested me.

I created a new File Search for the .NET Framework 2.0.
Search Name: P_NET_FW
Name: mscoree.dll
Min Version: 2.0

For this File Search I added a New Location -> Folder
Path: [SystemFolder]
Search Depth: 0

These settings are the same I setted in the Prerequisites Tab.

When I launch the Custom Action with the Condition:

Code: Select all

P_NET_FW AND (NOT (REMOVE="ALL"))
The Message Box does always pop up.

But when I change the Condition to:

Code: Select all

(NOT P_NET_FW) AND (NOT (REMOVE="ALL"))
It never launches the Message Box.

What's wrong?

Could it be a Problem of the Max. Filesize in the File To Search settings? It automatically sets the Max. Filesize to 0.

PS: What would I have to set if i'd want to popup the message looking for more than 1 prereq? Is

Code: Select all

((NOT P1) OR (NOT P2))  AND (NOT (REMOVE="ALL"))
right?

Thanks and Greetz
DoRiMaN

brian
Posts: 39
Joined: Tue Nov 29, 2005 5:30 pm
Location: California, USA

Wed Nov 30, 2005 4:31 pm

I would not do a file search for .Net 2.0 as the version of mscoree.dll can exist as a different version than the installed framework.

See my post here on how I did it:
http://www.advancedinstaller.com/forums ... .php?t=844

Ionut
Posts: 605
Joined: Tue Nov 22, 2005 11:29 am
Contact:  Website

Wed Nov 30, 2005 5:30 pm

Hi,
But when I change the Condition to:

Code: Select all

(NOT P_NET_FW) AND (NOT (REMOVE="ALL"))
It never launches the Message Box.
The message box is NOT displayed in this case because the Execution Condition evaluates to False (the specified file exists in the [SystemFolder]).

You could also try to use a Registry Search as suggested by Brian.
What would I have to set if i'd want to popup the message looking for more than 1 prereq?

Code: Select all

((NOT P1) OR (NOT P2))  AND (NOT (REMOVE="ALL"))
right?
Yes, you are right.

Best regards,
Denis
Denis Toma
Advanced Installer Team
http://www.advancedinstaller.com/

Return to “Common Problems”