Can you call installed programs like firefox from C++ code? I would like to do this with arguements, such as which html file to open.
I suppose it would be some kind of call to the operating system?
Can you call installed programs like firefox from C++ code? I would like to do this with arguements, such as which html file to open.
I suppose it would be some kind of call to the operating system?
Could this be done in C++ .NET?
Take a look at the spawn functions.
It would probably also be best to read where the programs are installed by looking in the registry rather than hard coding it, but just take it one step at a time for now.
"I am probably the laziest programmer on the planet, a fact with which anyone who has ever seen my code will agree." - esbo, 11/15/2008
"the internet is a scary place to be thats why i dont use it much." - billet, 03/17/2010
Just CreateProcess(); it with the appropriate command line parameters that firefox takes for opening a certain html file. http://msdn.microsoft.com/en-us/library/ms682425.aspx
ShellExecute is indeed the preferred method on Windows. It launches the URL using the default browser configured on the PC, which I would imagine you have set to Firefox in the "Set Program Access and Defaults" page of the "Add or Remove Programs" control panel, if you're a regular Firefox user. For those that just have IE, it launches that etc.
My homepage
Advice: Take only as directed - If symptoms persist, please see your debugger
Linus Torvalds: "But it clearly is the only right way. The fact that everybody else does it some other way only means that they are wrong"
Thanks. It looks like lots of info to give me a good start.