[lib/system] A few environment variables cannot be referenced in ScriptControl mode.
gnh1201 opened this issue · comments
Summary
In ScriptControl
(MSScriptControl.ScriptControl) mode (which is more restrictive than WScript), some system environment variables cannot be referenced. For example, PROGRAMFILES
or PROGRAMFILES(X86)
fall into this category.
This issue was discovered when lib/chrome
failed to correctly generate the web browser profile folder path during profile creation.
Suggested solution
In ScriptControl mode, the HOMEDRIVE
environment variable was accessible, so we utilize it. For example, %HOMEDRIVE%\Program Files
or %HOMEDRIVE%\Program Files (x86)
.
Related files
- https://github.com/gnh1201/welsonjs/blob/master/scriptcontrol.js
- https://github.com/gnh1201/welsonjs/blob/master/app/assets/py/apploader.py
- https://github.com/gnh1201/welsonjs/blob/master/lib/chrome.js
- https://github.com/gnh1201/welsonjs/blob/master/lib/system.js
Releated links
Fixed
Solved