Property INSTALLDIR available at uninstall from Add/Remove programs?

J

Jorge

Hi,

I'm using Wise for Windows Installer so please bear with me! (i'm a
newbie as well!)

I'm at the point where my application installs and uninstalls pretty
well(thank God!). There's just one more thing I want to check:

I want to tell the user to shut down the program before attempting to
uninstall it. I created a WiseScript script that checks whether the
file is "In-Use" and sets a MSI property "fileInUse" to true if it is.
Problem is I'm unable to read the INSTALLDIR property from the
WiseScript. I inserted the following MSI script code at the "Execute
Immediate" sequence, right after the 1st line (Call DLL From
Installation Function Startup (WiseStartup):

If REMOVE ~= "ALL" Then
Set Property fileInUse to false
Run WiseScript from Installation: c:\test\fileInUse.exe
if fileInUse = "true" then
Cancel Installation Please shut down the appServer!!
End
End

When i try to Uninstall, the code is executed as expected, but I am
unable to read the INSTALLDIR property at this point! If I insert a
"display message" action, I see that INSTALLDIR is blank!

Where should I put the code in order to have access to the INSTALLDIR
property? or what should I do?

thanks!
 
P

Phil Wilson

Just running a program like that can't set a property value. How did that
fileInUse property get set? How exactly do you detect that the program is
running? There might be an easier way. Typically you just run a custom
action and don't need to know INSTALLDIR etc.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top