Bluepoint Design

Practical Cost-Effective Solutions
Macro Express: System Variables

Home
Up
Boolean Default
Understanding Serial Time
Global Local Variables
Hex Edit
Right Click Activation
PDF Print
System Variables
There are some useful variables in the Variable Set from Misc command but I find using the oft forgotten System Variables are more useful. You have probably seen them before and may have even used them back in the DOS days. They look like %windir% and in this case is your Windows directory. The nice thing is that on various systems you might se Windows installed in the c:\win, c:\windows, c:\winnt, and so on. Also it's a nice shorthand so you can write %temp% instead of "C:\Users\user.domain\AppData\Local\Temp".

As I said Variable Set from Misc does these as well but when I can I use system variables instead. Two reasons are that they are more recognizable like %temp% instead of %T34% and they don't take up and of the limited text variables. Also if you want to test your command manually you can just paste it into a run line. 

There are many places online to find these but I'll list a couple of favorites here: 

bullet%Temp%
bullet%WinDir%
bullet%UserProfile%
bullet%AllUsersProfile%
bullet%ComSpec% Useful when you don't know if it's cmd.exe or command.exe
bullet%TZ% TimeZone
bullet%ProgramFiles%
bullet%OS%
bullet%UserName%
bullet%Domain%

If you look in your System Properties you can find quite a few. But I warn against this as often these are per machine and might not be used universally. Also this is not a complete list. 

 
Practical Cost-Effective Solutions