In my script, I want to fetch the environmental var, PATH so I can search it.
My problem is that envget will fetch only the user's PATH, but I need the system's PATH.
Am I just missing something?
How to get System PATH rather than user PATH
Re: How to get System PATH rather than user PATH
When I checked with EnvGet, it showed both paths together. Another way for system path:
Code: Select all
RegRead, path, HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment, Path
MsgBox, 64, Path, %path%
Re: How to get System PATH rather than user PATH
Thanks for the alternate function - that *does* fetch the system PATH.
I'm using RapidIEE to inspect the PATH - and envget fetches User Variables, whilst the function you just showed fetches System Variables.
It shows all the paths concatenated with ; like it ought to.
Wait - I tried envget again, and NOW it fetches the Path from System Variables.
I'm not sure what I did to get it to take from just the User Variables, but it did, I swear it did.
I'm using RapidIEE to inspect the PATH - and envget fetches User Variables, whilst the function you just showed fetches System Variables.
It shows all the paths concatenated with ; like it ought to.
Wait - I tried envget again, and NOW it fetches the Path from System Variables.
I'm not sure what I did to get it to take from just the User Variables, but it did, I swear it did.
My Stuff: mousey; volume; ahkinfo; instantbirder; npp highlighter; Dynamic File Menu; tv - a treeview library;