Hi

Actually you can use both "wScript.arguments" and InputBox(), when you write
vbScripts using PsPad. 

Both of them works, when your final .vbs file is run by the user with
cScript.exe or wScript.exe, which (.vbs) normally is associated in Explorer.exe,
so the user can just doubleclick it, or leftclick it to decide in Explorer.exe's
context menu to run it with either cScript.exe or wScript.exe, and the
difference is that cScript.exe is the "command-line" version, and wScript.exe is
the "Windows" version.

_The purpose of "wScript.arguments"_ is to make it possible for the user to
decide _before_ running your vbScript, which one of your arguments to use,
it could e.g. be silent arguments or something else you want to customize for
your users. If the user wants to use one of your arguments, they normally needs
to make a .cmd file (there are other options), and it could be using your
-silent argument:

cite:
--------------------------------------------------------------------------------
@Echo off
CLS
C:\<YourScriptFile.vbs> -silent
Exit--------------------------------------------------------------------------------


So you need to "catch" the "wScript.arguments" inside your vbScript, and decide
inside your vbScript what to do with e.g. -silent.

_The purpose of InputBox()_ is to make it possible for you to ask the user
_while_ running your vbScript, about something you want to customize for
your users. So you need to decide inside your vbScript what to do with the users
input.

-- 
Sincerely

J. Malmgren
IT-Programmer
Denmark
Version 4.5.7(2441)

<http://forum.pspad.com/read.php?2,59352,59359>
PSPad freeware editor http://www.pspad.com

Odpovedet emailem