/build/static/layout/Breadcrumb_cap_w.png

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

0 Comments   [ + ] Show comments

Answers (14)

Posted by: Inabus 16 years ago
Second Degree Green Belt
0
We will need additional information to fix this.

1) What is the script your running?
2) What sequance is it set too?
3) Is the INI file your after reading deployed as part of the installation.

Paul
Posted by: julien 16 years ago
Yellow Belt
0
1) I execute a script VBS and I execute after InstallFinalize
2) The INI File is not deployed after the installation.

the product that I do use is Wise Package Studio, I read that sometimes Wise did not interpret the Wscript order well when a script VBS was executed, is this truth?
Posted by: Inabus 16 years ago
Second Degree Green Belt
0
I would move the script to before Install Finalise not after, see if that helps.

Paul
Posted by: julien 16 years ago
Yellow Belt
0
I had already tested what you proposed and that still does not go. I also tested other methods to execute script and it is similar.

Julien
Posted by: Robo Scripter 16 years ago
Orange Senior Belt
0
Please post the code.

Regards,
Posted by: cygan 16 years ago
Fifth Degree Brown Belt
0
hi julien

whats the error code that you get

if you script runs manually without any errors and it executes the logic in your vbs script

then it should work in the msi


how did you sequence the custom action
what condition did you set
what processing options did you choose
Posted by: mark_holland21 16 years ago
Fourth Degree Green Belt
0
Hi,

You may be having problems with the Wscript option in VBScript. Wise doesn't like this.
check through your code and ensure you con't have any Wscript options, i.e WScript.Echo etc. Wise doesn't like these. What is the error code? Could we see the Script?
Posted by: anonymous_9363 16 years ago
Red Belt
0
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
Senior Yellow Belt
0
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.
Posted by: anonymous_9363 16 years ago
Red Belt
0
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
Senior Yellow Belt
0
Note that I said easy way around the issue, not best practice or the way WPS should actually work.
Posted by: anonymous_9363 16 years ago
Red Belt
0
I still disagree that your course of action is easy, as the OP now has to find out about how to use WiseScript. He can take his external script and 'import' it into the Binary table in seconds without having to go near WiseScript.
Posted by: Burner 16 years ago
Senior Yellow Belt
0
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.
Posted by: anonymous_9363 16 years ago
Red Belt
0
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.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ