Reading REG_EXPAND_SZ [solved/nevermind]
Reading REG_EXPAND_SZ [solved/nevermind]
(n'er mind -- wasn't setting a type properly)
Last edited by jassing on Thu Sep 15, 2011 10:02 pm, edited 1 time in total.
Re: Reading REG_EXPAND_SZ
REG_EXPAND_SZ same like REG_SZ
REG_EXPAND_SZ means only that, the string can have environment variables:
so add:
example for expand environment string
REG_EXPAND_SZ means only that, the string can have environment variables:
so add:
Code: Select all
Case #REG_SZ, #REG_EXPAND_SZ
Code: Select all
EnableExplicit
Procedure.s ExpandEnvironmentString(String.s)
Protected ExpandString.s, Length.i
Length = ExpandEnvironmentStrings_(@String, #Null, #Null)
ExpandString = Space(Length)
ExpandEnvironmentStrings_(@String, @ExpandString, Length)
ProcedureReturn ExpandString
EndProcedure
Debug ExpandEnvironmentString("%ProgramFiles%")
Debug ExpandEnvironmentString("%HomeDrive%%HomePath%")
Debug ExpandEnvironmentString("%AppData%\Meine Firma")
SetEnvironmentVariable("MyExePath", GetPathPart(ProgramFilename()))
Debug ExpandEnvironmentString("%MyExePath%")PB 6.01 ― Win 10, 21H2 ― Ryzen 9 3900X, 32 GB ― NVIDIA GeForce RTX 3080 ― Vivaldi 6.0 ― www.unionbytes.de
Lizard - Script language for symbolic calculations and more ― Typeface - Sprite-based font include/module
Lizard - Script language for symbolic calculations and more ― Typeface - Sprite-based font include/module
