[Help]How to start another program?[Solved]

Posts 1–12 of 12 · Page 1 of 1
[Help]How to start another program?[Solved]
I know how to have it open a web page but I wanna make a button start a program, and if the program isn't found or on the computer have it have a pop-up window say so.

I was told
Code:
Process.Start(program file path)
would work, well it doesn't I then added the " things still didnt work.


What would do that? +1 thanks and +rep and credit (If you want)

(btw I did search for another post about it before I posted this, so yeah.)
Process.start("notepad")
Quote Originally Posted by .Celtics View Post
Process.start("notepad")
Okay it opens notepad, but I'm trying to make myself a game starter to start my games, well the first one is Crossfire and its not working I tried

Process.Start("crossfire")
Process.Start("crossfire.exe")
Process.Start("Crossfire.exe")
Process.Start("Crossfire")

NONE WORK. . .any ideas? I found a youtube video:




That would take forever and would be a huge code source. . .is that the only way?
I have made a program that open the .exe of the game, but it I needs to be in the folder.

Same code
Process.Start("name of game.exe")
Code:
Process.Start("C:\Program Files\test.exe")
Should work like that I think.
Notpad works because windows has it "preset" Notepad, Wordpad . etc etc.

You need the full file path plus extension otherwise
Okay I got it! Thanks, I got it f*cked up some how. . .but its working now
for example:
Code:
Process.Start ("iexplore.exe")
work ?
Quote Originally Posted by mizzer3 View Post
for example:
Code:
Process.Start ("iexplore.exe")
work ?
It works for selected cases, as NextGen explained earlier some programs are preset in windows and so can be directly called with their executable name. The majority of programs, however, require the full path and extension to run.

i.e

[php]
Process.Start("TheGame.exe") 'this will not work, as "TheGame" is not preset in windows and it doesnt know how to activate it.'

Process.Start("C:\NewFolder\MyFiles\TheGame.exe") ' by defining the full path and extension, windows knows exactly what it should be executing and will work.
[/php]
Quote Originally Posted by Jason View Post


It works for selected cases, as NextGen explained earlier some programs are preset in windows and so can be directly called with their executable name. The majority of programs, however, require the full path and extension to run.

i.e

[php]
Process.Start("TheGame.exe") 'this will not work, as "TheGame" is not preset in windows and it doesnt know how to activate it.'

Process.Start("C:\NewFolder\MyFiles\TheGame.exe") ' by defining the full path and extension, windows knows exactly what it should be executing and will work.
[/php]
yeah , i know. but for some simply progs, like a webbrowser , this will work fine
Code:
Process.Start("C:\FileLocation\New Folder\GameName.exe")
You need to tell it exactly where the game is located.
Quote Originally Posted by iZ3RO View Post
Code:
Process.Start("C:\FileLocation\New Folder\GameName.exe")
You need to tell it exactly where the game is located.
That's pretty much exactly what I posted a few hours ago
Posts 1–12 of 12 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?