I am trying to write a script that among other things tries to create a shortcut up on a user's desktop. The problem I discovered was that some users don't use the standard location for their desktop location.
I implemented the following code to read the value from the Registry:
for /f "usebackq tokens=3*" %%D IN (`reg query "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v Desktop`) do set DESKTOP=%%D
CALL SET REGISTRYDESKTOP=%DESKTOP%
echo Desktop is located in "%REGISTRYDESKTOP%"
When I looked at the Registry, I see the following:
When the code runs, I get the following response:
I imagine I am missing something simple, what am I doing wrong here?
Regards,
Steve