Hi,
I am working on Basic MSI project. I want when I run my installer, if there is xyz program is already running, it should prompt to the user to close that program.
Thanks
Aditya
This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.

Close any dependent application
Started by
aditya1685
, Mar 27 2012 05:28
2 replies to this topic
Posted 29 March 2012 - 07:06
You can use System Search and look for the registry entry which the already running exe might be creating. That will give you information if that exe is installed.
You can add a property to use it as flag and use this in custom action.
You can add a property to use it as flag and use this in custom action.
Posted 22 May 2012 - 19:31
we made an installscript method and use a custom action to call it to accomplish this:
CODE |
function CheckForRunningApps(hMSI) string svResult, szTitle, szMsg1, szMsg2, szOpt1, szOpt2; BOOL bvOpt1, bvOpt2; number iRunning, nvType, nvSize; begin iRunning = 0; if(REMOVEONLY != 0) then LoadStringFromStringTable("Unable_to_uninstall_string", szTitle); LoadStringFromStringTable("please_close_un_string", szMsg2); else LoadStringFromStringTable("Unable_to_install_string", szTitle); LoadStringFromStringTable("please_close_string", szMsg2); endif; LoadStringFromStringTable("one_of_the_following_string", szMsg1); szOpt1 = ""; szOpt2 = ""; if (Is(FILE_LOCKED, "c:\pathtoexe")) then iRunning = iRunning + 1; szMsg1 = szMsg1 + "exe name\n"; endif; if (iRunning > 0) then SdFinish(szTitle, szMsg1, szMsg2, szOpt1, szOpt2, bvOpt1, bvOpt2); abort; endif; end; |
using this method you can search for multiple applications and then just add them to the string you display. this will prevent you from installing and uninstalling with the dependent apps currently running.