1

I created an installer using Wix for my add-in which use in another application. Added FileInUse section and when i uninstall my add-in from computer and application which use my installed add-in opened installer show image

and when i use "close the applications and attempt restart them" i have message enter image description here

my add-in uninstalled and application haven not closed. So, my question, does the application not close depends on the application or I can it be controlled? Because i use CustomAction to close, but its close app when i choose 'do not close applications'

 <util:CloseApplication Id="CloseApp" CloseMessage="yes" Target="app.exe" TerminateProcess="1" RebootPrompt="no" />
<InstallExecuteSequence>
  <Custom Action="WixCloseApplications" After="InstallInitialize" />
</InstallExecuteSequence>
  • Windows has a "Restart Manager" feature built-in which essentially tries to automatically shut down and restart applications during installation operations and saving data and recovering in the process. There is a lot more to it than that: [see this answer and links](https://stackoverflow.com/a/48842663/129130). Your application must support the restart manager feature for this to be possible. [See this article on Windows Restart Manager from Advanced Installer](https://www.advancedinstaller.com/user-guide/qa-vista-restart-manager.html). – Stein Åsmul Jun 23 '21 at 15:08
  • [One more link on Restart Manager](https://stackoverflow.com/a/50935008/129130) - lots of detail (probably too much to read). [Let's try this answer too, from Urman of InstallShield](https://stackoverflow.com/a/50274737/129130). – Stein Åsmul Jun 23 '21 at 15:10
  • @SteinÅsmul okay, then this means that if the application does not support Restart Manager, then in any case FIleInUse will not close my application? is there any solution to this problem so that both cases (close and do not close) work and do what is written in them? – HElllo_World_Chelik Jun 24 '21 at 07:48
  • I would consider [implementing support for Windows Restart Manager as described by Advanced Installer](https://www.advancedinstaller.com/user-guide/qa-vista-restart-manager.html). You really need this in the long run if your application is to be accepted by corporations for deployment on thousands of machines. Having your application be capable of saving its own state and restarting itself is good beyond the MSI technology - it is a great feature to have. You have your application "take care of its own shutdown". Corporations want deployment to work smoothly. This is a key issue. – Stein Åsmul Jun 24 '21 at 08:50
  • @SteinÅsmul but its not my application, I just created add-in for this application, and created installer to add my add-in into this app, so I just modify this app – HElllo_World_Chelik Jun 24 '21 at 09:56
  • I guess I need to read more thoroughly :-). Did you check the user forums for the application for any hints on how to deal with this? Is there perhaps a way to call the application itself to shut down? This kind of knowledge tends to be available in the user forum. The application is AutoDesk? – Stein Åsmul Jun 24 '21 at 10:22
  • @SteinÅsmul yes, Autodesk Revit) – HElllo_World_Chelik Jun 24 '21 at 10:38

0 Answers0