Video Screencast Help

How to add Launch condition in wise installer prerequistic.

Created: 18 Oct 2012 | 11 comments

Hi,

I am using wise installer. In that i added a framework as a prerequistic, but it work's fine.

But problem is it will launch the framework eventhough it's already installed and thrown a "Repair" or "Remove" prompt.

I want to skip the installation if that framework already installed.

So, one of the way to skip the installation is read the registry key based on that key skip the installation.

In that i donot know how to added the launch condition for prerequistic.

 

Comments 11 CommentsJump to latest comment

EdT's picture

Please take the time to specify exactly which Wise Installer you are using. For example, are you using Wisescript V9.2 or Wise for Windows Installer 3.52 or Windows Installer Editor from Wise Package Studio 7 SP3.

The way I would do this is to add code around the PreRequisite installation that checks to see if it is installed and then skips the install if it is found. As I don't know which tool you are using, or how exactly you have implemented the framework install in the first place, it is impossible for me to suggest a solution.

If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.

sathish046's picture

Hi,

 

Sorry for the Delay.

I am using Wise Installation Studio v7.4.0.214.

piyushnasa's picture

If you are using WISE package Studio, which I believe you would be, you can add a Launch Condition which checks for a particular file or registry related to your pre requisite.

You can do this by using System Search in WISE package studio. There are options to look for file/registry there. The depth in file one shows how deep level in subfolders you need to search. Get the output in a Public Property. If it will find it then it will be True else False.

So you can use this Public property in Launch Condition. If it is true it will install else it will fail.

 

Hope it helps.

Piyush Nasa Altiris Certified Professional (ACP)

http://msiworld.blogspot.com/

EdT's picture

Just make sure that if you follow piyushnasa's suggestion, you make sure that the System Search action is resequenced BEFORE the Launch Conditions action, otherwise you cannot use system search to set a launch condition. The standard Wise template has the launchcondition check before system search.

If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.

piyushnasa's picture

Yup, you are right like always :)

 

Piyush Nasa Altiris Certified Professional (ACP)

http://msiworld.blogspot.com/

sathish046's picture

Hi,

sorry for the delay.

I am using Wise Installation Studio v7.4.0.214.

you are rite, but problem is in that Launch Condition i cannot find my Property.

The Launch condition have only default property some thing like Windows NT Running, Windows 98.

EdT's picture

I suggest you set one of the existing Launch Condition options in the Windows Installer Editor, and then examine the actual string entered into the tables using setup editor. Then just change the entry in the table to match your property value. Clearly the Windows Installer Editor GUI cannot forsee every possible Launch Condition that users may want to apply, but they do provide the basics. It is up to you to apply any new Launch condition by directly editing the tables.

If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.

sathish046's picture

Hi,

I am able to change the condition of prerequisitcs in table, but problem is while i compiling the project it thrown an error "You have referenced the variable CONDITION1.  This variable has not been previously defined."

If add the condition in "CONDITION" table and refer the condition to "wisePrerequisities" table means, compilation is successful. but i trigger the prerequistics everytime.

EdT's picture

Can I assure you that we do not have any magical powers and therefore you must give precise information if you want us to help you.

You also need to be careful in specifying whether you are using a variable (normally Wisescript) or a property (normally Windows Installer Editor), again to avoid confusion. 

If you are setting the property CONDITION1 in the property table, what value are you assigning to it?

In the prerequisites conditions, how are you defining the TRUE/FALSE decision for the content of CONDITION1.

If you just use a property name in the condition field, then the condition will evaluate to TRUE if the property exists with any value, and FALSE if the property does not exist.

If you use a property in the form CONDITION1 = <some value> then the condition will evaluate to TRUE if the contents of CONDITION1 are set to <some value> and FALSE if the contents of CONDITION1 are set to a different value.

You also need to ensure that the System Search action is sequenced earlier than it is in the standard template, so that it occurs before LaunchConditions, otherwise the contents of your System Search property will not have been defined when Launch Conditions action runs. This was mentioned earlier in this thread, but can you confirm that you have actioned this point?

If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.

sathish046's picture

i already told in my trailing mail, i am using normally Windows Installer Editor.

I didnot set any property CONDITION1, then why it will created at compiling time.

 

EdT's picture

>i already told in my trailing mail, i am using normally Windows Installer Editor.

Where exactly?  I see references to "wise installer" and to "Wise Installation Studio V7" but nothing that refers to Windows Installer Editor specifically. I'm sure you are aware that Wise Installation Studio V7 includes both Windows Installer Editor AND Wisescript Editor.

I can see that English is not your first language, which makes it even more important to be sure which editor product you are using, as mixing the terms "variable" and "property" can otherwise cause confusion.

If the error message you have reported - "I am able to change the condition of prerequisitcs in table, but problem is while i compiling the project it thrown an error "You have referenced the variable CONDITION1.  This variable has not been previously defined."  is accurate, then the error would not appear to be arising from the Windows Installer Editor MSI compilation, but from something relating to Wisescript.

Are you compiling an MSI to EXE format?  Are you using any Wisescript Custom Actions in your MSI?

At this point, it becomes difficult to help solve the problem without seeing the project file and understanding exactly what compilation options you are using.

 

If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.