[wix-users] The prerequisites fail to install

Tigran Galoyan tigran.galoyan at gmail.com
Mon May 2 11:54:17 PDT 2022


Hi,

Sorry for the quite late reply, we were busy with our release, so finally
got a chance to look back into this issue.

I'm attaching a few log files that I have from different scenario trials.
The two log files with the "SolDir_" prefix are when I had the Prerequisite
folder at the solution level and all my prerequisites are stored only in
that folder with no duplication for each bootstrapper project. The one that
PASSED is when I build the code on my machine and for prerequisites the
build knows that the source is on the C:\ drive
under C:\Users\tigrang\Perforce\tigrang_TigranG-OTT_sdev\Installers\,
whereas, the one that FAILED is when the code is built on a server and for
prerequisites the build knows that the source is on the E:\ drive
under e:\workspace\s_Studio_Precommit\Installers\ directory. So if you
compare the line in the log files that starts with "Verified acquired
payload" you will see that the build from my machine can successfully
install on the target machine since it creates a local cache under the same
path on the C:\ drive as the source path was. Whereas, the one from the
server build cannot create that path since the target machine doesn't have
an E:\ drive, hence we get the following in the log:

Verified acquired payload: LicManRedistExe_x64 at path:
C:\ProgramData\Package Cache\.unverified\LicManRedistExe_x64, moving to:
e:\workspace\s_Studio_Precommit\Installers\Prerequisites\Sciemetric FlexNet
License Manager.msi

and the successful one states

Verified existing payload: LicManRedistExe_x64 at path:
C:\Users\tigrang\Perforce\tigrang_TigranG-OTT_sdev\Installers\Prerequisites\Sciemetric
FlexNet License Manager.msi

I also attached the log from the failed installation attempt where I tried
to use a relative path from the project directory, trying to go two levels
up and get the prerequisites from the only storage folder at the solution
level. That didn't work because the cache folder under the ProgramData also
went two levels up and ended up right under ProgramData.

The ProjDir_PASSED log file is my current workaround, which works well, but
I have my prerequisites duplicated in each Prerequisites folder for each
bootstrapper project, and as you can see it puts them under
C:\ProgramData\Package
Cache\{B5620641-6C3C-1014-9FC4-C12E27174EE8}v3.00.2701.1240\Prerequisites\Sciemetric
FlexNet License Manager.msi

As mentioned in my initial email my goal was to have only one Prerequisites
folder at the solution folder so I don't duplicate them for each
bootstrapper project.

Thanks,
Tigran



On Fri, Apr 8, 2022 at 6:31 PM Sean Hall via wix-users <
wix-users at lists.wixtoolset.org> wrote:

> Package/@SourcePath tells the WiX build tools where to find the file when
> building the bundle.
>
> Package/@Name tells the bundle where to find the file when it is running on
> the end-user's machine.
>
> It is not clear what you want. We would need to see the bundle's log from
> %TEMP% to see if it's the bundle's fault that files are getting put into
> C:\ProgramData. That should never happen.
>
> On Fri, Apr 8, 2022 at 4:38 PM Tigran Galoyan via wix-users <
> wix-users at lists.wixtoolset.org> wrote:
>
> > Hi Community,
> >
> > In my installers solution I have a couple of bootstrapper projects which
> > all depend on almost the same set of prerequisite packages. Not to have a
> > Prerequisites folder for each project and have all the packages
> duplicated
> > in every project Prerequisites folder I moved the Prerequisites folders
> to
> > be located at one place only at the root level next to my solution file:
> >
> > *assume my C:\Installers folder has the following structure*
> >
> > [Installers]
> >     [Installer1]
> >         [BootstrapperProject1]
> >             bootstrapper_proj1.wixproj
> >         [Installer1Project]
> >              installer1_proj.wixproj
> >         [Installer1CustomActions]
> >              installer1_custactions.csproj
> >     [Installer2]
> >         [BootstrapperProject2]
> >             bootstrapper_proj2.wixproj
> >         [Installer2Project]
> >              installer2_proj.wixproj
> >         [Installer2CustomActions]
> >              installer2_custactions.csproj
> >     [Prerequisites]
> >         package1.exe
> >         package2.exe
> >     Installers.sln
> >
> > So my bootstrapper projects in their <Bundle /> have a definition:
> >
> >     <WixVariable Id="PrerequisitesDirectory"
> > Value="$(SolutionDir)Prerequisites\" />
> >
> > and the <ExePackage>-s have the SourceFile defined to be based on that
> path
> >
> >     SourceFile="!(wix.PrerequisitesDirectory)package1.exe"
> >
> > However, when I build the solution on our build server, over there the
> > source code is on E:\ drive (E:\Installers\...) and when I get the
> > setup.exe to install on a target machine it fails to install the
> > prerequisites because it tries to create a local cache using the absolute
> > path from the source and since on the target machine we don't have an E:\
> > drive then it cannot copy the prerequisites and run them. If I build on
> my
> > local machine assuming the code is on C:\Installers\ then everything is
> > fine when we install the setup.exe on a target machine, it basically
> > creates the C:\Installers\Prerequisites\ folder and copies the packages
> > under. That way it works.
> >
> > We cannot change the E:\ drive structure on the builder servers, so I had
> > to move the Prerequisites folder and have its duplicated copies under
> each
> > bootstrapper project folder and in my bootstrapper projects in their
> > <Bundle /> have changed the definition to:
> >
> >     <WixVariable Id="PrerequisitesDirectory" Value="Prerequisites\" />
> >
> > This way it will work and during the setup install on a target machine
> the
> > prerequisite packages are copied under the "ProgramData\Package
> > Cache\[GUID-FOLDER]\" and installed from there with no issues.
> >
> > To avoid the duplication of source packages I thought I can use relative
> > paths when defining the prerequisites directory and I moved it back to
> > solution level as it was before and modified the Bundles to have the
> > variable definition this way:
> >
> >     <WixVariable Id="PrerequisitesDirectory" Value="..\..\Prerequisites\"
> > />
> >
> > The setup.exe again fails to install the packages since this time the
> > Prerequisites cache folder is being created under C:\ProgramData\
> directly
> > since 2 levels up from "ProgramData\Package Cache\[GUID-FOLDER]\" ends up
> > under ProgramData and Windows is not happy and won't install the packages
> > from that folder (security reasons I believe).
> >
> > Can you please advise, how I can avoid having duplicate copies of
> > Prerequisites under each bootstrapper folder, to have it at one location
> > (preferably at the solution level) and still dictate the Windows
> Installer
> > to put my Prerequisites under "C:\ProgramData\Package
> > Cache\[GUID-FOLDER]\"???
> >
> > Thanks in advance and your help is much appreciated.
> >
> > Best,
> > Tigran
> >
> > ____________________________________________________________________
> > WiX Toolset Users Mailing List provided by FireGiant
> > http://www.firegiant.com/
> >
>
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant
> http://www.firegiant.com/
>


More information about the wix-users mailing list