Maybe someone has good ideas on this.
My installer installs a web site under IIS.
We create a named application pool during installation.
When the app is uses, some DLLs are locked.
I can release by executing an IISreset command prior to upgrade (the uninstall part) and thus avoid that DLLs are locked. The downside is that all websites on the server are reset.
I can also achieve the same by recycling the app pool using
Code: Select all
~InstallAware Clipboard Data~
~Run Program~
~{397D1CFC-6971-43D9-8B95-073509CF5BDD}~
~$WINSYSDIR$\inetsrv\APPCMD.exe~
~TRUE~
~appcmd recycle apppool /apppool.name:DynPool~
~TRUE~
~~
-this is much better, because it only affects my app (unless someone used my app pool for other things)
However, this only works if the have not "messed" with the IIS config - Ie. if my customer has assignes a different app pool, this method will fail
SO, my question is:
How can I find out if the DLLs are locked?
actually - how can I find out if
Install/Remove MSI Package $PRODUCTCODE$[REMOVE=ALL] (get result into variable REMOVEOLD)
will return "REBOOT" before executing this step?
If I can see that it will return REBOOT, then I could offer to do an IISRESET to avoid.
Would it work to do something like
Install/Remove MSI Package $PRODUCTCODE$[REMOVE=ALL] (get result into variable REMOVEOLD)
if Variable REMOVEOLD Equals REBOOT
Run Program IISReset (WAIT)
Install/Remove MSI Package $PRODUCTCODE$[REMOVE=ALL] (get result into variable REMOVEOLD)
end
(in effect trying the remove twice if first attempt resultetd in reboot)
Ideas appreciated.
Best regards
Bo