473,785 Members | 2,411 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 3469
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******** ******@TK2MSFTN GP05.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***@msdiscus sions.com> wrote in message
news:en******** ******@TK2MSFTN GP02.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******** ******@TK2MSFTN GP05.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...Assum ing 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\MyComp any\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) - MyNewProductChe ck
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******** ******@TK2MSFTN GP03.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***@msdiscus sions.com> wrote in message
news:en******** ******@TK2MSFTN GP02.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******** ******@TK2MSFTN GP05.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***@msdiscus sions.com> wrote in message
news:uj******** *****@TK2MSFTNG P04.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...Assum ing 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\MyComp any\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) - MyNewProductChe ck
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******** ******@TK2MSFTN GP03.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***@msdiscus sions.com> wrote in message
news:en******** ******@TK2MSFTN GP02.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******** ******@TK2MSFTN GP05.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******** ********@TK2MSF TNGP04.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***@msdiscus sions.com> wrote in message
news:uj******** *****@TK2MSFTNG P04.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...Assum ing 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\MyComp any\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) - MyNewProductChe ck
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******** ******@TK2MSFTN GP03.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***@msdiscus sions.com> wrote in message
news:en******** ******@TK2MSFTN GP02.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******** ******@TK2MSFTN GP05.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
4929
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 1.1 -> MsiNetAssembly Support.) I have a few issues and questions regarding the MSI and its properties. * This may be my biggest annoyance at the moment. When the installer creates the target directory, it's setting them as read-only. When the...
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 - keeps giving me this error - The output file from the windows application is Not Found. Followed by an 'Interface not registered'. Any idea what is wrong ?
0
2107
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. My main project is a band object (Explorer Bar) in an assembly (.DLL) that needs to be registered on installation and unregisted on uninstallation. In addition, during installation, Setup creates registry subkeys, sets registry values, installs...
2
5367
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 works. Now, I am wondering if there is any way to change the directory that the installer installs the files to. I want to be able to put my files in a specified directory (user specified is good, but i don't mind hardcoding the path either) and...
1
1727
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 is that it removes the files and then tries to execute the custome action. Also how can I get the return value from the custome action? Am I better of to write the code to interface with the windows installer instead of relaying on vs to do the...
1
1473
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 2003 deploy project. Is there a script or conditions that I have to set in the deployment project's properties? I have tried deploying it but could not find where I would grant ASPNET
3
2337
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 two modifications to the sample in the document...both are in the "Protected Sub AddDBTable" (towards the bottom). I've changed ' Creates the database.
0
945
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 right, but I just keep getting errors. I have included the DLL project in in my installer project (MSI) and set the custom action to execute on Install. Now I have set the RunInstallerAttribute to true, set the Entrypoint to be
3
1716
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 application. I have a custom Installer class that needs to access a disk file installed during the installation in a directory relative to the application directory. The file name is known but I don't know how to access the target
0
9646
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9483
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10346
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10157
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10096
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7504
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6742
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5514
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2887
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.