[wix-users] Install many files in local app data folder
Sukhitha jayathilake
sukhij25 at gmail.com
Thu May 19 15:17:25 PDT 2016
Thank you for the responses.
I got over this issue yesterday by running a Custom Action to set the
installation path which runs before CostFinalize. This way it compiles
without making us set registry keys for each file.
What's the most recommended solution?
On Thu, May 19, 2016 at 9:40 PM, Brian Enderle <brianke at gmail.com> wrote:
> You can do this by adding the following to the <Target Name="BeforeBuild">
> section in the .wixproj file:
>
> <!-- Harvest ScriptComponents -->
> <HeatDirectory NoLogo="$(HarvestDirectoryNoLogo)"
>
> SuppressAllWarnings="$(HarvestDirectorySuppressAllWarnings)"
>
> SuppressSpecificWarnings="$(HarvestDirectorySuppressSpecificWarnings)"
> ToolPath="$(WixToolPath)"
>
> TreatWarningsAsErrors="$(HarvestDirectoryTreatWarningsAsErrors)"
>
>
> TreatSpecificWarningsAsErrors="$(HarvestDirectoryTreatSpecificWarningsAsErrors)"
> VerboseOutput="$(HarvestDirectoryVerboseOutput)"
>
> AutogenerateGuids="$(HarvestDirectoryAutogenerateGuids)"
>
> GenerateGuidsNow="$(HarvestDirectoryGenerateGuidsNow)"
> OutputFile="ScriptsComponents.wxs"
>
> SuppressFragments="$(HarvestDirectorySuppressFragments)"
>
> SuppressUniqueIds="$(HarvestDirectorySuppressUniqueIds)"
> Transforms="%(HarvestDirectory.Transforms)"
> Directory="$(SolutionDir)Command_Scripts"
> ComponentGroupName="ScriptsComponents"
> DirectoryRefId="SCRIPTS_FOLDER"
> KeepEmptyDirectories="false"
> PreprocessorVariable="var.ScriptsSourceDir"
> SuppressCom="%(HarvestDirectory.SuppressCom)"
> SuppressRootDirectory="true"
>
> SuppressRegistry="%(HarvestDirectory.SuppressRegistry)" />
>
> Directory variable is a relative or absolute path to the files to harvest.
>
> ComponentGroupName is used as the name of the .wxs file to be created by
> Harvest.
>
> The variable SCRIPTS_FOLDER is defined as one of your folders in the
> Product.wxs file.
>
> You will need to define the "var.ScriptsSourceDir" in your WiX project file
> (right click on Project, select Properties and then Build tab). Enter the
> path in the Preprocessor Variables field like
>
> "ScriptsSourceDir=$(SolutionDir)AutomatedSQLMigration\SQLCode2.0\Command_Scripts;"
>
> To include this file in the project add the following to Product.wxs file
> in the <Feature> section:
>
> <ComponentGroupRef Id="ScriptsComponents" />
>
>
>
> Brian
>
> If you can't explain it simply, you don't understand it well enough. -
> Albert Einstein
>
> On Wed, May 18, 2016 at 10:48 PM, Gary M <garym at oedata.com> wrote:
>
> > I recently installed a product with 3400-3600 files. I used heat to
> > generate the wxs files. Heat will create a component for each file and a
> > component group for easy referencing.
> > These are my heat config settings (sorry I use maven)
> > <configuration>
> > <executable>heat</executable>
> >
> > <workingDirectory>${fom.resource.dir}</workingDirectory>
> > <arguments>
> > <!-- Specify the directory to harvest, -->
> > <argument>dir</argument>
> > <argument>Support_Files</argument>
> > <!-- Generate guids now. All components are
> given a
> > guid when heat is run. -->
> > <argument>-gg</argument>
> > <!-- Keep empty directories. -->
> > <argument>-ke</argument>
> > <!-- Suppress generation of fragments for
> > directories and components. -->
> > <argument>-sfrag</argument>
> > <!-- Substitute File/@Source="SourceDir" with a
> > preprocessor
> > or a wix variable (e.g. -var var.MySource will
> > become
> > File/@Source="$(var.MySource)\myfile.txt" -->
> > <argument>-var</argument>
> > <argument>var.SupportSourceDir</argument>
> > <!-- Directory reference to root directories
> > (cannot contains spaces). -->
> > <argument>-dr</argument>
> > <argument>IMA.INSTALL.DIR</argument>
> > <!-- Component group name (cannot contain spaces
> > e.g -cg MyComponentGroup). -->
> > <argument>-cg</argument>
> > <argument>Support</argument>
> > <!-- Specify output file (default: write to
> current
> > directory). -->
> > <argument>-out</argument>
> >
> > <argument>${wix.generated.sources.dest}\support-files.wxs</argument>
> > </arguments>
> > </configuration>
> >
> >
> > On Wed, May 18, 2016 at 5:49 PM, Sukhitha jayathilake <
> sukhij25 at gmail.com>
> > wrote:
> >
> > > Hi,
> > >
> > > We are trying to install a Demo application and all the Demo data needs
> > to
> > > be installed in the UserProfile AppData Local folder. Does every
> > component
> > > that gets installed in UserProfile needs to have a RegistryKey
> KeyPath? I
> > > do generate all the components that needs to be installed using
> heat.exe.
> > > So they are generated with KeyPath="Yes" in the file element. There are
> > > like hundreds of files. Do all of those FileElements needs to have a
> > > RegistryKey KeyPath?
> > >
> > > I have worked around this when I was working with a Powershell module
> > > installer. Where I was able to change the INSTALLDIR to
> > > UserProfile\WindowsPowerShell folder during the installation, and
> install
> > > there without any RegistryKey Keypaths. And it Uninstalls fine too. Do
> I
> > > need to do something like that here, like setting the Install directory
> > for
> > > the demo data during the installation?
> > >
> > > I'm fairly new to using wix and making windows installers. Please Help.
> > > Thank you!
> > >
> > > --
> > > Sukhi
> > >
> > > ____________________________________________________________________
> > > WiX Toolset Users Mailing List provided by FireGiant
> > > http://www.firegiant.com/
> > >
> >
> > ____________________________________________________________________
> > WiX Toolset Users Mailing List provided by FireGiant
> > http://www.firegiant.com/
> >
>
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant
> http://www.firegiant.com/
>
--
Sukhitha Jayathilake,
Undergraduate
Department of Computer Science and Engineering
University of Moratuwa.
Sri Lanka.
T.P. +94715445737
More information about the wix-users
mailing list