Reading path from registry that contains an environment variable

(imported topic written by lmpymilk91)

Take a look at the key:


I would like to be able to use the values of “DumpFile” and “MinidumpDir”

like I would with

exists file (value “” of key “HKEY_CLASSES_ROOT\CLSID{D27CDB6E-AE6D-11cf-96B8-444553540000}\InprocServer32” of registry as string as lowercase)

I don’t want to presume the variable is %SystemRoot% as I might want to use this code again for another variable at another time.



(imported comment written by BenKus)

How about this?

exists file (expand environment string of (value “DumpFile” of key “HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\CrashControl” of registry as string))


(imported comment written by lmpymilk91)

I don’t think it could be better.

Thanks again Ben