473,387 Members | 1,516 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Shell cmd

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.
Nov 20 '05 #1
2 11713
"brian" <bs******@lbrspec.com> scripsit:
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 K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #2

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?

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: John Bowling | last post by:
I'm creating a routine (not in a browser) to move multiple files on a daily basis to a backup directory. It can be done easily by call shell functions like 'mv file* newdir'. I can't find any...
8
by: Siemel Naran | last post by:
Hi. I'm writing a command shell that reads commands from standard input. At this point I have the command in a std::string. Now I want to execute this command in the shell. From the Borland...
6
by: Lauren Wilson | last post by:
Hi folks, In an A2K app, I have attempted to use the following command in some VBA code with IDENTICAL results with every single version of the following: Shell "outlook.exe", vbHide Shell...
8
by: Mike | last post by:
Am trying to open a Microsoft Word .doc file using Access 2000 with Shell function (on Windows XP Operating system) Here is the code : Shell "C:\Program Files\Microsoft...
5
by: bearophileHUGS | last post by:
For array.array "B" means unsigned char, and such arrays accept to be initialized from (str) strings too, this is quite useful: But it seems such capability isn't shared with the append: ...
3
by: George Sakkis | last post by:
I'm trying to figure out why Popen captures the stderr of a specific command when it runs through the shell but not without it. IOW: cmd = if 1: # this captures both stdout and stderr as...
21
by: Tom Gur | last post by:
Hi, It's seems that csh and tcsh acts a bit different when handling special characters in quotes. i.e: if i'll supply my program with the following arguments: -winpath "c:\\temp\\" tcsh will...
25
by: dennijr | last post by:
ok, shell always used to be easy for me, now its starting to get annoying cause i dont know wats wrong heres the simplist code possible: Private Sub IExplorer_Click() a = Shell("C:\Program...
3
by: mmm | last post by:
I am looking for advice on Python Editors and IDEs I have read other posts and threads on the subject and my two questions at this time are mainly about the IDLE-like F5-run facilities. While I...
7
by: Samuel A. Falvo II | last post by:
I have a shell script script.sh that launches a Java process in the background using the &-operator, like so: #!/bin/bash java ... arguments here ... & In my Python code, I want to invoke...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.