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

Home Posts Topics Members FAQ

Auto close running instance during uninstall

I have an application that runs in the system tray (taskbar notification
area) and it runs at startup. Occasionally I need to release a new version.
I have created a deployment project in .Net. With the MSI it detects
whether a current version is installed and requests that the user uninstalls
it prior to installing the new version. Also, MSI detects a running instance
of the application during the uninstall and requests that it be closed prior
to continuing. Both of these features I love and it is going to save me a
lot of time in supporting the software.

My question is two fold:

1. When uninstalling is it possible to force the automatic termination of
the application if its running?

I have partially solved this already but have hit a brick wall. My
application knows to terminate immediately and silently when an application
defined windows message is passed to it. I also have also written a very
small C application that searches for a running instance of my main
application and posts that windows message. It duly shuts down. The C
program is included in the MSI package and is set to run as an 'Uninstall
Custom Action'. In theory, during the uninstall my application will
magically shut down and the uninstall will continue without notifying the
user of the running application.

The problem is (and its a big problem) that the Uninstall custom action only
runs at the end of the uninstall so the user is presented with the
termination message before my C program can send off the message.

Does anyone have any better ideas on how to solve this one?

2. When the user is installing the new version of the application they will
always be presented with the message to uninstall the old version first. I
would prefer it if the previous version could be silently uninstalled first.
This would make the whole experience a lot more user friendly.
Alternatively can you convince MSI to simply clobber the existing
installation and install right over the top of it?

I have also attempted to solve this one but again have hit a brick wall. I
can include a BAT file within the MSI project that runs the command line
argument msiexec /x {GUID}. It would be set to run as an 'Install custom
action'. However the user is presented with a message asking them if they
want to uninstall the product. It should be done silently. I have tried
the 'silent switch' but msiexec does not accept a /x /s switch combination
(probably for good reason though) In addition the install custom action
only runs at the end of the setup so again I am foiled.

Thanks in advance.

Regards
Dave
Jul 21 '05 #1
2 3021
I have just answered my second question. I update the version number and
product code. D'oh!

My first question still stands though.
"Dave A" <da**@sigmasolu tionsdonotspamm e.com.au> wrote in message
news:OT******** ******@TK2MSFTN GP11.phx.gbl...
I have an application that runs in the system tray (taskbar notification
area) and it runs at startup. Occasionally I need to release a new version. I have created a deployment project in .Net. With the MSI it detects
whether a current version is installed and requests that the user uninstalls it prior to installing the new version. Also, MSI detects a running instance of the application during the uninstall and requests that it be closed prior to continuing. Both of these features I love and it is going to save me a
lot of time in supporting the software.

My question is two fold:

1. When uninstalling is it possible to force the automatic termination of
the application if its running?

I have partially solved this already but have hit a brick wall. My
application knows to terminate immediately and silently when an application defined windows message is passed to it. I also have also written a very
small C application that searches for a running instance of my main
application and posts that windows message. It duly shuts down. The C
program is included in the MSI package and is set to run as an 'Uninstall
Custom Action'. In theory, during the uninstall my application will
magically shut down and the uninstall will continue without notifying the
user of the running application.

The problem is (and its a big problem) that the Uninstall custom action only runs at the end of the uninstall so the user is presented with the
termination message before my C program can send off the message.

Does anyone have any better ideas on how to solve this one?

2. When the user is installing the new version of the application they will always be presented with the message to uninstall the old version first. I would prefer it if the previous version could be silently uninstalled first. This would make the whole experience a lot more user friendly.
Alternatively can you convince MSI to simply clobber the existing
installation and install right over the top of it?

I have also attempted to solve this one but again have hit a brick wall. I can include a BAT file within the MSI project that runs the command line
argument msiexec /x {GUID}. It would be set to run as an 'Install custom
action'. However the user is presented with a message asking them if they
want to uninstall the product. It should be done silently. I have tried
the 'silent switch' but msiexec does not accept a /x /s switch combination
(probably for good reason though) In addition the install custom action
only runs at the end of the setup so again I am foiled.

Thanks in advance.

Regards
Dave

Jul 21 '05 #2
Hi Dave,

I have replied you in another post under "microsoft.publ ic.vb.deploymen t".

If you have time, please have a look and reply me there.

Have a nice day.

Regards,

Felix Wang
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Jul 21 '05 #3

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

Similar topics

49
632
by: Thom Little | last post by:
I developed a C# application and a windows installer application that properly installs the C# application on a new machine. After the C# application is installed I would like to automatically start it on the User's machine. - How do I instruct the setup program to start execution of the newly installed program? - Is there a good general resource that documents the use of the installer?
24
3716
by: Thom Little | last post by:
During an uninstall, how can I check to see if the application I an uninstalling is currently running? -- -- Thom Little -- www.tlaNET.net -- Thom Little Associates, Ltd. --
2
10958
by: Philip Wagenaar | last post by:
I have created a windows service and added a installer for the service. The service is set to autostart. After installation the service is listed in services as autostart. This is all fine, but I also want to start the service after or during installation. How can I start the service in my setup? (using setup project in vs.net 2003) -- AccoN Accountants & Adviseurs ICT Project Bureau
5
5043
by: Samuel | last post by:
Hi, I am running into a problem of mixing UICulture = auto and allowing users to select culture using a dropdown list. I am detecting a querystring, "setlang", and when found, setting the CurrentUICulture to what's specified in the querystring. Since I want to allow UICulture auto detecting, I add UICulture = "auto" to page directive on each page.
2
460
by: Dave A | last post by:
I have an application that runs in the system tray (taskbar notification area) and it runs at startup. Occasionally I need to release a new version. I have created a deployment project in .Net. With the MSI it detects whether a current version is installed and requests that the user uninstalls it prior to installing the new version. Also, MSI detects a running instance of the application during the uninstall and requests that it be closed...
13
7378
by: Matik | last post by:
Hello everybody, First: SQL Server 2000 sp3a, HP cluster server, MS 2003 server, database recovery model simple Torn page detection: When I have this option turned on, processes conected with updating and writing in database, was MUCH more slower, than if I've this option turned off.
9
18851
by: Beowulf | last post by:
I was having this problem: http://groups.google.com/group/microsoft.public.sqlserver.server/msg/e36e423972323378?dmode=source with it taking an inordinate amount of time to enumerate the databases on my local SQL Server instance, so I went through all the local databases and unchecked "Auto Close" on the "Options" tab of the Database properties in Enterprise Manager. This cleared up the problem nicely. In EM or through SQL-DMO, the...
3
2043
by: Tyno Gendo | last post by:
I just wondered if someone could clarify... I have a a script connecting with mysql_connect and in an include at end of page mysql_close If they script terminates before end of page ie. with an exit() or maybe trigger_error(), does php always disconnect the open'ed connection? I ask because PHP manual says yes, but I've seen some comments relating to PHP 4 saying it doesn't. Please can you tell me your experiences?
0
997
by: Jack White | last post by:
Hi there, This may be a little off-topic here but can anyone confirm that they've got "System.Configuration.Install.Installer" working during an uninstall. The "Installer" derivative I've set up works during installation but it's not instantiated at all during an uninstall. I've spent several hours now banging away at this and am no closer to finding what's wrong. It appears outright broken to me at this point. Can someone confirm...
0
8991
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
9552
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
8245
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
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
6076
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
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...
2
2787
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2215
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.