By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,649 Members | 1,662 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,649 IT Pros & Developers. It's quick & easy.

Running a program w args

P: n/a
I can use the windows "run" with the following command:

"C:\Program Files\SAS Institute\SAS\V8\sas.exe" -
sysin "c:\filetest\sas programs\spiroread.sas" -sysparm
c:\filetest\0254140.csv

where sas.exe is the application, the -sysin argument is
the SAS program to run, and the -sysparm argument is the
data it needs.

It runs great from the command line, but I've tried
following a few people's advice (to include that of the
SAS Institute) on how to get VB to run this, and I can't
seem to make it work.

Any ideas on what I need to do?
Thanks


Nov 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Hi Ken,

Process.Start gets a process/application running.

The FilePath argument has a space so needs quotes around it. Inside a
string these must be doubled up.

Process.Start ("C:\Program Files\SAS Institute\SAS\V8\sas.exe", _
"- sysin ""c:\filetest\sas programs\spiroread.sas"" -sysparm
c:\filetest\0254140.csv")

Regards,
Fergus
Nov 20 '05 #2

P: n/a
* "Ken Barz" <an*******@discussions.microsoft.com> scripsit:
I can use the windows "run" with the following command:

"C:\Program Files\SAS Institute\SAS\V8\sas.exe" -
sysin "c:\filetest\sas programs\spiroread.sas" -sysparm
c:\filetest\0254140.csv

where sas.exe is the application, the -sysin argument is
the SAS program to run, and the -sysparm argument is the
data it needs.

It runs great from the command line, but I've tried
following a few people's advice (to include that of the
SAS Institute) on how to get VB to run this, and I can't
seem to make it work.


Have a look at the overloaded versions of
'System.Diagnostics.Process.Start' and the 'ProcessStartInfo' class.

--
Herfried K. Wagner
MVP VB Classic, VB.NET
<http://www.mvps.org/dotnet>

<http://www.plig.net/nnq/nquote.html>
Nov 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.