[wix-users] Setting TARGETDIR for quiet install

Brian E brianke at gmail.com
Wed Mar 18 10:06:05 PDT 2020


I tried setting the msiexec command to this:

msiexec /a $msiFile /passive /l*v ".\HRACtions Install Log.txt"
SERVICEACCOUNT="sa" PASSWORD="8Scripture4D34M"
CONFIRMPASSWORD="8Scripture4D34M" INSTALL_FOLDER="C:\Program Files
(x86)Delphia Consulting\HR Actions"

But it still pops up the Windows Installer information window like
INSTALL_FOLDER is not recognized as a parameter.

I also added the backslash to the end of the path and switched to a regular
install (/i) but still have the same issue.

Brian

If you can't explain it simply, you don't understand it well enough.  -
Albert Einstein


On Wed, Mar 18, 2020 at 12:37 PM Rob Mensching via wix-users <
wix-users at lists.wixtoolset.org> wrote:

> > Or is there a different parameter i should be setting?
>
> INSTALL_FOLDER?
>
> History:
> http://robmensching.com/blog/posts/2010/1/26/stackoverflow-what-does-namesourcedir-refer-to/
>
>
> Short replies here. Complete answers here:
> https://www.firegiant.com/services/
>
> -----Original Message-----
> From: wix-users <wix-users-bounces at lists.wixtoolset.org> On Behalf Of
> Brian E via wix-users
> Sent: Wednesday, March 18, 2020 9:29 AM
> To: WiX Users <wix-users at lists.wixtoolset.org>
> Cc: Brian E <brianke at gmail.com>
> Subject: [wix-users] Setting TARGETDIR for quiet install
>
> I am trying to create a powershell script to do a quiet install of our
> product.  This is the line I have in PS to run the MSI file:
>
> msiexec /a $msiFile /passive /l*v ".\HRACtions Install Log.txt"
> SERVICEACCOUNT="sa" PASSWORD="8Scripture4D34M"
> CONFIRMPASSWORD="8Scripture4D34M"
>
> This appears to run correctly and the log file indicates that the product
> installed correctly.  The problem I am having is the product is being
> installed in the wrong directory.  It is being installed to "C:\" when it
> should go to "C:\Program Files (x86)"
>
> In the log file I see that the TARGETDIR is being set to "C:\" (PROPERTY
> CHANGE: Adding TARGETDIR property. Its value is 'C:\'.)
>
> I tried to add a parameter to the PS script to set the TARGETDIR like this:
>
> msiexec /a $msiFile /passive /l*v ".\HRACtions Install Log.txt"
> SERVICEACCOUNT="sa" PASSWORD="8Scripture4D34M"
> CONFIRMPASSWORD="8Scripture4D34M" TARGETDIR="C:\Program Files (x86)"
>
> However, now when I run the PS script, I get the Windows Installer pop-up
> window displaying all the msiexec options which typically indicates
> something is wrong with the call to msiexec.
>
> Is there a way to set the TARGETDIR from msiexec?  Or is there a different
> parameter i should be setting?
>
> My Product.wxs is setting the file structure like so:
>
>   <!-- Directory setup -->
>   <Fragment>
>     <!-- Setup 'Program Files' folder for 'Delphia Consulting\HR Actions'
> -->
>  <Directory Id="TARGETDIR" Name="SourceDir">
>
>       <!-- 'Program Files' or Program Files (x86)' -->
>    <Directory Id="ProgramFilesFolder">
>           <Directory Id="COMPANY_DIRECTORY" Name="$(var.CompanyName)">
>             <Directory Id="INSTALL_FOLDER" Name="$(var.ProductName)" >
>             . . .
>
> Brian
>
> If you can't explain it simply, you don't understand it well enough.  -
> Albert Einstein
>
> ____________________________________________________________________
> 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