Under Windows, environment variables can be set in a DOS box with the set command before starting the program from the command line, or in the AUTOEXEC.BAT file, or from the System entry in the Control Panel. Only the latter two methods work if the programs are started from an icon. If using a Cygwin bash-box, environment variables can be set in the startup file as under Unix.