473,748 Members | 2,551 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Custom action to uninstall two packages on commit

We have developed an application that will replace the older version. The
older versions comes in two flavors, a Lite and a Pro version. I can
successfully remove the previous version of either the Lite or the Pro
version by sync'ing the "Product Code" and increasing the version number of
the new setup, but I really need to remove both versions upon a successful
installation. So I have added two custom actions under "Commit" and I have
also tried "Install". For both custom actions I have created the following
vb script:

Set oShell = CreateObject("W Script.Shell")
oShell.Run Property("Custo mActionData"),, False
Set oShell = Nothing

I set the the CustomActionDat a property of the custom actions to "msiexec /q
/uninstall " followed by the product code of each version (Lite & Pro).

But as you might have guessed this will not work because the custom actions
will be run while the setup that calls the custom actions is still running.
I will get the messagebox stating that "another setup is already in
progress..."

- I do not want to use another tool like WiseScript or InstallShield, ...
- I do not want to create a seperate setup project with 3 custom actions
(install, uninstall, uninstall)

Any leads on how to run msiexec.exe to uninstall a product in a custom
action?

Thx

--
Gabriel Lozano-Morán
MCSD .NET
Real Software
http://www.realsoftware.be
http://www.realdn.net
Feb 3 '06 #1
0 1502

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1625
by: Angela | last post by:
I wrote a class that I intended to be a custom action. I added the DLL for the class to the setup project using the CustomActions editor. When I run the installer it completely ignores the custom action I set up. First I put everything in the class constructor in the order I wanted it performed, I thought maybe the constructor would be called by the installer. Well, that didn't work so I created a Main method just to see if that
5
3912
by: NormD | last post by:
Is it possible to rollback an uninstallation from uninstall custom action based on some user input. or any suggestions on how to do this. If the user has an earlier version of the product and they are installing a new version, ask them if they want to keep the earlier version or not. If they want to remove the earlier version remove it and install the new version and if they dont want to remove it simply install the new version. I am...
3
2943
by: Vai2000 | last post by:
Hi All, I need to execute custom action during installation of my program (through MSI). Creating the MSI was pretty straight fwd. After that I went into the Custom Action Editor and added the custom action (EXE) at the install condition. Unfortunately when I roll out my MSI I don't see the custom action being executed. For now I just wrote few lines on my customAction.exe (like hello world etc) its a console application. Can someone...
3
7279
by: Eric | last post by:
Using VS.Net 2003 .Net framework 1.1 SP1 Our installation project calls a Custom Action dll to perform post install actions. It fails if the .msi file is launch from a directory that contains spaces, such as: My Install Folder\SetupDir The exception thrown is:
1
2203
by: =?Utf-8?B?U3RlcGhhbmU=?= | last post by:
Hi, I have develop an application in C#. I create a deployment projet to install and uninstall the application. My problem is: The application create different files who contain user's preferences. I want that the uninstall program ask to the user if he want delete or no this files.
13
9717
by: Matt F | last post by:
I have a deployment project that I'm setting up. I need to perform a different custom action based on whether this is a first time install or an update. Does anyone have any idea if it's possible to set the Condition property of a custom action to determine if the currently running install is upgrading a previous installation and if so how? I'm also open to other methods of acheiving this functionality.
0
930
by: bobneedshelp | last post by:
Is it possible through an install to run a script to disable a service and then install the files in VB.NET? I've tried using an installer class with the custom actions and that is not working. The files are installing first and then the custom action runs. I've used message boxes in the code, instead of a script, to see when the files are actually getting written vs the script running. Public Class TestInstaller Public Sub...
0
2129
by: =?Utf-8?B?QWxoYW1icmEgRWlkb3MgS2lxdWVuZXQ=?= | last post by:
Actually, my installer package is not for a Windows Service, but for a WinForms application. Well, it is kind of both: this is a multi-project solution with its main target being a WinForms application, but it also includes a Windows Service. My custom install actions configuration includes output from a Class Library project that contains the custom actions followed by the output of the Windows Service project to register the service....
3
5856
by: KennethLundin | last post by:
Hi, i'm developing a solution in VS9/CSharp. Now I'm constructing a deployment project for my appliation (thick, database driven, winforms, standard, good old type of application). During installation I also install the PostgreSQL database and along with that I need to execute some Custom Actions. I've created a Custom Installer component in CSharp and calls it on Install/Rollback/ uninstall and everything works great (Custom Actions...
0
8994
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
8831
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
9555
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
9376
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
9329
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
6796
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
4607
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4878
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2787
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.