the problem is, is that one of the programs has this PATH (location):
C:\Program Files\Mozilla Firefox\NAME.exe
when i do this in the program (in the correct format from above) it says that it isnt a valid location: C:\Program (or something like that).
how can i make it read spaces in a PATH?
If you dont understand my question just tell me and ill try to explain it some more.
Firstly, switch to / for your directory separators. It's cross-platform and means you don't have to have a leading \ as an escape character for your directory separators.
Wrap the whole thing in escaped quotes, like this:
And to archive the topic, I don't ever recommend doing what the original poster is doing for obvious reasons. To start an executable, you should use possible environmental variables and the OS API to create and start the executable.
And to archive the topic, I don't ever recommend doing what the original poster is doing for obvious reasons. To start an executable, you should use possible environmental variables and the OS API to create and start the executable.
i have NO IDEA what you are talking about. If you think this is a bad way then tell me a better way!
I already have. You should use environment variables and whatever is available in your OS API (WinAPI in your case). System() is very insecure for various reasons.