Solved

CreateProcess or Shell in VB.NET

Posted on 2006-07-14
1
468 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 500 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
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…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

705 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