473,508 Members | 2,374 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Installer Project - Conditions on Custom Action

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
5 3442
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
4877
by: Arun Bhalla | last post by:
I'm working with VS.NET 2003 and .NET 1.1 (not SP1) on Windows XP SP1. My application is using the Windows Installer Bootstrap. (I may have also installed a module which detects requirements (.NET...
3
270
by: pSm | last post by:
Hi, I was following the MSDN walthru tutorial - ms-help://MS.VSCC/MS.MSDNQTR.2003JUL.1033/vsintro7/html/vxwlkwalkthroughcreatingcustomaction.htm but I am not being able to compile the project -...
0
2070
by: Arun Bhalla | last post by:
I'm having some inconsistency problems with my deployment project ("Setup") and its custom actions ("Installer"). I'm using Visual Studio .NET 2003 (.NET 1.1, no service pack) on Windows XPSP1. ...
2
5321
by: MENTAT | last post by:
Hi, I am trying to create an installer for my web application. So I added a web setup project to my solution (I am using VS.NET 2003). Been playing around with it since then and it basically...
1
1718
by: RA | last post by:
Hi I have created a Windows installer project from the .net vs. When I add custom actions for the Uninstall event how can I tell it in what sequence to launch the custome action? Whats happening...
1
1448
by: harry | last post by:
Hi all I am using VS.NET 2003 installer to deploy my ASP.NET application. I want to allow ASPNET write access to some files in subfolders of the inetpub/wwwroot/myApp/mySubfolder using VS.NET...
3
2316
by: DC Gringo | last post by:
Hi, I'm trying to use a custom action to modify a database (rather than create one) using the VS.NET '03's help example called "Custom Action to Create Database During Installation". I've made...
0
922
by: CJ Taylor | last post by:
Hey has anyone played with custom actions and the installer class? I've followed instructions from a couple articles on MSDN on how to build a custom install class, thought I did everything...
3
1704
by: Mark Assousa | last post by:
Hi, I'm having trouble finding the right news group for this posting so here goes... I am attempting to execute some special actions within an installation project for a standard .Net Windows...
0
7224
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7323
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7380
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
5626
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4706
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3192
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3180
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
763
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
415
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.