we have msi installer build with MSI Factory with a couple of custom action scripts (lua
& vbs
). one of the scripts try to get a custom property from package and write it to file after successfully installation. this custom property is added to downloaded package via MSI.ChangeMSIProperty
in asp.NET handler when download was requested with parameters. problem is, that property change brokes the signature of msi file, so we try to add some data to the msi filename. now I need to change that vbscript to handle this. but I can't get the installers filename.
Dim data, tokens
Dim fso, f
Dim setupExeFilename, setupExeFilenameParts
data = Session.Property("CustomActionData")
tokens = Split(data,"|")
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.CreateTextFile(tokens(0) & "\\data.txt", True)
if tokens(1) = "_DEFAULT_" then
setupExeFilename = Session.Property("SETUPEXENAME")
setupExeFilenameParts = Split(data,".")
f.Write setupExeFilenameParts(UBound(setupExeFilenameParts) - 1)
else
f.Write tokens(1)
end if
f.Close
I found Session.Property("SETUPEXENAME")
somewhere but doesn't work for me. I search for some property in Session, Session.Property, Session.ProductProperty, Installer but no luck yet. Installer object is present as I try, but no property returns what I need.
If not Installer is nothing then
msgbox "Installer ok"
msgbox Installer.version
end if
is it possible to get the installer filename?