How to Read Command line Parameters from a Script written in a .vbs file. Note: Command() and Command$ do NOT work

I have .vbs file where I have code to perform Mail Merging. This uses parameters like Source and Destination file names. Currently I have hard coded the parameter values into the script and  created an .exe file for this .vbs script file using the ScriptCryptor Software available online. This thing works!!

But need to be able to read the parameters for the .exe from the command line where this program will be invoked from.
I could NOT use the  'Command()' or 'Command$' for the parameters, as it does not identify them in the .vbs script.

Note: I do not have Visual Basic Application available, so just wrote this script in NotePad.

I Need help reading the parameters passed to this .exe file from the underlying .vbs program.

Who is Participating?
David LeeCommented:
Hi, Jose-Valencia.

Use the WScript.Arguments collection.
Bill PrewCommented:
Good write up here too, on named versus positional parms.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.