Solved

CreateProcess or Shell in VB.NET

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

685 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