Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: apppaths
All uncompiled scripts run via winbatch.exe, so the PATH when running an uncompiled WBT might look something like:
PATH=D:\Program Files\WinBatch\system\;D:\Program Files\WinBatch\System\;;D:\WINNT\system32;D:\WINNT;D:\Program Files\Mtx;C:\WINDOWS;C:\WINDOWS\COMMAND;c:\;c:\dos;
When you compile the script into xyz.exe, then xyz.exe is looked up in the AppPath section, and if nothing is found, nothing is prepended. So the PATH when running the compiled EXE on the same computer might look like:
PATH=D:\WINNT\system32;D:\WINNT;D:\Program Files\Mtx;C:\WINDOWS;C:\WINDOWS\COMMAND;c:\;c:\dos;
If you need to look information up in the registry, there are three parts of the registry where PATH information is stored: there's the system path part, user added path part, and AppPath section. You can use Winbatch Registry reading functions to grab the information out directly.
For the User Environment Path variable use:
userenv=Environment("PATH")For the System Environment Path variable use:
sysenv="SYSTEM\CurrentControlSet\Control\Session Manager\Environment[path]"For the AppPaths variable, read the appropriate value under:
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion
Note that the RegApp function can be used to add data to the appPath section, so for example, if you compile a Winbatch EXE called "xyz.exe" and want to add it to the AppPath section of the Registry, you could do something like:
residence="c:\Program Files\Winbatch\WBscripts\xyz.exe" path="c:\Program Files\Winbatch\WBscripts" RegApp(residence, path)
Article ID: W12922
Filename: PATH Information.txt
File Created: 2001:01:25:15:51:12
Last Updated: 2001:01:25:15:51:12