How can I point to Windows-specific folders?
| Author: BitRock Support Date: January 14, 2008 13:19 Tags: |
Installer environment variables
Features Tips Windows |
Your installer may need to access Windows-specific directories, such as C:\Windows or C:\Windows\System32. As the location of these folders can change for every end-user setup, it is a good idea to use some internal installer variables which retrieve the current location of these directories for you.
The following table provides some common directories and the associated installer variables which point to them.
- ${windows_folder_systemroot}: Resolves to \Windows.
- ${windows_folder_system}: Resolves to \Windows\System32.
- ${windows_folder_personal}: Resolves to current user's "My Documents" folder.
- ${windows_folder_programs}: Resolves to current user's "Programs" folder inside the Start Menu.
In general, you can use: windows_folder_ and any id found here (please note that some ids may not be supported, and others may be only available under certain versions of Windows, so it is advisable to always test that the variable resolves successfully to the desired path):
http://technet2.microsoft.com/WindowsVista/en/library/3f1be40e-70c6-462c-9e8f-591d14d875cd1033.mspx?mfr=true
Comments
Temp
Author: johnny2k Date: June 09, 2010 18:14This doesn’t work with the temporary directory using windows_folder_temp
or windows_folder_tmp. I’ve also tried ${env(%TEMP%)} to get the temp folder and also ${env(cd)} for the current directory. Any suggestions?
Temp
Author: BitRock Support Date: June 10, 2010 09:56Hi
The windows_folder_* notation just works with csidl_* variables. To access the temp directory (or the temporary folder in any platform) you can use:
${system_temp_directory}
Best regards,
Juanjo.