Lynn McGuire wrote:
> "notepad dii.bat" refuses to open my dii.bat file and is giving
> me a error message box, "Cannot read registry path". Does anyone
> know what is going on here ? I am typing the notepad command
> into a command prompt window.
>
> Windows 7 x64 ultimate, Intel quad core, 8 GB ram.
Back in the DOS days, an executable was found by looking in the current
(working) directory and, if not found, looking through the PATH
environment variable (in the order the directories were listed).
However, in NT-based versions of Windows, another method of finding
executables is to store their paths in the registry. See the "Search
Paths" section of
http://www.tech-pro.net/intro_reg.html where the
entries are recorded under:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Curr entVersion\App Paths
What's is peculiar in your case is that the C:\Windows\system32 path
should be included in the PATH environment variable. If you look in the
App Paths registry list, you won't see notepad.exe list. That's because
it should be found by looking through the PATH environment variable
(unless, of course, you happen to be in the C:\windows\system32
directory at the time you execute notepad.exe). If you run:
C:\Windows\system32\notepad.exe
does the program load okay? What if you run your own non-pathed command
line but include the .exe extension, as in "notepad.exe dii.bat"? It's
possible there is another executable, like notepad.com or notepad.bat,
that gets found (by PATH or registry app path) before finding the .exe
version. Always specify the full filename, including extension, to run
an executable. If the executable cannot be found in the current
directory (you didn't mention what it is in your command shell) or in
the PATH variable or in the registry app path entries then you need to
specify the full path to find the executable file.
The check what is the current value for the PATH environment variable
(both the user and system versions), run in a command shell:
echo %path%
or
set path (shows all env vars starting with "path")
In the PATH var, is C:\Windows\System32 listed? Is anything listed?