Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
8 lines (8 sloc) 440 Bytes
GetEnv(){
global
local __env__:=DllCall("GetEnvironmentStringsW","PTR"),__thisenv__,__temp__,__tempenv__:=__env__
While __thisenv__:=SubStr(__temp__:=StrGet(__env__,"UTF-16"),1,InStr(__temp__,"=",1,2)-1)
If ((__env__+=StrLen(__temp__)*2+2) && RegExMatch(__thisenv__,"^[\w_]+$")&&!Instr(".comspec.programfiles.","." __thisenv__ "."))
EnvGet,%__thisenv__%,% __thisenv__
DllCall("FreeEnvironmentStringsW","PTR",__tempenv__)
}
You can’t perform that action at this time.