hi can i know what vb script skills are required in packaging?

0 Comments   [ - ] Hide Comments


Please log in to comment

Answer this question or Comment on this question for clarity



I would say the most used objects in VBS for MSI custom actions are

- Shell object ("Wscript.Shell")

- FileSystem object ("Scripting.FileSystemObject")

- Network object ("WScript.Network")


That plus knowing MSI custom actions run in their own runtime specific to Windows Installer, so the WScript runtime is not available, which means you call CreateObject instead of WScript.CreateObject and the like should get you a long way.

As a general statement, the main functions you will not need often in VBS when writing VBS custom actions are the ones that have to do with user interaction (echo's, msgboxes...), anything else is good to know.

Answered 09/24/2012 by: pjgeutjens
Red Belt

Please log in to comment

Pieter makes a good point about user interaction not being utilized as often as other skills.  I would add that scripting is more than just writing a few lines of code - otherwise anyone could do it and call themselves a "scripter".

If you plan on doing script work, learn to create and use functions.  A good script anticipates things going wrong and deals with them accordingly (and that does not mean starting a script with "on error resume next").  Learn how to take the result from one action and utilize that to influence the next action.  Was the file copy successful?  Does the target directory exist?  Does the account being used have rights to perform that function?

A lot can be done with good scripting; if you just plan on all turning out well, you're not doing your employer any favors.

Answered 09/24/2012 by: Arminius
Second Degree Green Belt

Please log in to comment