This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Set properties in InstalLScript project
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 15, 2013
12:51 AM
Set properties in InstalLScript project
Hello,
In my InstallScript project particular value is used in many places (e.g. shortcut name, exe file name) and I would like define property/variable in some place in order that modifications would affect all corresponding places.
I tried to define Property in Direct Editor as MyProperty (value for example is "abcd").
Then used it as [MyProperty] or in shortcuts, but it was presented as [MyProperty] or . I would like to have it as "abcd".
Could you please advise how to solve this problem?
Thank you in advance.
Regards, Georgiy
In my InstallScript project particular value is used in many places (e.g. shortcut name, exe file name) and I would like define property/variable in some place in order that modifications would affect all corresponding places.
I tried to define Property in Direct Editor as MyProperty (value for example is "abcd").
Then used it as [MyProperty] or
Could you please advise how to solve this problem?
Thank you in advance.
Regards, Georgiy
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 15, 2013
12:48 PM
What I do in my InstallScript projects is:
1) In Files and Folders under the Script-Variable tree, create a new script variable.
2) I also create a global variable in my code that corresponds to this script-variable just because with-in the script handles it is easier to use the global variable.
3) At some point in OnFirstUIBefore (or earlier) initalize the global variable to the path (or value) to be used. I use this for paths, web site names, server names, and port values, etc.)
4) Call FeatureSetTarget. This needs to be called prior to SdFeatureTree or any dialog which would try to use the path (such as when file costing is done for all paths).
5) Define component paths, shortcuts, XML strings ct. to use the path. In most cases you can select the defined variable in the IDE for a target path, but in a shortcut name you might need to use the [] syntax.
6) The value of the script-defined var is persisted in the log as indicated by log viewer tool.
1) In Files and Folders under the Script-Variable tree, create a new script variable.
2) I also create a global variable in my code that corresponds to this script-variable just because with-in the script handles it is easier to use the global variable.
3) At some point in OnFirstUIBefore (or earlier) initalize the global variable to the path (or value) to be used. I use this for paths, web site names, server names, and port values, etc.)
4) Call FeatureSetTarget. This needs to be called prior to SdFeatureTree or any dialog which would try to use the path (such as when file costing is done for all paths).
5) Define component paths, shortcuts, XML strings ct. to use the path. In most cases you can select the defined variable in the IDE for a target path, but in a shortcut name you might need to use the [
6) The value of the script-defined var is persisted in the log as indicated by log viewer tool.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 15, 2013
01:26 PM
When you create a script-defined var in Files and Folders, by default the name is "". The "<" and ">" are part of the name unless you change it. When you use the string in a path (of a shortcut or component) it would be "\folder". The same syntax is used for registry keys and XML file changes.