gnh1201 / welsonjs

WelsonJS - Build a Windows app on the Windows built-in JavaScript engine

Home Page:https://catswords.social/@catswords_oss

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[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

Releated links

Solved