.NET Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgramming.NET Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old September 20th, 2004, 12:55 PM
Schadrach Schadrach is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: May 2004
Posts: 55 Schadrach User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 28 m 38 sec
Reputation Power: 6
(VB.Net) How do I call an external program?

I'm writing a simple, console VB.Net program, and I can't seem to get it to run other programs from within it.

I've been reading up on the question, and most people suggest either calling Shell from the Microsoft.VisualBasic.Compatibility namespace, or calling System.Diagnostics.Process.Start("Program to execute"). I can't seem to get either approach to work.

I've got a skeleton program (just a module declaration with sub main in it) written to try to test it, but I can't get it to work.

Could someone explain to me how to do this?

Reply With Quote
  #2  
Old October 8th, 2004, 03:21 AM
Jasdeep Jasdeep is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Posts: 4 Jasdeep User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thumbs up did you find the answer?

Hi,
If you have found the answer to your question then it would be great if you could share it with me.

Thanks,

Jasdeep
Quote:
Originally Posted by Schadrach
I'm writing a simple, console VB.Net program, and I can't seem to get it to run other programs from within it.

I've been reading up on the question, and most people suggest either calling Shell from the Microsoft.VisualBasic.Compatibility namespace, or calling System.Diagnostics.Process.Start("Program to execute"). I can't seem to get either approach to work.

I've got a skeleton program (just a module declaration with sub main in it) written to try to test it, but I can't get it to work.

Could someone explain to me how to do this?

Reply With Quote
  #3  
Old November 28th, 2004, 12:24 PM
wolfb wolfb is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Nov 2004
Posts: 1 wolfb User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Talking Shell function Maybe multithreading

Try using Shell("c:\windows\notepad.exe"). The Shell function still exists in VB.NET. I just had to solve this problem myself. You put the path of the program as the arguement.

If you're looking for Mulithreading try looking up Asynchronous Programming in the MSDN. I haven't actually done any multi threading with VB.NET yet.

Reply With Quote
  #4  
Old July 15th, 2005, 06:37 PM
jthomas jthomas is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jul 2005
Posts: 1 jthomas User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 m 30 sec
Reputation Power: 0
Dim myprocess as new System.Diagnostics.Process()
myprocess.startinfo.filename = "c:\somepath\processname.exe"
myprocess.startinfo.Arguments = "/someargument"
myprocess.start

The myprocess.startinfo.arguments is optional, and if you google the system.diagnostics.process.startinfo namespace you'll find all sorts of other functionality you can incorporate into your external process manipulation.

Hope that helps.


"my app did WHAT!?" - co-worker and friend

Quote:
Originally Posted by Schadrach
I'm writing a simple, console VB.Net program, and I can't seem to get it to run other programs from within it.

I've been reading up on the question, and most people suggest either calling Shell from the Microsoft.VisualBasic.Compatibility namespace, or calling System.Diagnostics.Process.Start("Program to execute"). I can't seem to get either approach to work.

I've got a skeleton program (just a module declaration with sub main in it) written to try to test it, but I can't get it to work.

Could someone explain to me how to do this?

Reply With Quote
Reply

Viewing: ASP Free ForumsProgramming.NET Development > (VB.Net) How do I call an external program?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump





 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 3 Hosted by Hostway
For more Enterprise Application Development news, visit eWeek