I want to to pass directory or hashtable object as command line argument to vbscript. i am executing VBscript in c# application by using Process.Start() method.By using
Process.StartInfo.Arguments we can pass arguments to script, but this takes only string input.
Anybody know how to pass data other than string ?
0
votes
As the Process.StartInfo.Arguments takes only string as input, clearly you will not be able to pass anything other than string. Probably you should modify your vbscript function so that it takes string as parameter(space seperated key value pairs). Just an idea!!!.
- Tariqulazam
@Tim SChmelter: Actually i want execute diffrent type of scripts files(for example: VB,ps1 etc) and i dont know in advance, which type of script file i have to execute. when only filepath is given it can be executed by Process.Start method. I have to pass hashtable kind of object to all this script file i m executing. I just want to confirm whether it is possible atleast in case of .vbs
- sailer
1 Answers
0
votes
Vbscript doesn't have hashes, the only thing that comes near are dictionary objects but that is not the same. Since you don't know which scripts you want to execute you have to assert the least common deminator and that is string type. So let all your scripts pass the arguments in string to your C function and in this function parse the arguments to the right type to use it in Process.Start