Go Back   PackageDeploy Application Packaging Forums > Package Development > Application Packaging > Platformsdk MSI

Reply
 
LinkBack Thread Tools Display Modes
Old 03-15-2010, 07:54 PM   #1 (permalink)
Le Chaud Lapin
Guest
 
Posts: n/a
Default Correct Way To Uninstall Active EXE

Hi All,

I have typical MSI package that installs a few DLL's, two EXE's, and a
bunch of .BMPs.

The two EXE's launch immediately after installation and on login. At
present [though I might change], neither EXE can be exited by clicking
[X] on title bar. They run are light-weight server applications whose
where brute-forced exits would interfere with other executing
components, like Explorer.exe.

Currently, I try an uninstall of the entire .MSI while the two EXE's
are in execution. All files are deleted from ProgramFiles\MyCompany
\...

....except the two directories for the two EXE's. The EXE's themselves
appear to be missing from their respective installation directories.

Two questions:

1. What is the proper way to uninstall running applications? If I
force a reboot after install, the two EXE directories under MyCompany
\... will still be present.

2. What mechanism is Windows using to make the EXE's appear to have
been deleted even though they are still running? Obviously the disk
images are not actually being removed.

TIA,

-Le Chaud Lapin-
  Reply With Quote
Old 03-15-2010, 07:54 PM   #2 (permalink)
Le Chaud Lapin
Guest
 
Posts: n/a
Default Re: Correct Way To Uninstall Active EXE

On Sep 21, 11:50*am, "Wilson, Phil" <ph...@wonderware.nospam.com>
wrote:
> 1. Something like an named event that the programs check and exit when set,
> the uninstall sets it. I think you're saying that sending a quit message to
> the app windows doesn't shut them down.


Yes, by design, our EXE is prevented from exiting using normal [X]. I
will use the named event mechanism where a 2nd run of EXE with command-
line option "-UINSTALL" will cause it to raise event to tell 1st EXE ,
"Yes, you really do need to die right now."

> 2. I'm not sure. I think it loads the entire image into memory and removes
> the disk copy, perhaps backed by the page file. More speculation: The
> directories get left behind because I believe a) Windows doesn't remove
> directories using the pending file renames mechanism after a reboot, just
> files, and b) the running programs still have handles referring to that
> directory.


Sounds reasonable.

Thanks Phil,

-Le Chaud Lapin-
  Reply With Quote
Old 03-15-2010, 07:54 PM   #3 (permalink)
Kalle Olavi Niemitalo
Guest
 
Posts: n/a
Default Re: Correct Way To Uninstall Active EXE

Le Chaud Lapin <jaibuduvin@gmail.com> writes:

> 2. What mechanism is Windows using to make the EXE's appear to have
> been deleted even though they are still running? Obviously the disk
> images are not actually being removed.


Windows Installer (at least some versions) moves the files to a
hidden directory and arranges for them to be deleted on reboot.
The documentation of MOVEFILE_DELAY_UNTIL_REBOOT mentions a
Registry value where such operations are listed. If you look at
that value between such an uninstallation and the following
reboot, I think you'll find where the files have gone.

If the uninstallation had been rolled back after RemoveFiles,
then Windows Installer might have moved the files back to their
original directories, instead of asking Windows to actually
delete them.
  Reply With Quote
Old 03-15-2010, 07:54 PM   #4 (permalink)
Wilson, Phil
Guest
 
Posts: n/a
Default Re: Correct Way To Uninstall Active EXE

1. Something like an named event that the programs check and exit when set,
the uninstall sets it. I think you're saying that sending a quit message to
the app windows doesn't shut them down.

2. I'm not sure. I think it loads the entire image into memory and removes
the disk copy, perhaps backed by the page file. More speculation: The
directories get left behind because I believe a) Windows doesn't remove
directories using the pending file renames mechanism after a reboot, just
files, and b) the running programs still have handles referring to that
directory.

--
Phil Wilson
The Definitive Guide to Windows Installer
http://www.apress.com/book/view/1590592972


"Le Chaud Lapin" <jaibuduvin@gmail.com> wrote in message
news:dba7eb3a-73b2-4464-9e42-21c4bbe6f7e7@a6g2000vbp.googlegroups.com...
> Hi All,
>
> I have typical MSI package that installs a few DLL's, two EXE's, and a
> bunch of .BMPs.
>
> The two EXE's launch immediately after installation and on login. At
> present [though I might change], neither EXE can be exited by clicking
> [X] on title bar. They run are light-weight server applications whose
> where brute-forced exits would interfere with other executing
> components, like Explorer.exe.
>
> Currently, I try an uninstall of the entire .MSI while the two EXE's
> are in execution. All files are deleted from ProgramFiles\MyCompany
> \...
>
> ...except the two directories for the two EXE's. The EXE's themselves
> appear to be missing from their respective installation directories.
>
> Two questions:
>
> 1. What is the proper way to uninstall running applications? If I
> force a reboot after install, the two EXE directories under MyCompany
> \... will still be present.
>
> 2. What mechanism is Windows using to make the EXE's appear to have
> been deleted even though they are still running? Obviously the disk
> images are not actually being removed.
>
> TIA,
>
> -Le Chaud Lapin-


  Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 02:05 AM.


vBulletin, Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
2007 - 2012 PackageDeploy.com