|
|
#1 (permalink) |
|
Guest
Posts: n/a
|
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- |
|
|
|
#2 (permalink) |
|
Guest
Posts: n/a
|
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- |
|
|
|
#3 (permalink) |
|
Guest
Posts: n/a
|
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. |
|
|
|
#4 (permalink) |
|
Guest
Posts: n/a
|
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- |
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|