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: Setting Target Directory / Custom Actions
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
‎Nov 06, 2007
11:43 AM
Setting Target Directory / Custom Actions
Using InstallScript MSI
I'm struggling with a very simple concept. I have one set of features that are installed to one user selected directory (INSTALLDIR) and I have another set of features I want installed to a different directory (USER_DIR2). What I can't figure out is when/how to set USER_DIR2 so the files are copied to the correct place.
I'm using MsiSetTargetPath to set the path but it is pretty clear I'm doing it at the wrong time/place. According to the log, the property gets changed but then it gets change back during CostFinalize.
I'm having a hard time getting a grip on all the custom action options as well as the ordering of actions. I thought setting a target path would be a good starting point to learn about them. Unfortunately, it has just lead to more confusion.
I'm struggling with a very simple concept. I have one set of features that are installed to one user selected directory (INSTALLDIR) and I have another set of features I want installed to a different directory (USER_DIR2). What I can't figure out is when/how to set USER_DIR2 so the files are copied to the correct place.
I'm using MsiSetTargetPath to set the path but it is pretty clear I'm doing it at the wrong time/place. According to the log, the property gets changed but then it gets change back during CostFinalize.
I'm having a hard time getting a grip on all the custom action options as well as the ordering of actions. I thought setting a target path would be a good starting point to learn about them. Unfortunately, it has just lead to more confusion.
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 07, 2007
08:19 PM
You will want to call MsiSetTargetPath after CostFinalize action. For additional info, please refer to Directory Table.
BTW, you may also use Custom Action Type 35 in lieu of MsiSetTargetPath.
BTW, you may also use Custom Action Type 35 in lieu of MsiSetTargetPath.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 08, 2007
03:55 PM
I found the solution to my problem. My custom action was after CostFinalize but what I didn't realize is that components, as well as features, had destinations. I had changed the feature destination, but had not changed the component destination. Once I did this my custom action and MsiSetTargetPath worked as expected.
I'm still more than a bit confused/overwhelmed by all the MSI stuff but at least now I'm making some progress.
I'm still more than a bit confused/overwhelmed by all the MSI stuff but at least now I'm making some progress.