Solved

CreateProcess or Shell in VB.NET

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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

708 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now