I have a package which binds my product and MATLAB run time as a dependency. The dependency should be installed only if its not present in target machine. I have selected deferred execution of a VB script (It should fire after File transfer).
Here's the code:
public function MatlabCheck()
Dim MATLABVal
MATLABVal = Session.property("MATLABROOT")
If Len(MATLABVal) = 0 Then
Set objShell = CreateObject("WScript.shell")
Dim cmd
cmd = Session.Property("INSTALLDIR\v1.0\dependencies\MCR_R2013b_win32_installer.exe")
objShell.run cmd
end if
end function
Note that I have put MATLABROOT property under Additional Requirements.
Using InstallShield Limited Edition on VS 2013.
I tried running this setup with the script integrated, however, it didn't work.