1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Development C++ Launch exe from certain line in .ini file?

Discussion in 'Software' started by NikoBellic, 7 Nov 2010.

  1. NikoBellic

    NikoBellic Tech Addict

    Joined:
    9 May 2009
    Posts:
    96
    Likes Received:
    1
    Hi,

    Could anyone tell me if its possible to launch a exe file from a certain line in a config.ini file?

    eg:
    Code:
    [Name]
    "Explorer"
    [Task]
    "explorer.exe"
    
    (Line 2 would ideally change the buttons name and line 4 would ideally change the buttons task)


    at the moment I'm using the following launch method:

    Code:
    private: System::Void button1_Click(System::Object^  sender, System::EventArgs^  e) 
    			 {
                    System::Diagnostics::Process::Start("explorer.exe}");
                }
    
    But I was hoping to change that to something which would enable me to change which app/folder launches through a config file instead of having to go into VS2010 everytime I need to change the launch file

    Thanx in Advanced! :)
     
  2. azrael-

    azrael- I'm special...

    Joined:
    18 May 2008
    Posts:
    3,852
    Likes Received:
    124
  3. Highland3r

    Highland3r Minimodder

    Joined:
    25 Jul 2003
    Posts:
    7,558
    Likes Received:
    16

    This. Use a similar method to launch a specified file/process in C# - specify file/location in app.config file and use that as the parameter to launch the process.

    There's potential security implications with this method which you may or may not need to consider.
     

Share This Page