System variables
Some settings available in the GravityZone console require specifying the path on target computers.
To ensure compatibility across different systems, it is recommended to use system variables where applicable.
This article lists the predefined system variables available for use on Windows and macOS.
Note
Linux does not support the use of system variables in this context.
Windows
%windir%
Alias for the Windows directory or system root.
Typical path:
C:\WindowsExample:
%windir%\Temp
%system%
System32 folder.
Typical path:
C:\Windows\system32Example:
%system%\drivers\etc\hosts
%system(x86)%
System32 equivalent for 32-bit binaries on 64-bit systems.
Typical path:
C:\Windows\SysWOW64Example:
%system(x86)%\drivers\etc\hosts
%programfiles%
Program Files folder for 64-bit applications.
Typical path:
C:\Program FilesExample:
%programfiles%\Adobe\Adobe Creative Cloud
%programfiles(x86)%
Program Files folder for 32-bit applications (on 64-bit systems).
Typical path:
C:\Program Files (x86)Example:
%programfiles(x86)%\Common Files
%commonprogramfiles%
Shared files for 64-bit applications.
Typical path:
C:\Program Files\Common FilesExample:
%commonprogramfiles%\Microsoft Shared
%commonprogramfiles(x86)%
Shared files for 32-bit applications.
Typical path:
C:\Program Files (x86)\Common FilesExample:
%commonprogramfiles(x86)%\Adobe
%commonappdata%
Application data shared among all users.
Typical path:
C:\ProgramDataExample:
%programdata%\MyApplication\Logs
%programdata%
Application data shared among all users.
Typical path:
C:\ProgramDataExample:
%programdata%\MyApplication\Logs
%allusersprofile%
Alias for the All Users profile folder.
Typical path:
C:\ProgramDataExample:
%allusersprofile%\Microsoft\Windows\Start Menu
%commondocuments%
Shared "Documents" folder across all users.
Typical path:
C:\Users\Public\DocumentsExample:
%commondocuments%\logs
%commondesktop%
Shared desktop folder across all users.
Typical path:
C:\Users\Public\DesktopExample:
%commondesktop%\help.lnk
%commonmusic%
Shared "Music" folder across all users.
Typical path:
C:\Users\Public\MusicExample:
%commonmusic%\soundtrack.mp3
%commonvideo%
Shared "Videos" folder across all users.
Typical path:
C:\Users\Public\VideosExample:
%commonvideo%\intro.mp4
%commonpictures%
Shared "Pictures" folder across all users.
Typical path:
C:\Users\Public\PicturesExample:
%commonpictures%\wallpaper.jpg
%userprofile%
Root directory of the current user’s profile.
Typical path:
C:\Users\{username}Example:
%userprofile%\Downloads
%appdata%
Roaming AppData folder for the current user.
Typical path:
C:\Users\{username}\AppData\RoamingExample:
%appdata%\Mozilla\Firefox
%localappdata%
Local (non-roaming) AppData folder for the user.
Typical path:
C:\Users\{username}\AppData\LocalExample:
%localappdata%\Temp
%mydocuments%
User's personal "Documents" folder.
Typical path:
C:\Users\{username}\DocumentsExample:
%mydocuments%\policy.json
%desktop%
User's Desktop folder.
Typical path:
C:\Users\{username}\DesktopExample:
%desktop%\installer.lnk
%mymusic%
User's "Music" folder.
Typical path:
C:\Users\{username}\MusicExample:
%mymusic%\song.mp3
%myvideo%
User's "Videos" folder.
Typical path:
C:\Users\{username}\VideosExample:
%myvideo%\demo.mp4
%mypictures%
User's "Pictures" folder.
Typical path:
C:\Users\{username}\PicturesExample:
%mypictures%\screenshot.jpg
%systemdrive%
Drive letter of the volume where Windows is installed.
The typical drive letter is
C:.Example:
%systemdrive%\Installers\application.exe
macOS
$HOME
User's profile folder.
Typical path:
/Users/{username}Example:
$HOME/Documents/scripts/utilities
~
User's profile folder.
Typical path:
/Users/{username}Example:
~/Downloads/installers
Note
$HOME and ~ are functionally equivalent on macOS and can be used interchangeably.