Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7431833
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T09:21:26+00:00 2026-05-29T09:21:26+00:00

I have 2 programs: program 1 – A Qt program written by me. program

  • 0

I have 2 programs:

program 1 – A Qt program written by me.

program 2 – A program not written by.

My goal is to run program 2 from program 1 ( I know how to do that).

My problem, however, is that program 2 has some .ini files which it looks for. It turns out that the directory program 2 looks in is not the directory of the executable, but rather the directory of the process starting the executable…in this case program 1.

so my error reads something like this:

“could not find file xxx.ini in directory C://directory of program 1//inifiles//…

my question is…is there any way I can go around this? I know it’s a little confusing, so please tell me if something doesn’t make sense.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T09:21:26+00:00Added an answer on May 29, 2026 at 9:21 am

    Assuming you are using QProcess to start program 2, you need to set the working directory by calling QProcess::setWorkingDirectory(const QString &dir).

    The documentation states:

    Sets the working directory to dir. QProcess will start the process in
    this directory. The default behavior is to start the process in the
    working directory of the calling process.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have program that has a variable that should never change. However, somehow, it
I have a program that uses the mt19937 random number generator from boost::random. I
I have two programs- First one being a C program that writes in to
I have two programs written in C++ that use Winsock. They both accept TCP
We have several latency-sensitive pipeline-style programs that have a measurable performance degredation when run
guys I want to start programing with C++. I have written some programs in
From my understanding, it is possible to have programs run before system start-up (e.g.
I occasionally have Python programs that take a long time to run, and that
I am having some difficulty compiling a C++ program that I've written. This program
I'm working in linux. I have two programs that run for infinite time (

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.