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

  • Home
  • SEARCH
  • 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 7606167
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T00:20:31+00:00 2026-05-31T00:20:31+00:00

I am trying to run an executable from a c++ program. I have looked

  • 0

I am trying to run an executable from a c++ program. I have looked and found 2 options:
system(“C:\filepath\file.exe”);
and
ShellExecute(GetDesktopWindow(), “open”, “C:\filepath\file.exe”, NULL, NULL, SW_SHOWNORMAL);
Everything is beautiful, except it doesn’t work.
For the first option, I had to include, apart from windows.h, also cstdlib, otherwise my code didn’t build.
When I run the program, I get the error:
“file.exe” is not recognized as an internal or external command
I have set the Common Language Runtime Support (/clr) option for my project (and I also had to set the option Multi-threaded Debug DLL (/MDd) for the Runtime Library, otherwise again, it wouldn’t build).
The second option will not build even with both libraries included. I get error:
error C3861: ‘ShellExecute’: identifier not found

I am using VS2010 on Windows7 – and would like this to work on multiplatform…

Am I asking too much ?
Thank you.

  • 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-31T00:20:32+00:00Added an answer on May 31, 2026 at 12:20 am

    Note that I wrote in my question: I have set the Common Language Runtime Support (/clr) option. I did that because of a previous error suggested it.

    As soon as I removed that option, I was able to run the executable. Perhaps unmanaged code must remain unmanaged…

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

Sidebar

Related Questions

I am trying run a program from a qmake .pro file which modifies the
I have an executable file (ffmpeg) that I'm trying to run with a Java
I've been trying to create an executable file from a Makefile to run a
Trying to run my program in FreeBSD OS, I have the following results: $
I'm trying to run a batch file, as another user, from my web app.
I'm trying to make a Python script run another program from its own path.
I am trying to write a simple Ruby program that I will run from
I am trying to run a program from the command prompt in windows. I
I am trying to exec git describe in ant from inside eclipse. I have
I'm trying to execute a program (convert from ImageMagick, to be specific) whose parent

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.