[wix-users] can we pass custom property to a .bat file in the installer?
Reddy, Shivshankar
Shivshankar.Reddy at fmr.com
Thu Oct 13 20:42:39 PDT 2016
Hi John,
I think you misunderstood question.
He is trying to pass parameters to .bat file which will be called during installation of msi.
Example : We have setup.msi created by wix.
We have a.bat file inside the setup.msi. We are trying to call that a.bat file in CustomAction to that we need to pass the arguments from PROPERTY1 and PROPERTY2.
Yan, is this you were asking ? if not I apologies for deviating your query.
Thank you
Regards
Shiv
-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of John Cooper
Sent: Friday, October 14, 2016 6:07 AM
To: WiX Toolset Users Mailing List
Subject: Re: [wix-users] can we pass custom property to a .bat file in the installer?
It's more batch than WiX. See http://ss64.com/nt/ for extensive help on batch.
Say your property name is INSTALLFOLDER. For MSI, the property you are setting must be a public property, and all public properties in MSI are identified by being in all caps.
Let's say you want to set INSTALLFOLDER to C:\Program Files\TheProduct
This value has space(s), and so it will need to be quoted. It is also possible, in some instances, that you'll need to escape some characters, and you can find help there.
Calling is MYBAT.CMD "C:\Program Files\TheProduct\"
By convention, most paths in MSI expect to be terminated with a "\".
Inside, you'll have something like:
INSTALLFOLDER=%1
Which will take the first parameter.
This will expand to INSTALLFOLDER="C:\Program Files\TheProduct\"
--
John Merryweather Cooper
Senior Software Engineer -- Integration Development Group -- Enterprise Notification Service
Jack Henry & Associates, Inc.® | Lenexa, KS 66214 | Office: 913-341-3434x431050
JoCooper at jackhenry.com
-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Yan Wang
Sent: Thursday, October 13, 2016 7:26 PM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] can we pass custom property to a .bat file in the installer?
The e-mail below is from an external source. Please do not open attachments or click links from an unknown or suspicious origin.
Any instruction on how to do it? A simple sample would help me out... I am just a new to this software.
Thanks a lot!
Yan
-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of John Cooper
Sent: Thursday, October 13, 2016 5:21 PM
To: WiX Toolset Users Mailing List
Subject: Re: [wix-users] can we pass custom property to a .bat file in the installer?
Yes, I do it all the time. You need to respect quoting rules with some values.
I've also used Octopus substitutions in PowerShell script to deploy MSI's and Burn Bundles in this manner.
--
John Merryweather Cooper
Senior Software Engineer -- Integration Development Group -- Enterprise Notification Service Jack Henry & Associates, Inc.(r) | Lenexa, KS 66214 | Office: 913-341-3434x431050 JoCooper at jackhenry.com<mailto:JoCooper at jackhenry.com>
-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Yan Wang
Sent: Thursday, October 13, 2016 7:06 PM
To: wix-users at lists.wixtoolset.org<mailto:wix-users at lists.wixtoolset.org>
Subject: [wix-users] can we pass custom property to a .bat file in the installer?
The e-mail below is from an external source. Please do not open attachments or click links from an unknown or suspicious origin.
Hi!
Wondering if we can pass custom parameters from msi to an bat file inside msi....
For example, after we create package.msi, we can do this msiexec /i c:\path\to\package.msi /quiet /qn /norestart /log c:\path\to\install.log PROPERTY1=value1 PROPERTY2=value2
but values of PROPERTY1 and PREPERTY2 will pass to a .bat file as %1 and %2
Thanks a lot!
Yan
____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/
NOTICE: This electronic mail message and any files transmitted with it are intended exclusively for the individual or entity to which it is addressed. The message, together with any attachment, may contain confidential and/or privileged information.
Any unauthorized review, use, printing, saving, copying, disclosure or distribution is strictly prohibited. If you have received this message in error, please immediately advise the sender by reply email and delete all copies.
____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/
____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/
NOTICE: This electronic mail message and any files transmitted with it are intended
exclusively for the individual or entity to which it is addressed. The message,
together with any attachment, may contain confidential and/or privileged information.
Any unauthorized review, use, printing, saving, copying, disclosure or distribution
is strictly prohibited. If you have received this message in error, please
immediately advise the sender by reply email and delete all copies.
____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/
More information about the wix-users
mailing list