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 8996037
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T23:42:00+00:00 2026-06-15T23:42:00+00:00

I sometimes need to run a program from cmd.exe. This only seems to work

  • 0

I sometimes need to run a program from cmd.exe. This only seems to work if this program is present in C:\WINDOWS\system32.

So I just copied the .exe file into this folder and until now that worked (for Python and one or two other applications). However, I think this is not the proper way to do it. And when I try this with php.exe, I get an error saying some .dll was not found. I suspect it has to do with relative paths.

Could anyone please point out the correct way to do this?

  • 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-06-15T23:42:00+00:00Added an answer on June 15, 2026 at 11:42 pm

    Depending on your Windows version, you have to find the “Environment Variable” button (in Windows 7 is on “Advanced System Settings” inside “Properties” from “My Computer” context menu); in the “System variables” there should be a variable named PATH. You can edit it and add the paths you want to include separated by ;. Then reboot and it should work.

    In this way you include those paths in the set of directories where cmd.exe search for commands. In your example, the problem is that php.exe is found (since you copied it in System32 which is in the PATH), but the .dll files are still on the php’s installation dir, so you need either to run your program from that directory or to update your PATH including it.

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

Sidebar

Related Questions

I sometimes need to run gacutil.exe or installutil.exe, etc. from the command line. Is
I'm using one .EXE program written on C# (bought it from one company). Sometimes
Sometimes in Salesforce tests you need to create User objects to run part of
Sometimes I need to find some strings inside DB usually it is just host-name
I used to program in Windows with Microsoft Visual C++ and I need to
I've been trying to run my java program overnight but I need to restart
In my Perl/CGI web application, I sometimes need to run a long process which
We have a large C++ application, which sometimes we need to run as a
When i run my java program from bash script, after some times i receive
The following program turns off the monitor. It sometimes crashes when I run it,

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.