Problem with command line in windows

To open a command prompt at a specfic location, just hold down the Shift key when you right-click on a file or folder, and you should see the Open Command Window Here menu item.


You can't usually just copy executables and expect them to run. There are often other files - dlls, configuration files and, in this case, message files that they need to run. These are usually specified by a relative pathname so the executable can no longer find them and so fails.

To solve this particular error you'd need to locate the message file and copy that, but then there might be something else missing which would prevent the application working.

UPDATE

From your comment it's apparent that the path has been modified. That has, in all probability, removed the folder containing the message file from the path, thus rendering it invisible to the application.

I'm not 100% sure whether this is pure Windows Vista or Cygwin (based on the path you quote in your question) and as I'm not that familiar with either (I stuck with XP and I'm moving straight to Windows 7) I don't know what the correct path should be. On XP it's in "C:\WINDOWS\system32", but they might have moved it for Vista.

Do you have a restore point from before you installed these programs yesterday? If so go back to that and reinstall, but don't modify the path.

Restore points are often created by programs just before they install, or you can create them manually. Go to All Programs > Accessories > System Tools > System Restore and run the Wizard. The second page should have a list of restore points. Select one from just before you installed these programs. However, you if you know where "cmd.exe" should reside then you could just update the PATH.


You're getting those messages because you're running the CMD.exe from a folder different than what's defined in the %COMSPEC% environment variable. WHY that matters, I'm not sure, probably due to dependencies.

If you want to open a command prompt to a specific folder you can right-click and pick "Open Command Window Here" (built into Vista and 7). It's extra slick because if you do it on a network share Windows will automatically map a drive letter to it for you.

Another option is to make a new CMD shortcut.

Make a new shortcut, enter %COMSPEC% as the Target, and give it a name you'd like. Once it's created, edit the shortcut and change the "Start in" path to where you'd like the command prompt to open to.


A very simple batch file should do the trick.

@set path=%path%;c:\utils
@cd \mydir
@cmd.exe

This allows you to add to your environment, select your starting folder and any other thing you want to happen in your system.