I have created a wix file to create the installer for my VC++ application.
During uninstallation I want to display warning message if the application is uninstalled while the instance of it is running.
I am new to Wix.
Can anyone help me out how to resolve this problem....
Thanks in advance.
An application cannot physically be uninstalled while running. I mean, some files and Registry entries can be removed, but the executable file directly or indirectly loaded by a currently running process cannot be removed — OS protects them from removing or modifications while they are loaded. Same thing with opened data files.—SA
That said, it's better to start uninstall process with main executable files so the process will fail before doing any harm to unused files.
From the other hand, uninstall process can kill all the processes which prevents removing of objects. Do you want to use this way? In this case you can really communicate with the application being uninstalled, but the application (via its user) should decide if uninstall process should be allowed or not. For communication, all you can use is called IPC (Inter-Process Communication). I don't know if WIX provides such feature, so this step could be custom. Which IPC you can use depends on your decision and language, platform and libraries you use; it can be named pipes, first of all if you uninstall on the same machine, or sockets.
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)