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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T03:02:20+00:00 2026-06-17T03:02:20+00:00

I need to run start cmd.exe /k C:\Program Files (x86)\Mozilla Firefox\sdk\bin\activate & cd d:\home\name\addon\

  • 0

I need to run

start cmd.exe /k "C:\Program Files (x86)\Mozilla Firefox\sdk\bin\activate & cd d:\home\name\addon\ & cfx run"

The problem is that first path has spaces (Program Files). I can’t use quotes, because they are used for full command already.

How can I use spaces in this command?

  • 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-17T03:02:20+00:00Added an answer on June 17, 2026 at 3:02 am

    Who says you can’t add quotes around the exe path when the /C command is already quoted? It works fine ! 🙂

    start cmd.exe /k ""C:\Program Files (x86)\Mozilla Firefox\sdk\bin\activate" & cd d:\home\name\addon\ & cfx run"
    

    The outer quotes around the /C command are removed prior to execution, leaving only the quotes around your exe path. You can read about how CMD process quotes in the help. Simply type CMD /? or HELP CMD from a command prompt. It does get confusing.

    If /C or /K is specified, then the remainder of the command line after
    the switch is processed as a command line, where the following logic is
    used to process quote (") characters:
    
        1.  If all of the following conditions are met, then quote characters
            on the command line are preserved:
    
            - no /S switch
            - exactly two quote characters
            - no special characters between the two quote characters,
              where special is one of: &<>()@^|
            - there are one or more whitespace characters between the
              two quote characters
            - the string between the two quote characters is the name
              of an executable file.
    
        2.  Otherwise, old behavior is to see if the first character is
            a quote character and if so, strip the leading character and
            remove the last quote character on the command line, preserving
            any text after the last quote character.
    

    Your command has more than 2 quotes, so option 2 is followed.

    The only time the above won’t work is if your exe name contains a special character like &, for example this&that.exe. That causes a problem because the exe name is not quoted when the START command is initially parsed. That can be fixed by escaping the problem character within the file name.

    start cmd.exe /k ""this^&that.exe" & echo something else"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a command that i need run by cmd.exe when something happens in
Why do we need to run the thread through start method and not directly
i need help with a small programm, i just want to start a CMD
I start developing a site using Rails 3.x and I need to run multiple
I need to get the revision number from TFS, if i run tf.exe from
I have the program unzipping the file to %temp%\myfolder\ I need to run a
My Procedure last day as below Click Start, Run and type Regedit.exe Navigate to
In my c# program I generate a batch file and run it with cmd.
I am creating a GUI application(wxPython). I need to run another (.exe) application from
I need to start the command window with some arguments and run more commands

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.