By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,552 Members | 905 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,552 IT Pros & Developers. It's quick & easy.

Installer Project - Conditions on Custom Action

P: n/a
I have an installer project for my VB.net application which as a custom
action runs a silent installation of a third party software product.

This however, generates an error if the application is already installed.

I therefore want to check if the application is already installed before
launching the setup.exe to install it.

I know I use the "condition" property on the custom action - but what
exactly do I put in as a condition if I want to check for a file existing
and if it is to not run the setup.exe?

Thanks in advance
Simon

--
================================
Simon Verona
Dealer Management Service Ltd
Stewart House
Centurion Business Park
Julian Way
Sheffield
S9 1GD

Tel: 0870 080 2300
Fax: 0870 735 0011
Apr 5 '06 #1
Share this Question
Share on Google+
5 Replies


P: n/a
If a launch condition fails i.e the check returns false, you will get a
message and setup will fail. This is how the installer works. If you are
sure that administrators will install the application then you can put a
registry key and then use that key to check if you are application is
installed, in the launch condition. This will be easy, as you don't have to
do custom actions for this. Let me know if you need more help

VJ

"Simon Verona" <no****@nomail.zzz> wrote in message
news:em**************@TK2MSFTNGP05.phx.gbl...
I have an installer project for my VB.net application which as a custom
action runs a silent installation of a third party software product.

This however, generates an error if the application is already installed.

I therefore want to check if the application is already installed before
launching the setup.exe to install it.

I know I use the "condition" property on the custom action - but what
exactly do I put in as a condition if I want to check for a file existing
and if it is to not run the setup.exe?

Thanks in advance
Simon

--
================================
Simon Verona
Dealer Management Service Ltd
Stewart House
Centurion Business Park
Julian Way
Sheffield
S9 1GD

Tel: 0870 080 2300
Fax: 0870 735 0011

Apr 5 '06 #2

P: n/a
I'd like to put in a test to see if a specific file exists on the system -
on the basis that if it is then the application is installed... What
exactly would I put in to achieve this ?

Thanks
Simon

--
================================
Simon Verona
Dealer Management Service Ltd
Stewart House
Centurion Business Park
Julian Way
Sheffield
S9 1GD

Tel: 0870 080 2300
Fax: 0870 735 0011

"Vijay" <vi***@msdiscussions.com> wrote in message
news:en**************@TK2MSFTNGP02.phx.gbl...
If a launch condition fails i.e the check returns false, you will get a
message and setup will fail. This is how the installer works. If you are
sure that administrators will install the application then you can put a
registry key and then use that key to check if you are application is
installed, in the launch condition. This will be easy, as you don't have
to do custom actions for this. Let me know if you need more help

VJ

"Simon Verona" <no****@nomail.zzz> wrote in message
news:em**************@TK2MSFTNGP05.phx.gbl...
I have an installer project for my VB.net application which as a custom
action runs a silent installation of a third party software product.

This however, generates an error if the application is already installed.

I therefore want to check if the application is already installed before
launching the setup.exe to install it.

I know I use the "condition" property on the custom action - but what
exactly do I put in as a condition if I want to check for a file existing
and if it is to not run the setup.exe?

Thanks in advance
Simon

--
================================
Simon Verona
Dealer Management Service Ltd
Stewart House
Centurion Business Park
Julian Way
Sheffield
S9 1GD

Tel: 0870 080 2300
Fax: 0870 735 0011


Apr 5 '06 #3

P: n/a
Simon...

You don't have to put in a file check.., you can use the registry to create
a Unique key with your company/prd name.. like that under HKLM when
installing and as part of Launch check...you can check for this.. Registry
is also guaranteed to be unique if you have company name in there... File
Search, unless you are installing files at a specific location of your own,
will hard to track, if user has different drive letter etc...

I hope you can create a Reg key for a setup project...Assuming this is
done... and you have created a key as

HKLM\MyCompany\MyProduct\
Application Name - "MyProduct"
AppInstalled Path - [TARGETDIR]

Here is how you can create a Launch check for the registery key...

Creating Search Conditon..
==================

In the launch condition window for setup project... Right click on the
Search Target Machine.
Choose Add Registery search..
Set the following properties..for the Item

(Name) - RegMyProduct
Property - MyProductCheck
RegKey - SOFTWARE\MyCompany\MyProduct
Root - vsdrrHKLM
Value - Application Name

In the same window... Right Click on Launch condtions...and Add Launch
Condition.. set properties as below for the new item

(Name) - MyNewProductCheck
Condition - MyProductCheck=""
InstallURL - <Leave this empty>
Message - <Custom Message to say your product is already installed>

The above will make sure that your application won't install on machine
already installed...

HTH
VJ

"Simon Verona" <no****@nomail.zzz> wrote in message
news:un**************@TK2MSFTNGP03.phx.gbl...
I'd like to put in a test to see if a specific file exists on the system -
on the basis that if it is then the application is installed... What
exactly would I put in to achieve this ?

Thanks
Simon

--
================================
Simon Verona
Dealer Management Service Ltd
Stewart House
Centurion Business Park
Julian Way
Sheffield
S9 1GD

Tel: 0870 080 2300
Fax: 0870 735 0011

"Vijay" <vi***@msdiscussions.com> wrote in message
news:en**************@TK2MSFTNGP02.phx.gbl...
If a launch condition fails i.e the check returns false, you will get a
message and setup will fail. This is how the installer works. If you are
sure that administrators will install the application then you can put a
registry key and then use that key to check if you are application is
installed, in the launch condition. This will be easy, as you don't have
to do custom actions for this. Let me know if you need more help

VJ

"Simon Verona" <no****@nomail.zzz> wrote in message
news:em**************@TK2MSFTNGP05.phx.gbl...
I have an installer project for my VB.net application which as a custom
action runs a silent installation of a third party software product.

This however, generates an error if the application is already
installed.

I therefore want to check if the application is already installed before
launching the setup.exe to install it.

I know I use the "condition" property on the custom action - but what
exactly do I put in as a condition if I want to check for a file
existing and if it is to not run the setup.exe?

Thanks in advance
Simon

--
================================
Simon Verona
Dealer Management Service Ltd
Stewart House
Centurion Business Park
Julian Way
Sheffield
S9 1GD

Tel: 0870 080 2300
Fax: 0870 735 0011



Apr 5 '06 #4

P: n/a
Thanks I figured the relationship between "launch conditions" and
"Custom action properties" just before your post.

Thanks for taking the time - creating installers seems to be very poorly
documented!

Regards
Simon

--
================================
Simon Verona
Dealer Management Service Ltd
Stewart House
Centurion Business Park
Julian Way
Sheffield
S9 1GD

Tel: 0870 080 2300
Fax: 0870 735 0011

"Vijay" <vi***@msdiscussions.com> wrote in message
news:uj*************@TK2MSFTNGP04.phx.gbl...
Simon...

You don't have to put in a file check.., you can use the registry to
create a Unique key with your company/prd name.. like that under HKLM when
installing and as part of Launch check...you can check for this.. Registry
is also guaranteed to be unique if you have company name in there... File
Search, unless you are installing files at a specific location of your
own, will hard to track, if user has different drive letter etc...

I hope you can create a Reg key for a setup project...Assuming this is
done... and you have created a key as

HKLM\MyCompany\MyProduct\
Application Name - "MyProduct"
AppInstalled Path - [TARGETDIR]

Here is how you can create a Launch check for the registery key...

Creating Search Conditon..
==================

In the launch condition window for setup project... Right click on the
Search Target Machine.
Choose Add Registery search..
Set the following properties..for the Item

(Name) - RegMyProduct
Property - MyProductCheck
RegKey - SOFTWARE\MyCompany\MyProduct
Root - vsdrrHKLM
Value - Application Name

In the same window... Right Click on Launch condtions...and Add Launch
Condition.. set properties as below for the new item

(Name) - MyNewProductCheck
Condition - MyProductCheck=""
InstallURL - <Leave this empty>
Message - <Custom Message to say your product is already installed>

The above will make sure that your application won't install on machine
already installed...

HTH
VJ

"Simon Verona" <no****@nomail.zzz> wrote in message
news:un**************@TK2MSFTNGP03.phx.gbl...
I'd like to put in a test to see if a specific file exists on the
system - on the basis that if it is then the application is installed...
What exactly would I put in to achieve this ?

Thanks
Simon

--
================================
Simon Verona
Dealer Management Service Ltd
Stewart House
Centurion Business Park
Julian Way
Sheffield
S9 1GD

Tel: 0870 080 2300
Fax: 0870 735 0011

"Vijay" <vi***@msdiscussions.com> wrote in message
news:en**************@TK2MSFTNGP02.phx.gbl...
If a launch condition fails i.e the check returns false, you will get a
message and setup will fail. This is how the installer works. If you are
sure that administrators will install the application then you can put a
registry key and then use that key to check if you are application is
installed, in the launch condition. This will be easy, as you don't have
to do custom actions for this. Let me know if you need more help

VJ

"Simon Verona" <no****@nomail.zzz> wrote in message
news:em**************@TK2MSFTNGP05.phx.gbl...
I have an installer project for my VB.net application which as a custom
action runs a silent installation of a third party software product.

This however, generates an error if the application is already
installed.

I therefore want to check if the application is already installed
before launching the setup.exe to install it.

I know I use the "condition" property on the custom action - but what
exactly do I put in as a condition if I want to check for a file
existing and if it is to not run the setup.exe?

Thanks in advance
Simon

--
================================
Simon Verona
Dealer Management Service Ltd
Stewart House
Centurion Business Park
Julian Way
Sheffield
S9 1GD

Tel: 0870 080 2300
Fax: 0870 735 0011



Apr 5 '06 #5

P: n/a
Yea I agree with you totally....Also watch out on the dependency refresh.
Double check depended files everytime you build.. I have been bit bad,
specially if you use third party components in the project.

VJ

"Simon Verona" <no****@nomail.zzz> wrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
Thanks I figured the relationship between "launch conditions" and
"Custom action properties" just before your post.

Thanks for taking the time - creating installers seems to be very poorly
documented!

Regards
Simon

--
================================
Simon Verona
Dealer Management Service Ltd
Stewart House
Centurion Business Park
Julian Way
Sheffield
S9 1GD

Tel: 0870 080 2300
Fax: 0870 735 0011

"Vijay" <vi***@msdiscussions.com> wrote in message
news:uj*************@TK2MSFTNGP04.phx.gbl...
Simon...

You don't have to put in a file check.., you can use the registry to
create a Unique key with your company/prd name.. like that under HKLM
when installing and as part of Launch check...you can check for this..
Registry is also guaranteed to be unique if you have company name in
there... File Search, unless you are installing files at a specific
location of your own, will hard to track, if user has different drive
letter etc...

I hope you can create a Reg key for a setup project...Assuming this is
done... and you have created a key as

HKLM\MyCompany\MyProduct\
Application Name - "MyProduct"
AppInstalled Path - [TARGETDIR]

Here is how you can create a Launch check for the registery key...

Creating Search Conditon..
==================

In the launch condition window for setup project... Right click on the
Search Target Machine.
Choose Add Registery search..
Set the following properties..for the Item

(Name) - RegMyProduct
Property - MyProductCheck
RegKey - SOFTWARE\MyCompany\MyProduct
Root - vsdrrHKLM
Value - Application Name

In the same window... Right Click on Launch condtions...and Add Launch
Condition.. set properties as below for the new item

(Name) - MyNewProductCheck
Condition - MyProductCheck=""
InstallURL - <Leave this empty>
Message - <Custom Message to say your product is already installed>

The above will make sure that your application won't install on machine
already installed...

HTH
VJ

"Simon Verona" <no****@nomail.zzz> wrote in message
news:un**************@TK2MSFTNGP03.phx.gbl...
I'd like to put in a test to see if a specific file exists on the
system - on the basis that if it is then the application is installed...
What exactly would I put in to achieve this ?

Thanks
Simon

--
================================
Simon Verona
Dealer Management Service Ltd
Stewart House
Centurion Business Park
Julian Way
Sheffield
S9 1GD

Tel: 0870 080 2300
Fax: 0870 735 0011

"Vijay" <vi***@msdiscussions.com> wrote in message
news:en**************@TK2MSFTNGP02.phx.gbl...
If a launch condition fails i.e the check returns false, you will get a
message and setup will fail. This is how the installer works. If you
are sure that administrators will install the application then you can
put a registry key and then use that key to check if you are
application is installed, in the launch condition. This will be easy,
as you don't have to do custom actions for this. Let me know if you
need more help

VJ

"Simon Verona" <no****@nomail.zzz> wrote in message
news:em**************@TK2MSFTNGP05.phx.gbl...
>I have an installer project for my VB.net application which as a custom
>action runs a silent installation of a third party software product.
>
> This however, generates an error if the application is already
> installed.
>
> I therefore want to check if the application is already installed
> before launching the setup.exe to install it.
>
> I know I use the "condition" property on the custom action - but what
> exactly do I put in as a condition if I want to check for a file
> existing and if it is to not run the setup.exe?
>
> Thanks in advance
> Simon
>
> --
> ================================
> Simon Verona
> Dealer Management Service Ltd
> Stewart House
> Centurion Business Park
> Julian Way
> Sheffield
> S9 1GD
>
> Tel: 0870 080 2300
> Fax: 0870 735 0011
>
>



Apr 5 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.