Shell cmd

  • Thread starter Thread starter brian
  • Start date Start date
B

brian

I have an external program that needs to be ran using a
shell cmd. Can someone please tell me how to run it in a
vb.net program.

The string used is:
"c:\program files\visual cut.exe" -
e "C:\CrystalReports\labels.rpt"

Thanks-

is the System.Diagnostics.Process the same as using the
shell cmd? The external program was designed to pass a
string into the shell cmd.
 
brian said:
I have an external program that needs to be ran using a
shell cmd. Can someone please tell me how to run it in a
vb.net program.

The string used is:
"c:\program files\visual cut.exe" -
e "C:\CrystalReports\labels.rpt"

Thanks-

is the System.Diagnostics.Process the same as using the
shell cmd? The external program was designed to pass a
string into the shell cmd.

Have a look at the 'ProcessStartInfo' class and the overloaded versions
of the 'Process.Start' method.
 
Herfried,

I have tried the system.diagnostic.process.startinfo and can't figure
out what I need to do. This schedule string which works in the windows
built in scheduleter works. It states:

"c:\program files\visualcut.exe" -e "C:\CrystalReports\labels.rpt"

"c:\program files\visualcut.exe" : Program to be ran
-e : Command line switch
"C:\CrystalReports\labels.rpt" : The file to be used
with the program

I have tried the following:

Dim myprocess As System.Diagnostics.Process = New
System.Diagnostics.Process()
myprocess.StartInfo.FileName = "Visual Cut.exe"
myprocess.StartInfo.WorkingDirectory = "C:\Program Files\Visual
CUT"
myprocess.StartInfo.Arguments = " -e" & " G:\CEC
Project\updates\Reports\Estimate.rpt" 'put your command line parameters
here"
myprocess.Start()

Do you have any further idea's?
 
Back
Top