Tente o próximo script .bat
:
@ECHO OFF >NUL
SETLOCAL enableextensions
set "common=Microsoft\Windows\CurrentVersion\Explorer"
call :query "HKU\.DEFAULT\Software\%common%\User Shell Folders" "Desktop"
call :query "HKCU\Software\%common%\Shell Folders" "Desktop"
call :query "HKCU\Software\%common%\User Shell Folders" "Desktop"
call :query "HKLM\SOFTWARE\%common%\Shell Folders" "Common Desktop"
call :query "HKLM\SOFTWARE\%common%\User Shell Folders" "Common Desktop"
call :query "HKLM\SOFTWARE\Wow6432Node\%common%\Shell Folders" "Common Desktop"
call :query "HKLM\SOFTWARE\Wow6432Node\%common%\User Shell Folders" "Common Desktop"
ENDLOCAL
goto :eof
:query
reg query "%~1" /V "%~2"|findstr "REG_"
goto :eof
A saída deve ser a seguinte (exceto os últimos dois Wow6432Node
itens no sistema operacional de 32 bits):
==>D:\bat\SU5604.bat
Desktop REG_EXPAND_SZ %USERPROFILE%\Desktop
Desktop REG_SZ C:\Users\<CurrentUserName>\Desktop
Desktop REG_EXPAND_SZ %USERPROFILE%\Desktop
Common Desktop REG_SZ C:\Users\Public\Desktop
Common Desktop REG_EXPAND_SZ %PUBLIC%\Desktop
Common Desktop REG_SZ C:\Users\Public\Desktop
Common Desktop REG_EXPAND_SZ %PUBLIC%\Desktop
Eu apagarei esta resposta o mais rápido possível se não ajudar.