Get path of the Desktop folder

There are no environment variables for the majority of special folders. The official method is to call either SHGetKnownFolderPath() from Win32 API or System.Environment.GetFolderPath() from .NET – the latter is easily accessible through PowerShell:

$dir = [Environment]::GetFolderPath("Desktop")

Batch scripts (Cmd.exe) do not have access to such features; you would have to call a program that does (such as PowerShell or third-party tools like nircmd).