Passing parms to a script using Process Class?

BillyTheKid

New member
Joined
Jun 7, 2005
Messages
4
Programming Experience
Beginner
Hi I am using the Process Class to run a VBScript file. I need to pass a parameter to the file...but I cant seem to find any members of the class that will do this for me.

VB6 ShellExecute provided a way so I am sure that the Process class in .NET would

Thanks!
 
You need a start method for the purpose ... :)
The Start method is used to initiate a process and is similar to the old VB 6.0 Shell command with one important difference. The Start method will accept not only a program path name, but any file name with a registered extension can be passed as well.

Cheers ;)
 
Thank you very much for your reply

SO...

THis is my code

Dim ShellProcess As New Process

ShellProcess.StartInfo.FileName = path to VBScript
ShellProcess.StartInfo.UseShellExecute = True
ShellProcess.Start()

Now I am confused as to how to pass my parm to the Script. It is a string that is a shortpath to a pdf file

I tried ShellProcess.Start(path to VBScript, my parm)

Thanks again
 
Actually its working like a charm the code was right...the process of preparing the document wasn`t

Thanks for your help. I am a VB6 dev, now in .net.

Loving it but trying to get used to it - I imagine I will be back in the near future ;-)
 
Back
Top