How can I point to Windows-specific folders?

asked 13 Sep '11, 06:59

Jake's gravatar image

Jake ♦♦
796222226235
accept rate: 98%


Your installer may need to access Windows-specific directories, such as C:Windows or C:WindowsSystem32. 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 WindowsSystem32.
${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://msdn.microsoft.com/en-us/library/windows/desktop/bb762494(v=vs.85).aspx

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}

link

answered 13 Sep '11, 07:02

Jake's gravatar image

Jake ♦♦
796222226235
accept rate: 98%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×176
×8

Asked: 13 Sep '11, 06:59

Seen: 1,757 times

Last updated: 14 Dec '12, 04:35