Variables
Technical Document
These variables can be used within any of the parameters to provide a more universal way to
opening documents and programs across a wide range of workstations or users.
This code example shows how a variable might be used. The variable will be
replaced with the path or value from the current
users localized settings.
In the code example below the Windows file explorer, specifically located in the Windows directory is run telling it to open the users
My Documents folder while playing the sound run_sound.wav in the users My Music folder and
adding the event to a log file run_log.txt
in the user's temp folder typically at C:\Users\<User>\AppData\Local\Temp.
<html> <script src="https://code.jquery.com/jquery-2.2.3.min.js"></script> <script language="JavaScript" type="text/javascript"> var $jQuery = jQuery.noConflict(); </script> <script type="text/javascript"> jQuery(document).ready(function() { jQuery("#var_example_link").on("click", function (event) { event.preventDefault(); // Recommended to stop the link from doing anything else document.dispatchEvent(new CustomEvent('funcIntraLaunch', { 'detail': { task: 'run', program: '%WIN_DIR%\\explorer', switches: '%MY_DOCUMENTS%', playsound: '%MY_MUSIC%\\run_sound.wav', log: '%TEMP_FOLDER%\\run_log.txt' } })); }); }); </script> <body> <a href="#" id="var_example_link">Open my documents</a> </body> </html>
All Macros
%SEND_TO% | Will be replaced with the users Sent To folder | Windows 7, 8, 10 |
%MY_MUSIC% | Will be replaced with the users My Music folder | Windows 7, 8, 10 |
%APP_DATA% | Will be replaced with the users Application Data folder Eg. C:\Users\<User>\AppData |
Windows 7, 8, 10 |
%DESKTOP_FOLDER% | Will be replaced with the path to the users Desktop folder Eg. C:\Users\<User>\Desktop |
Windows 7, 8, 10 |
%FAVORITES% | Will be replaced with the path to the users Favorites folder | Windows 7, 8, 10 |
%LOCAL_APP_DATA% | Will be replaced with the users Local Application Data folder Eg. C:\Users\<User>\AppData\Local |
Windows 7, 8, 10 |
%MY_COMPUTER% | Will be replaced with the users | Windows 7, 8, 10 |
%MY_DOCUMENTS% | Will be replaced with the users My Documents folder Eg. C:\Users\<User>\Documents |
Windows 7, 8, 10 |
%MY_PICTURES% | Will be replaced with the My Pictures folder | Windows 7, 8, 10 |
%RECENT_DOCS% | Will be replaced with the users recently accessed documents | Windows 7, 8, 10 |
%START_MENU% | Will be replaced with the path to the users start menu | Windows 7, 8, 10 |
%STARTUP% | Will be replaced with the users startup path Eg. C:\Users\<User>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup |
Windows 7, 8, 10 |
%SYSTEM_FOLDER% | Will be replaced with the users system folder Eg. C:\Windows\system32 |
Windows 7, 8, 10 |
%TEMPLATES% | Will be replaced with the users Templates folder | Windows 7, 8, 10 |
%WIN_DIR% | Will be replaced with the users windows folder Eg. C:\Windows |
Windows 7, 8, 10 |
%USERNAME% | Will be replaced with the users currently logged on username Eg. Jason |
Windows 7, 8, 10 |
%USERPROFILE_FOLDER% | Will be replaced with the users C:\Users\<User> |
Windows 7, 8, 10 |
%WIN_VERSION% | Will be replaced with the name of the users current version of windows Eg. 'Windows 10 Pro' |
Windows 7, 8, 10 |
%USER_DOMAIN% | Will be replaced with the users current domain | Windows 7, 8, 10 |
%USERDOMAIN_ROAMINGPROFILE% | Will be replaced with the users current roaming profile domain | Windows 7, 8, 10 |
%SYSTEM_ROOT% | Typically the same as %WIN_DIR% | Windows 7, 8, 10 |
%SYSTEM_DRIVE% | Will be replaced with the users current system drive, typically C: | Windows 7, 8, 10 |
%PROGRAM_FILES_FOLDER% | Will be replaced with the path to the users Program Files folder Eg. C:\Program Files |
Windows 7, 8, 10 |
%PROGRAM_FILES_FOLDER_X86% | Will be replaced with the path to the users Program Files (x86) folder Eg. C:\Program Files (x86) |
Windows 7, 8, 10 |
%COMPUTER_NAME% | Will be replaced with name of the users computer | Windows 7, 8, 10 |
%LOGON_SERVER% | Will be replaced with the name of the users server currently logged on to Eg. '\\SERVERNAME' |
Windows 7, 8, 10 |
%TEMP_FOLDER% | Will be replaced with the path to the users temp folder | Windows 7, 8, 10 |