Thursday, December 13, 2007

The system cannot execute the specified program

It always annoys me no end when I get messages like the following:

"The system cannot execute the specified program."

I got the above error from Windows XP when I tried to execute a program I use all the time. The message is hugely aggravating because it says the obvious without giving any actionable information.

If you have such a problem and you are executing from a deep directory structure that may be your problem. It was in my case.

Looking on the web with that phrase brought up a bunch of arcane stuff that did not apply to me. It mostly brought up long threads (as these things tend to do) which follow this pattern:

'Q' is the guy with the problem asking for help 'A' can be any number of people who jump in to 'help'.

Q: I got this error "The system cannot execute the specified program." when I tried to ... [long list of things tried]

A: What program were you running, what operating system, where is the program? What type of drives do you have? Do you have a USB device plugged in? What is your middle name?

Q: After your question, I have unplugged everything and re-installed everything and I still have the problem. The problem occurs with some of the programs I am trying to use from the command line. The problem seems almost random.

A: Make sure you do a complete backup. You can't backup properly with Windows. You will need to buy a third-party product. Once you have backed up and tested your backup on another machine, try the following completely tangential and dangerous things. [long list of dubious actions including editing registry keys, changing security settings, removing anti-virus software, etc.]

Q: I took a couple days off work, bought the latest anti-virus software and ran it on my machine, bought a top of the line backup system and then tried your other suggestions. It broke something else and I still have the problem.

A: I actually just opened the windows in my office to cool things down and the problem went away. Have you tried installing more fans in your case?

Q: The machine is brand new and has no problems with heat. I still have the problem. I have put in a request for help from Microsoft, but have not heard anything back.

A: I hate to suggest this, but you may just have to completely re-install everything again, get new versions of the service packs and make sure you have all the most recent stable drivers. Make sure you check the md5 hash checksums on every file, just in case. A low-level scan of your hard disk would not hurt either.

Q: I did as you suggested. Everything is up to date. Everything is fine except for this one problem with a few programs.

A: I'm stumped

A: Me too.

Q: No problem. I finally got it working. I did as suggested by my chiropractor and bought a new chair. After some adjustments to my spine, which may have been giving off some bad 'vibes' being picked up by the machine, I took a more positive attitude, copied all my work to a new directory and just went to work. Thanks for your help!

---------

Well, I finally did figure it out for real (in my case). I was using some older 16-bit programs and I was trying to execute them from a directory that was very deep. When I went up a couple of directories, everything was OK.

I am apparently the only person in the world that has ever tried to use an old program from a directory over ten levels deep or more than 65 characters long or whatever the precise problem is.

Note that YMMV. The error message in question is pretty much useless. It says that the program won't run. It reveals no information as to what it might be.

If anyone has suggestions for keywords that would help someone to get here and get their answer, please let me know.

1 comment:

David Gray said...

You might not be quite one in a million; your page was the third entry returned by Google for my search, putting it ahead of over forty thousand others on the subject. Maybe that's because your solution for this supposedly arcane problem is spot on, and preserved my sanity.

Linguistic Loot: The Secret Behind English's Global Charm

In the grand bazaar of languages, English is the shopaholic, ever eager to fill its lexical cart with linguistic souvenirs from around the g...