问题
Please tell me how to search each profile of HKEY_USERS and find the value of ProxyEnable and proxy server.
I have a Nodejs binary(.exe) which basically runs in individual machines. I use Procrun(commons.apache.org/proper/commons-daemon/procrun.html) to run my Nodejs application as a service. and the Nodejs application tries to find the proxy config through child process which runs this reg query.
Due to some other limitation of application its always fetching the details from the default profile "Computer\HKEY_USERS\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Internet Settings"
because it is running under the default profile(User). So the idea is just to scan all profiles(Users) under HKEY_USERS and fetch ProxyEnable and proxy server details. It would be great if you suggest a way to accomplish this.
I use the below script
FOR /F " skip=2 tokens=1-3" %%A IN ('reg query "HKEY_USERS" /v ProxyEnable 2^>nul') DO (
@echo %KEY_NAME%\%VALUE_NAME% not found
set ValueName=%%A
set ValueType=%%B
set ValueValue=%%C
)
It's not returning the values. My expectation is it should scan all folders under HKEY_USERS and get all the values of ProxyEnable key.
Thanks
来源:https://stackoverflow.com/questions/60831718/how-to-scan-a-windows-registrys-all-user-profiles-and-fetch-the-value-of-proxye