The running exe and its loaded Dlls are moved, yes, but their
internals are changed so that the backing storage for their code has
changed to another location. I believe that's more than just
MoveFileEx.. And yes, you are correct, I've seen occasions when the
app in the new location will try to load a Dll and crash because it
was making assumptions about where it is running from or the Dll was
gone.But there's a difference between relocating an app that *might*
crash and a reboot that will definitely interrupt everyone.

Check a log to see if the MsiSystemRebootPending property is set. I
admit that's a remote possibility, but if so you could use that to
force a ScheduleReboot.

It might be worth looking at integrating the app with Restart Manager
- I haven't done this myself - but if that works it could be the ideal
solution. The app would get a WM_QUERYENDSESSION message with a
ENDSESSION_CLOSEAPP parameter so it can just shut down and then there
is no need for a reboot or a later app crash. If that works, then it;s
just another case where the OS will do what it can to avoid reboots
and let the app keep running, or integrate with RM to avoid that
default behavior if you don't like it.

Or perhaps more obviously you could use the WiX CloseApplication
method of telling the app to shut down, or even roll your own code in
a CA to tell the app to shut down.
---------------
Phil Wilson


On Wed, May 6, 2015 at 10:28 AM, Kashif Md. <mdkashi...@gmail.com> wrote:
> I don't think Windows installer does any re-mapping. It just moves the
> locked files to config.msi folder. There is nothing specific with installer
> infact we can do it ourselves using MoveFileEx.
>
> My take would be that whenever windows installer moves a file it should let
> user know of a pending reboot because user machine is now in an
> inconsistent state. Think of what will happen when this locked DLL tries to
> load another DLL which is now deleted by uninstaller. There will be errors
> or even crashes. For applications  files in use dialog works however if
> DLLs are loaded in explorer then a reboot becomes necessary. Windows
> installer decision to not prompt user to reboot seems like a wrong choice.
>
> On Wed, May 6, 2015 at 12:37 AM, Phil Wilson <phildgwil...@gmail.com> wrote:
>
>> Windows Installer goes to a lot of trouble to make sure that you can
>> avoid a reboot at uninstall time by re-mapping in-use Dlls etc. In
>> general, a running app can continue running after uninstall, and some
>> cleanup will occur when the app shuts down, the rest after the next
>> reboot. The point is that if Windows Installer can remap the in-use
>> Dlls to another location, keep any apps running, and replace the ones
>> that were in use (but remapped) and all that's required is deleting a
>> bit of non-essential junk at the next reboot then why force a reboot?
>> ---------------
>> Phil Wilson
>>
>>
>> On Tue, May 5, 2015 at 9:17 AM, Rob Mensching <r...@firegiant.com> wrote:
>> > Why do you want to force a restart? Your application is safely gone.
>> Those files will be cleaned up whenever the users chooses to restart again.
>> >
>> > _____________________________________________________________
>> >  Short replies here. Complete answers over there:
>> http://www.firegiant.com/
>> >
>> >
>> > -----Original Message-----
>> > From: Akshat Goel [mailto:aksg...@adobe.com]
>> > Sent: Tuesday, May 5, 2015 5:03 AM
>> > To: wix-users@lists.sourceforge.net
>> > Subject: [WiX-users] No reboot for locked files during uninstallation.
>> >
>> > Hi,
>> >
>> >
>> > Our product installs DLLs as part of installation. Most of the DLLs are
>> used by our application but couple of these are also used by other
>> processes and applications. When we uninstall the product, our main
>> application is closed and DLLs are freed. However, other processes may
>> still be running and thus, some DLLs may be locked.
>> >
>> >
>> > During uninstallation, Windows installer copies these files to
>> C:\Config.msi. When uninstallation completes, there is no message for
>> reboot or cleanup. However MSI log shows the entry  Info 1903. Scheduling
>> reboot operation: Deleting file C:\Config.Msi\3f6c9d1.rbf. Must reboot to
>> complete operation.
>> >
>> >
>> > My problem is how to show the user that a reboot is required to cleanup
>> the files. Currently uninstallation finish screen doesn't show any message
>> that a reboot maybe required.
>> >
>> >
>> > I have a sample package which demonstrates the issue, if anyone needs.
>> >
>> >
>> > Thanks & hoping for a reply.
>> >
>> >
>> > Regards,
>> >
>> > Akshat
>> >
>> >
>> ------------------------------------------------------------------------------
>> > One dashboard for servers and applications across Physical-Virtual-Cloud
>> > Widest out-of-the-box monitoring support with 50+ applications
>> > Performance metrics, stats and reports that give you Actionable Insights
>> > Deep dive visibility with transaction tracing using APM Insight.
>> > http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
>> > _______________________________________________
>> > WiX-users mailing list
>> > WiX-users@lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/wix-users
>>
>>
>> ------------------------------------------------------------------------------
>> One dashboard for servers and applications across Physical-Virtual-Cloud
>> Widest out-of-the-box monitoring support with 50+ applications
>> Performance metrics, stats and reports that give you Actionable Insights
>> Deep dive visibility with transaction tracing using APM Insight.
>> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
>> _______________________________________________
>> WiX-users mailing list
>> WiX-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/wix-users
>>
> ------------------------------------------------------------------------------
> One dashboard for servers and applications across Physical-Virtual-Cloud
> Widest out-of-the-box monitoring support with 50+ applications
> Performance metrics, stats and reports that give you Actionable Insights
> Deep dive visibility with transaction tracing using APM Insight.
> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to