3.7. Setting Windows/DOS environment variables

Your program might require some environment variable to be set properly in order to run successfully. In this case you need to set this environment variable in the Linux shell, since Wine will pass on the entire shell environment variable settings to the Windows environment variable space. Example for the bash shell (other shells may have a different syntax!):

export MYENVIRONMENTVAR=myenvironmentvarsetting
This will make sure your Windows program can access the MYENVIRONMENTVAR environment variable once you start your program using Wine. If you want to have MYENVIRONMENTVAR set permanently, then you can place the setting into /etc/profile, or also ~/.bashrc when using bash.

Note however that there are some exceptions to the rule: If you want to change the PATH, SYSTEM or TEMP variables, then of course you can't modify it that way, since this will alter the Unix environment settings. Instead, you should set them into the registry. To set them you should launch wine regedit and then go to the

key. Now you can create or modify the values of the variables you need

"System" = "c:\\windows\\system"
This sets up where the Windows system files are. The Windows system directory should reside below the directory used for the Windows setting. Thus when using /usr/local/wine_c_windows as Windows path, the system directory would be /usr/local/wine_c/windows/system. It must be set with no trailing slash, and you must be sure that you have write access to it.

"Temp" = "c:\\temp"
This should be the directory you want your temp files stored in, /usr/local/wine_c/temp in our previous example. Again, no trailing slash, and write access!!!

"Path" = "c:\\windows;c:\\windows\\system;c:\\blanco"
Behaves like the PATH setting on UNIX boxes. When Wine is run like wine sol.exe, if sol.exe resides in a directory specified in the Path setting, Wine will run it (of course, if sol.exe resides in the current directory, Wine will run that one). Make sure it always has your windows directory and system directory (for this setup, it must contain "c:\\windows;c:\\windows\\system").