I want to present the user with an option to choose one of several directories. The choices available are derived from ${windows_folder_local_appdata}, ${windows_folder_appdata} or ${windows_folder_profile}, e.g. ${windows_folder_local_appdata}/some/path.

I thought I could use an ChoiceParameter for this as it provides the right kind of construct. However, this doesn't work because I'm not allowed to supply a value such as that given above because of restrictions on the characters allowed.

Is there some other way to do this?

asked 01 Feb '12, 20:28

amacgaffey's gravatar image

amacgaffey
1222
accept rate: 0%


An ugly way to solve the problem is to use the ChoiceParameter to set an intermediate value, effectively an enumeration, then add a ReadyToInstall action that sets the appropriate variable based on the value of the enumeration.

It's verbose but it works.

link

answered 02 Feb '12, 09:06

amacgaffey's gravatar image

amacgaffey
1222
accept rate: 0%

You can workaround it by adding the options using an <addChoiceOptionsFromText> action:

<addChoiceOptionsFromText>
    <name>kk</name>
    <text>${windows_folder_local_appdata}=${windows_folder_local_appdata}
${windows_folder_appdata}=${windows_folder_appdata} 
${windows_folder_profile}=${windows_folder_profile}</text>
</addChoiceOptionsFromText>

You can find additional information in our online documentation.

link

answered 06 Feb '12, 04:08

juanjo's gravatar image

juanjo ♦♦
5.8k413
accept rate: 23%

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:

×6

Asked: 01 Feb '12, 20:28

Seen: 1,345 times

Last updated: 06 Feb '12, 04:08