Problem with Script VBS
Hi,
I meet an error message at the time of the installation of my package. At the end of the installation I execute a script which reads in a file ini a value and which then writing in a key of register. When I execute my script locally I do not have an error message but as soon as it is inside the MSI I have a message of error. Is what somebody already met a problem during the execution of a script VBS inside a MSI?
Thanks
I meet an error message at the time of the installation of my package. At the end of the installation I execute a script which reads in a file ini a value and which then writing in a key of register. When I execute my script locally I do not have an error message but as soon as it is inside the MSI I have a message of error. Is what somebody already met a problem during the execution of a script VBS inside a MSI?
Thanks
0 Comments
[ + ] Show comments
Answers (14)
Please log in to answer
Posted by:
Inabus
16 years ago
Posted by:
julien
16 years ago
Posted by:
Inabus
16 years ago
Posted by:
julien
16 years ago
Posted by:
cygan
16 years ago
Posted by:
mark_holland21
16 years ago
Posted by:
anonymous_9363
16 years ago
To clarify, it's not that Wise doesn't like it but the Installer engine which contains its own scripting runtime and knows nothing of the WScript object. Thus, any MSI authoring tool would choke on WScript directives. Maybe one day, the vendors will build in parsers which will flag this type of error at compile-time. Everybody, begin holding breath.........NOW!
Posted by:
Burner
16 years ago
Posted by:
anonymous_9363
16 years ago
VbScab is right on, the runtime in Wise only has a subset of the abilities. The easy way around this to have your custom action just launch a WiseScript that launches your VBScript.That's easy?!? :) It's easier to add the script to the installation, using 'Call VB Script from Installation', such that it gets stored in the Binary table.
Posted by:
Burner
16 years ago
Posted by:
anonymous_9363
16 years ago
Posted by:
Burner
16 years ago
I was not assuming that the OP did not have experience with WiseScript.
Nevertheless since he already did the steps that you are suggesting, I thought I would be easier than re-writing a perfectly good script in a limited runtime of Vbs. Perhaps you have some knowledge you could share of exactly which commands WPS restricted from their runtime, I have found it every troublesome to get working VB code rewiten correctly to continue to work once its in WPS. Please share.
Nevertheless since he already did the steps that you are suggesting, I thought I would be easier than re-writing a perfectly good script in a limited runtime of Vbs. Perhaps you have some knowledge you could share of exactly which commands WPS restricted from their runtime, I have found it every troublesome to get working VB code rewiten correctly to continue to work once its in WPS. Please share.
Posted by:
anonymous_9363
16 years ago
Now that IS easy :) Any time you might go to write "WScript[dot]something", such as "WScript.Echo" it won't work. I have previously posted code here which allows packagers to have one script which can work externally and internally, by testing for the 'Session' object and seeting a Boolean. Your code then just needs to test the Boolean and branch accordingly. Using WScript.Echo as an example, the script would still use that directive if Session wasn't an object but write to the install log (if logging is enabled, of course) if it was.
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.