0

I am trying to create a simple program that starts up steam from my computer. I have a shortcut on my desktop of steam and when you double click it, it runs the process "steam.exe"


When my program executes the line of code "system("start steam.exe")" I get an error saying that windows cannot find steam.exe.

How do I fix this?

2
Contributors
9
Replies
10
Views
9 Years
Discussion Span
Last Post by Dave Sinkula
0

Provide the full path to the executable? But really, if your program merely opens a canned program, why not go with just a link to that program to begin with?

0

This is just practicing the basics to make sure my memory hasn't faded :)

But when entering the full path, do I put it in the same string as "start" or is this method different?

0

This would be my first guess:

system("start path/to/steam.exe");

That is what I first tried but it got an error

I put it

system("start C:\Program_Files\Steam\steam.exe");

but I get an error saying it can't find "C:Program_FilesSteamsteam.exe"

it reads it without the backslashes. Is that because of dev-c++?


EDIT: I changed the backslashes to forward slashes but it still says it can't find "C:/Program Files/Steam/steam.exe"

0

hmm that took me to a separate dos window that just repeated the path file of my .cpp back to me

0

awesome thank you for the help!

Oh yeah, now is there a way to check if steam is already running before it tries to execute it?

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.