Is there a way to use WScript.Shell's Run method to invoke Start?
The reason is that I want to get ahold of a pseudo-hidden environment
variable, %cmdcmdline%. For example, if (on Win XP) at the Cmd window
you type:
SET XY=%cmdcmdline%
SET
you will see how that cmd window was invoked (simply typing echo
%cmdcmdline% might lead to odd results).
Start has the characteristic, that it will preserve the environment
variable settings. Thus, if at the Cmd window you type:
START cmd.exe
SET XYZ=%cmdcmdline%
SET
you'll see that the results are the same as for the original Cmd
window.
That is why I would like to be able to use
CreateObject('WScript.Shell')->Run to invoke Start. However, Run seems
not to know about Start. Any ideas?
Or perhaps someone has a better method? I've tried
Set aEnv=CreateObject("WScript.Shell").Environment("Process")
then
aEnv('cmdcmdline'), aEnv('=cmdcmdline'), and friends without success.
Thanks,
Csaba Gabor from Vienna