Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • December 11, 2016, 02:09:39 AM
  • Proudly celebrating 10 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: 'C:\Program' is not recognized as an internal or external command, operable prog  (Read 45726 times)

kartal

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 1,529
    • View Profile
    • Donate to Member
Hi

'C:\Program' is not recognized as an internal or external command, operable program or batch file.'

I need some serious insight into this problem since this thing started taking a toll on my system.  I am using Windows 7. Couple months ago I have started getting this message. This message shows up anytime I open a command shell(cmd.exe), or any program that relies on windows shell like Python, some installers etc etc. Sometimes because of this error some apps refuse to work or refuse to install as well. I have been searching for a solution for couple weeks and I cannot find any solution.


Does anyone have any insight about why this might be happening?


thanks

« Last Edit: January 18, 2010, 06:23:36 PM by kartal »

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 36,435
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Quote
Does anyone have any insight about why this might be happening?

sounds like it's viewing the space in the path of "C:\Program Files" as a separator.  An old program might do this, or maybe a registry setting that has no quotes around the path?

Target

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 1,606
    • View Profile
    • Donate to Member
I suspect it has to do with the spaces in your path

try putting your path in inverted commas, eg "c:\program files\program\program.exe" or else try the dos notation (c:\program~\program\program.exe)

kartal

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 1,529
    • View Profile
    • Donate to Member
mouser,

The thing is that I get this error now matter which program is using or accesing the shell. Lets say I am running a python script that outputs the shell. The first line of the execution is this message than Python prints out the result of the script.

So it is not an isolated application that is refusing to play nice with the windows shell. It looks like my environment variables are intact. I cannot find any trace of "program files" in the environment variables. Searching for c:\program brings hit loads of results in the regedit so that is not a feasible method.

When I hit win+r and type cmd.exe, this is the message I get. When i run cmd.exe from within the Windows directory, this is the message I get. So the cmd.exe has this message embedded somewhere, since many other apps use cmd.exe, they print out the very similar message.
« Last Edit: January 18, 2010, 06:31:41 PM by kartal »

cmpm

  • Charter Member
  • Joined in 2006
  • ***
  • default avatar
  • Posts: 2,025
    • View Profile
    • Donate to Member
This looks close to the problem. The first post starts at the bottom of the page and go up to see replies.

Hope it helps.

http://bugs.python.org/setuptools/issue2

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,029
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Try this :)

The first hit sounds pretty promising - I'm pretty curious why you'd have something added to cmd.exe autorun though, and why it's malformed (missing quotes around "program files" - and why it's even depending on a hardcoded string that won't work on i15d windows versions, when it could do %ProgramFiles% :))
- carpe noctem

kartal

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 1,529
    • View Profile
    • Donate to Member
f0dder, DANGGGG!!!

Something called FAR( not Farr) which is one of my favorite file browsers actually added itself as autorun to cmd  >:(

After removing the culprit registery settign that is pointing to the FAR executable, everything has gone back to normal

thanks for the help guys. I was looking for this for couple weeks.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 36,435
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
nice find f0dder.  :up:

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 36,435
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Quote
I was looking for this for couple weeks.

you should have known to ask for help on dc before waiting so long.. pride got ya!

kartal

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 1,529
    • View Profile
    • Donate to Member
mouser, that sure was a big mistake. I am also ashamed to admit that I was using the wrong search terms :( But really up until today it did not occured me that there would have been an auto execution thing at cmd runtime.

Nice find really f0dder

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,029
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
FAR? I used to use that back in the DOS days, was a pretty nice app (but hey, I don't expect any less from the WinRAR guys :)). Weird that it adds itself to auto-start though, and even weirder that it does it in a buggy way.

Nice that it was an easy fix and it wasn't something malicious that tried to be sneaky.
- carpe noctem

kartal

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 1,529
    • View Profile
    • Donate to Member
FAR is in active developement as far as I can tell. I definitely recommend it if you are into dualpane dos stuff.

Come to think of it, that particular implementation of Windows shell can be quite dangerous considering that it is also put deep in the registry, how would one figure it out if something fishy is going on or not if the shell does not producue any error really?


f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,029
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
s/dos/console-mode :) - doesn't seem to be a DOS version of it anymore? (unlike RAR, which is available in both DOS and win{32,64}-console and a lot of other versions).

How did the integration happen, btw? Default on install, or some checkbox, or some obscure menu item, or a .reg file or something else you might've done manually but forgotten? It seems very wrong to do the integration by default, considering you don't always want file management when you launch a shell...
- carpe noctem

kartal

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 1,529
    • View Profile
    • Donate to Member
That I do not remember. But my suspicion is that another program or a plugin might have set it up. I am using something called ConEmu that can embed FAR by default. That is my first suspicion

http://code.google.c...m/p/conemu-maximus5/

"ConEmu-Maximus5 is a Windows console emulator, which represents multiple consoles as one customizable GUI window with various features. Basic application - joint use with FAR manager. "

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,029
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
How does ConEmu compare to console? (guess I should just download ConEmu myself and have a go :P)
- carpe noctem

kartal

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 1,529
    • View Profile
    • Donate to Member
Well, Console has this thing with Windows desktop, it shows up the desktop in the background the whole time, not sure if there is a solution to that. On the other hand ConEmu has quite a bit of settings and can be used easily with things like FAR

I also use Conemu with Ipython, seems like theya re good match.

I think you should give it a go and let us know what you think. I am not an expert on these issues :)
« Last Edit: January 19, 2010, 11:10:16 AM by kartal »

kartal

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 1,529
    • View Profile
    • Donate to Member
Btw Conemu has 64bit builds as well

aantonyrobert

  • Participant
  • Joined in 2013
  • *
  • Posts: 2
    • View Profile
    • Donate to Member
Hi

'C:\Program' is not recognized as an internal or external command, operable program or batch file.'

I need some serious insight into this problem since this thing started taking a toll on my system.  I am using Windows 7. Couple months ago I have started getting this message. This message shows up anytime I open a command shell(cmd.exe), or any program that relies on windows shell like Python, some installers etc etc. Sometimes because of this error some apps refuse to work or refuse to install as well. I have been searching for a solution for couple weeks and I cannot find any solution.


Does anyone have any insight about why this might be happening?


thanks


you have to keep space after typing "c:"........."c: \program files\....."

aantonyrobert

  • Participant
  • Joined in 2013
  • *
  • Posts: 2
    • View Profile
    • Donate to Member
YOU HAVE TO KEEP SPACE AFTER TYPING "C:".
EXAMPLE:
C: \PROGRAM FILES\.....