?
Solved

CreateProcess or Shell in VB.NET

Posted on 2006-07-14
1
Medium Priority
?
471 Views
Last Modified: 2008-02-01
Ok this is what im wanting to do. I want to create a program that will, upon hitting connect will load up call of duty 2 and connect you to the server of the ip you typed in, in the program. I did this along time ago for Call of duty the origional in c++, but i reformatted my computer and now remaking it and this time decided to do it in vb since i bought the compiler, might as well use it.  So my question is, should i use CreateProcess or Shell?? i have to send input into call of duty which will include "connect" "IP" without "" of course. Any ideas which would be better?
0
Comment
Question by:d0s
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 86

Accepted Solution

by:
Mike Tomlinson earned 2000 total points
ID: 17112247
Most likely...Neither.

Are you not just passing command line parameters to Call of Duty?...

Use the Process() class:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemDiagnosticsProcessClassTopic.asp

One way:

    Dim pInfo As New ProcessStartInfo
    Dim p As Process

    pInfo.FileName = "C:\Program Files\Activision\Call of Duty 2\CoD2SP_s.exe"  ' whatever the filename is
    pInfo.Arguments = "connect 1.2.3.4" ' whatever the arguments are...

    'Start the process.
    p = Process.Start(pInfo)
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question