Solved

CreateProcess or Shell in VB.NET

Posted on 2006-07-14
1
458 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
1 Comment
 
LVL 85

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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
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…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

810 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