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: Dynamic folder name
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
‎Apr 12, 2009
06:40 AM
Dynamic folder name
Hello all,
I'm using Basic MSI Project and I wanted to know if there is a way to dynamically name a folder, for example: the name of the folder will be taken from a property.
Thanks,
David
I'm using Basic MSI Project and I wanted to know if there is a way to dynamically name a folder, for example: the name of the folder will be taken from a property.
Thanks,
David
(7) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 12, 2009
10:01 PM
You can use a "Set a Directory" custom action to accomplish this.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 13, 2009
12:55 AM
Thanks for your reply but it's not helping me and I'll explain my purpose.
I have 2 products that I want to deploy, both of the product share 95% percent of the files.
Each product has a different folder name.
Because I can't share one component with multi folders I thought maybe I will create one folder with one component that holds the shared files and dynamically change the folder name according to a property that will tell me which product is it.
I have 2 products that I want to deploy, both of the product share 95% percent of the files.
Each product has a different folder name.
Because I can't share one component with multi folders I thought maybe I will create one folder with one component that holds the shared files and dynamically change the folder name according to a property that will tell me which product is it.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 13, 2009
01:19 AM
If I understand your scenario properly, "Set a Directory" custom actions should allow you to accomplish this. Now that you've clarified a little more, maybe you could have 2 such actions set the same directory property (the one that serves as the destination of those components) to one value or the other based on action conditions.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 13, 2009
01:30 AM
Thanks,
I think you are right and I am now trying your solution, for some reason I keep getting an error when I use the "Set a Directory" custom action:
"Error 1606 could not access network location".
I'll try a little harder to find out 🙂
I think you are right and I am now trying your solution, for some reason I keep getting an error when I use the "Set a Directory" custom action:
"Error 1606 could not access network location".
I'll try a little harder to find out 🙂
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 13, 2009
01:43 AM
Doesn't that message go on to say what directory it's having a problem with? Can you post that? Can you also post the parameter of the action(s) and where in the sequence(s) you're scheduling it (them)?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 13, 2009
01:56 AM
Yest the error exactly is:
Error 1606 could not access network location XXXX
XXXX - The new name that I want to give to the folder.
I also ran a Full MSI Validate Suite and I got one error:
"Possible Mis-Alligned Foreign KeysISIISCommon.1 =
s50IsWebSite.ISIISCommon_ = s72
Parameters of the action:
Directory Name: INSTALLDIR
Directory Value: Company_after_change (No use of property yet...)
Execution Scheduling: Always Execute
Install Exec Sequence: After InstallFinalize
Install Exec Condition: REMOVE=""
Error 1606 could not access network location XXXX
XXXX - The new name that I want to give to the folder.
I also ran a Full MSI Validate Suite and I got one error:
"Possible Mis-Alligned Foreign KeysISIISCommon.1 =
s50IsWebSite.ISIISCommon_ = s72
Parameters of the action:
Directory Name: INSTALLDIR
Directory Value: Company_after_change (No use of property yet...)
Execution Scheduling: Always Execute
Install Exec Sequence: After InstallFinalize
Install Exec Condition: REMOVE=""
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 13, 2009
02:05 AM
Try putting it after CostFinalize, use brackets around the property (as in [PropertyName]) for the Directory Value (not the Directory Name), and try the condition "Not Installed" (without quotes).