- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: How to place file into a directory
- 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
How to place file into a directory
Hi,
I am a novice at Install Shield so please excuse my ignorance. I have been working with tech support for 4 weeks now and I have no concrete answer from them!
I need to place a file into a directory...for example C:\Program Files (x86)\Adobe\Acrobat DC\Acrobat. However where you see Acrobat DC in the example, the name could be Acrobat 2015 or Acrobat 2017 depending on the version of Acrobat the user has on their machine. How do I setup the installer to place the file into the Acrobat directory when I'm not sure what version they will have installed? Please see screenshot for example.
 
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
One way would be to create a custom action with your favorite language.
Have it pull the installed Acrobat version out of the 'Uninstall' area of the registry.
Store that value (or part of it) in a property that you can then use to specify the directory.
And don't limit it to 2015 or 2017. Someday there may be an Acrobat version 202x.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
I'm sorry. This is over my head:( I don't know how to do what you are suggesting.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Using the System Search function in Installshield you could create multiple system searches to locate files or registry entries which are specific to the versions of Acrobat you want to target.
If found system search can then create a Property. For example if it finds data specific to 2015 - create the property ACROBAT2015
Then create multiple components, each one with a different Destination value for the different versions of Acrobat - in the component conditions you can then add the System Search Property associated with that version.
This should mean if system search finds data specific to Acrobat 2015 it will create the property ACROBAT2015.
Then the condition on the component would evaluate to true meaning it would install - but the other components with different conditions would not.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Add the file to the component - then change the Component Destination value to one of the Acrobat version directories you are attempting to target. This is the directory that the file will be installed into
Finally in the same component add a Condition. This is one of the Properties that you created in the system search.
You will need to do this for each component to target each version of Acrobat.