Rephrased question

I have an XP machine where I want to access an *.bat file from anywhere in my command prompt. As an example, let's say it's vcvarsall.bat from my Visual Studio 2010 directory.

Normally, this can be done by adding the directory path of this *.bat file in my User environment variable "Path" with the entry: C:\Program Files\Microsoft Visual Studio 10.0\VC

Having done that, I can now type vcvarsall in the command prompt regardless of the current directory path.

However, this is not working on one of my XP machines. I have tried echo %path, it's there, but the computer is unable to find vcvarsall.

I have tried looking into the cause for this, but was unable to find it. Any insights on this would be greatly appreciated.

Old question - please ignore

This question is not so much about which exe or dll file I'm trying to make use of, but rather the unusual behaviour on one of my XP machines. To prevent confusion, I have rephrased the question as above, but left the old question just for archival purpose. I thank you for the time you take to help me with this.

I have added a path to a DLL file's location (FrameStream.dll) to my System Variable on a Windows XP machine, but when I run an application that loads the said DLL file, an error message tells me that it is not found.

This is the entry of my System variable Path:

%SystemRoot%\system32; %SystemRoot%; %SystemRoot%\System32\Wbem; %NUANCE_VERSION%\bin; C:\Program Files\Microsoft SQL Server\100\Tools\Binn; C:\Program Files\Microsoft SQL Server\100\DTS\Binn; C:\WINDOWS\system32\WindowsPowerShell\v1.0; C:\Program Files\Skype\Phone; C:\Python34\Scripts; C:\Python34; C:\Dev\ffmpeg-20160219-git-98a0053-win32-shared\bin; C:\Dev\SDL2-2.0.4\lib\x86; C:\Ang_delwhenhesgone\WebcamStreamClient\Debug; C:\Ang_delwhenhesgone\ffmpeg_scripts; C:\Dev\opencv_old\build\x86\vc10\bin;

The path of the DLL file is in C:\Ang_delwhenhesgone\WebcamStreamClient\Debug;.

When I type 'echo %Path%' in the command prompt, I get:

C:\WINDOWS\system32; C:\WINDOWS; C:\WINDOWS\System32\Wbem; C:\PROGRA~1\COMMON~1\
NUANCE~1\bin; C:\Program Files\Microsoft SQL Server\100\Tools\Binn; C:\Program F
iles\Microsoft SQL Server\100\DTS\Binn; C:\WINDOWS\system32\WindowsPowerShell\v1
.0; C:\Program Files\Skype\Phone; C:\Python34\Scripts; C:\Python34; C:\Dev\ffmpe
g-20160219-git-98a0053-win32-shared\bin; C:\Dev\SDL2-2.0.4\lib\x86; C:\Ang_delwh
enhesgone\WebcamStreamClient\Debug; C:\Ang_delwhenhesgone\ffmpeg_scripts; C:\Dev

which seems correct.

I should add that I have been able to set up the same Path entry on two other machines (XP and Win10) without any issues. This led me to suspect something is wrong here. Could it be the Japanese locale that's causing the issue? I can only wonder.

Help would be really appreciated.

  • DLL might require registering not just adding to path but that what is not what you question is about
    – SeanClt
    Apr 20, 2016 at 2:06
  • Thanks for the suggestion. The DLL is only an example and I could use regsvr32 for that purpose. However, my question is mainly related to setting the path. For instance, I would like to run FrameStreamDemo.exe from anywhere, but is currently unable to do so. Any ideas?
    – bot1131357
    Apr 20, 2016 at 3:10
  • did you type the .exe part of the name when you run the command? Apr 20, 2016 at 4:23
  • Both FrameStreamDemo.exe and FrameStreamDemo did not work. I am beginning to suspect that this is a freak problem caused by something completely different; but I just couldn't see what the cause is.
    – bot1131357
    Apr 20, 2016 at 5:28
  • -1 I get the impression that this happens with or without that entry in the path.. In which case this entire question is wrong and misleading. So then you should edit the question and not even mention PATH and just describe the problem.
    – barlop
    Apr 20, 2016 at 7:39

2 Answers 2


DLL's are never loaded from the Path, they are loaded from a variety of places. If you want to be able to run the exe from anywhere, there are a couple of possible solutions

  • Use a shortcut to point to the exe instead of the real exe, then the exe can still be close to it's dependencies.
  • Change the program which created the exe to look for the DLL in specific places.
  • Add the DLL to the GAC, or another place in which windows will automatically find it. Here is the list of Windows search locations.
  • Those are valid suggestions, but I am more interested in the cause for this computer's unusual behaviour.
    – bot1131357
    Apr 20, 2016 at 7:34
  • @bot1131357 Do you get this error even without that entry in the PATH?
    – barlop
    Apr 20, 2016 at 7:37

This is awkward... but I've found the answer to this question. The cause of the problem lies in the white spacing.

Instead of this:

C:\Program Files\Skype\Phone; C:\Python34\Scripts; C:\Python34; C:\Program Files\Microsoft Visual Studio 10.0\VC

It should have been this:

C:\Program Files\Skype\Phone;C:\Python34\Scripts;C:\Python34;C:\Program Files\Microsoft Visual Studio 10.0\VC

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .