Thread: How can I launch an installed software with C++ ?

  1. #1
    Registered User
    Join Date
    Jun 2017

    How can I launch an installed software with C++ ?

    Hello guys
    I am a beginner of C and C++. I am trying to make a program which will be able to open/launch my necessary applications/software. I have did it with ShellExecute() to launch my applications. But with ShellExecute() I will need to add all of my applications path one by one. Can I do this without writing all of my application's path ? For example : If I will write "chrome" then the program will find the chrome.exe and will open it..

    Any suggestions and example code ??

    thanks in advance.

  2. #2
    Programming Wraith GReaper's Avatar
    Join Date
    Apr 2009
    Well, in Windows it gets complicated because a program doesn't necessarily add its directory to the PATH when it's installed. You could do it manually, by parsing the Program Files folders and searching for e.g "chrome.exe". That of course can be quite complicated if it's your first type using the Windows API for files.
    Listing the Files in a Directory (MSDN)
    Devoted my life to programming...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. The rocket launch.
    By Fossaw in forum General Discussions
    Replies: 15
    Last Post: 11-11-2010, 10:44 AM
  2. Launch for c program
    By gashd1889 in forum C Programming
    Replies: 2
    Last Post: 07-02-2010, 11:54 AM
  3. how to launch exe from within program
    By jonezy in forum C++ Programming
    Replies: 7
    Last Post: 07-03-2005, 04:25 PM
  4. was it installed ?
    By black in forum Linux Programming
    Replies: 9
    Last Post: 08-19-2002, 05:41 AM
  5. VS.NET launch
    By Govtcheez in forum A Brief History of
    Replies: 8
    Last Post: 02-08-2002, 01:13 AM

Tags for this Thread