- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: IS2019 R2 - VBScript action = warning -9018 and doesn't run (worked in IS2016)
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
I upgraded a Basic MSI project from IS2016 to 2019 R2.
I have a custom VBScript action to read 2 values from an id.txt file that is added to the MSI separately for each customer.
The custom action is set to Immediate Execution -and- under Sequence > Install Exec Sequence > After InstallValidate
The build warning is: ISDEV : warning -9018: Custom action 'Read_ID_Text' will be ignored
And in fact the VBScript code never does run during the install.
------------ script code
Function ReadIdAndKey()
' Option Explicit
' SETUPEXEDIR only exists if InstallShield setup.exe file.
' SourceDir is only valid if UNcompressed MSI not single file!
disk1Path = Session.Property("SourceDir")
' readFile= "id.txt"
Const ForReading = 1
Set fso = CreateObject("Scripting.FileSystemObject")
readFile = fso.BuildPath(disk1Path, "id.txt")
' MsgBox readFile
Set srcFile = fso.OpenTextFile(readFile, ForReading, False)
Session.Property("RSP_ID") = srcFile.ReadLine
Session.Property("RSP_KEY") = srcFile.ReadLine
End Function
------------ script code
Thanks for any suggestions!
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
I have checked it using IS2019 R3 and it does work on PC, OS=WIN10.
CA is a VBScript stored in custom action.
Without Function/End Function key words
CA condition: Not Installed
id.txt MUST be present in Disk1 folder.
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
MsgBox "VBScript"
disk1Path = Session.Property("SourceDir")
Const ForReading = 1
Set fso = CreateObject("Scripting.FileSystemObject")
readFile = fso.BuildPath(disk1Path, "id.txt")
MsgBox readFile
Set srcFile = fso.OpenTextFile(readFile, ForReading, False)
Session.Property("RSP_ID") = srcFile.ReadLine
Session.Property("RSP_KEY") = srcFile.ReadLine
MsgBox Session.Property("RSP_ID")
MsgBox Session.Property("RSP_KEY")
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
I have checked it using IS2019 R3 and it does work on PC, OS=WIN10.
CA is a VBScript stored in custom action.
Without Function/End Function key words
CA condition: Not Installed
id.txt MUST be present in Disk1 folder.
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
MsgBox "VBScript"
disk1Path = Session.Property("SourceDir")
Const ForReading = 1
Set fso = CreateObject("Scripting.FileSystemObject")
readFile = fso.BuildPath(disk1Path, "id.txt")
MsgBox readFile
Set srcFile = fso.OpenTextFile(readFile, ForReading, False)
Session.Property("RSP_ID") = srcFile.ReadLine
Session.Property("RSP_KEY") = srcFile.ReadLine
MsgBox Session.Property("RSP_ID")
MsgBox Session.Property("RSP_KEY")
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Thanks for the response.
I upgraded to 2019 R3, re-created the custom action from scratch with the wizard, and am still getting the ISDV -9018 warning.
What where your settings for: In-Script Execution and Install Exec Sequence?
Did you store the script in the custom action, or as a separate binary table entry?
What was the exact Execute Condition syntax? I tried both "Not Installed" and "VersionNT>= 601" (as something that should always be true)
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Correction: the new version of the custom action still gives the ISDEV -9018 warning, but now the action does run.
Apparently upgrading from 2016 to 2019 broke the old custom action, my guess is because it originally had some InstallShield default condition of "always" or something that didn't get upgraded properly.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
IS2019 supports msi and msix build, can you check what build you are getting triggered. If it's msix then there is a chance to ignore the custom actions.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
It is an upgraded IS 2016 MSI project that is still creating MSI files not MSIX