Hello!
Did anyone have the problem yet that on the windows openvpn client, the up and down scripts cannot resolve environment variables?
I mean i have a file called "up.bat" , and when i run it manually, everything is working fine.
When OpenVPN runs it after successful connect, then variables like %USERPROFILE% are treated like the string "%USERPROFILE%" and are not resolved.
I do have "script-security 3" in my config. I guess this is right?
My version is OpenVPN GUI (Windows) v 11.10.0.0
ND
Environment vars are not being resolved?
Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech
- NullDevice
- OpenVpn Newbie
- Posts: 13
- Joined: Sun Sep 11, 2011 11:33 pm
-
- OpenVPN Protagonist
- Posts: 11137
- Joined: Fri Jun 03, 2016 1:17 pm
Re: Environment vars are not being resolved?
Like Linux, Windows does not inherit your environment ..
The common way people discover this is because scripts do not have access to $PATH.
Although, that's only a guess ..
The common way people discover this is because scripts do not have access to $PATH.
Although, that's only a guess ..
- NullDevice
- OpenVpn Newbie
- Posts: 13
- Joined: Sun Sep 11, 2011 11:33 pm
Re: Environment vars are not being resolved?
Yes, seems its exactly that problem.
Is there are workaround? How do others use script with env.vars then normally?
Is there are workaround? How do others use script with env.vars then normally?
-
- OpenVPN Protagonist
- Posts: 11137
- Joined: Fri Jun 03, 2016 1:17 pm
Re: Environment vars are not being resolved?
You mean, like a bug ?
- NullDevice
- OpenVpn Newbie
- Posts: 13
- Joined: Sun Sep 11, 2011 11:33 pm
Re: Environment vars are not being resolved?
No, i mean tuning to OS to do exceptions for scripts or something like that. There are plenty of other applications using environment variables with scripts. F.e. Cisco AnyConnect VPN client. Scripts with environement vars are working there. So there must be a possiblity.