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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T11:05:24+00:00 2026-06-06T11:05:24+00:00

when I run exec(‘C:\execute\batfile.bat’); it works when my xampp is installed in C: but

  • 0

when I run exec('C:\execute\batfile.bat'); it works when my xampp is installed in
C:

but when I move my codes in another server the xampp there is installed in
D:

so my code exec('D:\execute\batfile.bat'); fails and doesn’t show any errors when I test in browser.

Please help on how to run a bat file not saved in C:

Thank you so much

  • 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-06T11:05:26+00:00Added an answer on June 6, 2026 at 11:05 am

    thanks for your suggestion and solutions 🙂

    I follow the suggestion of @preet sangha and find “ERROR: The parameter is incorrect”.

    Then I researched more on what is the cause of incorrect parameter. Then I stumble upon the answer of juan at laluca and ernestokarim in http://php.net/manual/en/function.exec.php. And I follow the answer of ernestokarim

    Start > Run > “services.msc”

    Search the Apache Service, right click and select Properties.

    You will see two radio buttons, check the first if it isn’t, and then
    check too the check box below.
    Under Log On Tab

    Now restart Apache

    I realize that for some reason when xampp is installed in C, function exec works fine but when you installed it in other drive it doesn’t because of some permission issues.
    The above steps solve my dilemma 🙂

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

Sidebar

Related Questions

When I run bundle exec rake assets:precompile --trace , my precompilation fails but I
When I run /(a)/g.exec('a a a ').length I get 2 but I thought it
I'm trying to run mvn exec with multiple system properties...it works ok with one
Could you please tell me how to run exec() command on windows server 2003
I'm trying to run exec-maven-plugin 's exec:java goal on a simple two-module project where
hy, in my script i run a exec() function to make a movie file
Today I run this select 'exec sp_refreshview N''['+table_schema+'].['+table_name+']''' from information_schema.tables where table_type = 'view'
I am trying to run this code : exec myStoredProcedure Cast('c5b48202-36af-4597-9780-5366d4188f55' AS uniqueidentifier), 744,
We're using the Maven exec:java goal to run a custom java application that configures
Can I run a PHP CGI script as a background process using exec() ?

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.