i have a problem in a string with variable included
I read a key in registry like this :
call:ReadReg "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" "Desktop"
echo %RegValue%
:ReadReg
FOR /F "usebackq tokens=1-3" %%A IN (`REG QUERY "%~1" /v "%~2" 2^>nul`) DO (
set RegName=%%A
set RegType=%%B
set RegValue=%%C
)
goto:eof
but the value returned in RegValue is: %USERPROFILE%\Desktop
instead of : C:\Documents and Settings\username\Desktop
the ECHO line display :
C:\Documents and Settings\alopez>echo %USERPROFILE%\Bureau
%USERPROFILE%\Bureau
I would like convert the registry value into a good path