Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running a Linux commmand from within VS.2003 executable

Status
Not open for further replies.

Halliarse

IS-IT--Management
Jan 8, 2007
213
GB
Help!!

I have written a Visual Basic, VS.2003 executable that generates csv files and saves them to a Linux server, running Centos (Very basic stuff!!), however, once the csv file is in place, I want to be able to automatically log on to the Linux server, navigate to a specified path and then run a Linux command with parameters which include the previously contructed csv file name.

....and now in English...I want to know how to create / run a script from within my executable.

Any help will be, as always, greatly appreciated.

Kind regards

Steve
 
Look into using the System.Diagnostics.Process class to run a telnet or ssh client (such as PuTTY). Use the System.Diagnostics.ProcessStartInfo class to pass parameters to the telnet/ssh client, such as connection info, the csv file name, etc.


I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson

Arrrr, mateys! Ye needs ta be preparin' yerselves fer Talk Like a Pirate Day!
 
You don't need to run the script from the executable. Centos can be set up to watch the path in natively using Gamin and Inotify.

Craig
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top