473,394 Members | 1,714 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

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 2992
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**@sigmasolutionsdonotspamme.com.au> wrote in message
news:OT**************@TK2MSFTNGP11.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.public.vb.deployment".

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
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...
24
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
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...
5
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...
2
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. ...
13
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...
9
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...
3
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...
0
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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...
0
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
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.