@VDESK — Returns the name
or GUID of a virtual desktop.
Syntax:
%@VDESK[index,info]
| index | the number of the virtual desktop; 0-based |
| info | which info to return: |
0 - the virtual desktop’s name (default) | |
1 - the virtual desktop’s GUID |
This feature requires Windows 10 or later. If virtual desktops are not supported,
if index ≥ _VDESKS,
or if any error occurs, this function returns an empty string.
If the specified virtual desktop does not have a name, @VDESK returns
a default name of “Desktop n”.
for /l %i in ( 0, 1, %@dec[%_vdesks] ) echo %i: %@vdesk[%i] %@vdesk[%i,1]