Windows environment variables

Top  Previous  Next


Windows environment variables can be used in two ways. One way is to pass the environment variable as an argument into Robo-FTP from a shortcut or the Windows Command Prompt command line. Consider the following example where the environment variable %SystemDrive% is passed in as an argument.


C:\Program Files\Robo-FTP X.X\Robo-FTP.exe –p1 %SystemDrive%


The SET command may also be used to copy the value of an environment variable into a Robo-FTP script variable.  Consider the following example where the operating system environment variable %SystemDrive% is set to the Robo-FTP script variable named sysdrive:


SET sysdrive = %SystemDrive%


Here is a list of common Windows environment variables:


Path to the All Users profile directory which contains resources and settings that are shared by all accounts. This is renamed %PROGRAMDATA% starting with Windows Vista.


Path to the Application Data folder of the logged-in user. This folder is hidden by default on some systems.


Computer name.


Defaults to C:


Defaults to \Documents and Settings\<user name>


Name of the computer that authenticated the current user's credentials.


The operating uses this list of folders to search for executable programs. If you add the Robo-FTP installation folder to your system's PATH environment variable you can create Scheduled Tasks that simply call the Robo-FTP.exe executable without the full installed file path.


Path to the \Program Files folder, the %PROGRAMFILES(X86)% and %PROGRAMW6432% environment variables are available on 64-bit machines.


Defaults to C:


Path to folder where temporary files should be stored. Same as %TMP%


Domain name.


User name.


Default to %SystemDrive%\Users\<user name> on newer versions of Windows, on older versions the default was %SystemDrive%\Documents and Settings\<user name>


Defaults to C:\Windows


Environment variables may contain different values for each Windows user account. Use system-wide environment variables machines where Robo-FTP may be launched by a built-in account like Network Service or Local System. Even if Robo-FTP will only ever be launched by regular user accounts it is probably best to use system-wide environment variables unless you specifically need the ability for users to  have unique values.






Related command(s): SET

See also: -p Command Line Switch, Using the %installdir variable, Adding Robo-FTP to the Path