Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to start up an exe with parameters

I am new to Visual Basic. I am using VB Premium 2012. Is there a way I can open/start up an exe file (not my app) with params. I know we can do it in batch coding using echo and stuff. Can it be done in vb?

I want to open up "app.exe" with params as "-login usernamehere passwordhere"

like image 887
user1713546 Avatar asked Nov 30 '25 02:11

user1713546


1 Answers

Try this

Dim pHelp As New ProcessStartInfo
pHelp.FileName = "YourApplication.exe"
pHelp.Arguments = "parameter1,parameter2"
pHelp.UseShellExecute = True
pHelp.WindowStyle = ProcessWindowStyle.Normal
Dim proc As Process = Process.Start(pHelp)

I hope this helps...

like image 54
Nigel Findlater Avatar answered Dec 02 '25 19:12

Nigel Findlater



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!