Wix 3.6. I'm trying to run a bundle :
<Bundle Name="Setup" Version="1.0.0.0" Manufacturer="Bentley" UpgradeCode="37d68094-0b98-4b16-bfbe-7f0d3015064a">
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense" />
<Chain>
<MsiPackage SourceFile="path/to/MyMsiFileWhichIsFine.msi" Cache="yes" Compressed="no" InstallCondition="1"/>
</Chain>
Result from execution :
0x800b0109 A certification chain processed, but terminated in a root certificate which is not trusted by the trust provider.
The log file says :
Detected partially cached package: MyMsiFileWhichIsFine.msi, invalid payload: MyMsiFileWhichIsFine.msi, reason: 0x80070570
I signed this msi. The bootstrapper was also signed using (cf this link):
insignia -ib Setup.exe -o engine.exe
signtool engine.exe (extra parameters excluded for simplicity)
insignia -ab engine.exe Setup.exe -o Setup.exe
signtool Setup.exe
One possibility is the msi was created externally rather than using Heat.exe that comes as part of WIX. I've had similar issues when I was trying to work with VB6 files, and had to add in flags to ignore those checks. But in your case, Bootstrapper might not be able to interpret the msi correctly. How did the msi get created? Did you use Heat? Can you post the Heat lines if so?
I found a solution ! I just skip the signing verification like this :
<ExePackage SourceFile="MyPath\MyFileToLaunch.exe" Compressed="no" SuppressSignatureVerification="yes"/>
Related
I built an MSI using the WIX Toolset. In the MSI I use:
<SetProperty Id="ARPINSTALLLOCATION" Value="[INSTALLFOLDER]" After="CostFinalize"/>
to set the InstallLocation regkey. When testing with the App Cert Kit I get the failure:
A non-optional value 'InstallLocation' is missing or invalid for program.
After checking the registry on my PC and another's the correct registry key
InstallLocation: C:\Program Files\*program_name*\
is present on both in the correct location
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{GUID}.
I tried consulting a related question but honestly have no idea what the solution is saying. I also tried running the Cert Kit on the other computer but to no avail. Is this a known bug in the Cert Kit or is that not a valid InstallLocation?
I am getting the following error in the log file:
Action start 12:11:52: CreateIisConfigs.
MSI (s) (0C:7C) [12:11:52:731]: Invoking remote custom action. DLL: C:\WINDOWS\Installer\MSIFD80.tmp, Entrypoint: CreateIisConfigs
MSI (s) (0C:E8) [12:11:52:731]: Generating random cookie.
MSI (s) (0C:E8) [12:11:52:733]: Created Custom Action Server with PID 10316 (0x284C).
MSI (s) (0C:F0) [12:11:52:751]: Running as a service.
MSI (s) (0C:F0) [12:11:52:753]: Hello, I'm your 32bit Impersonated custom action server.
SFXCA: Extracting custom action to temporary directory: C:\WINDOWS\Installer\MSIFD80.tmp-\
SFXCA: Failed to extract to temporary directory. Cabinet error code 1.
CustomAction CreateIisConfigs returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox)
Action ended 12:11:52: CreateIisConfigs. Return value 3.
Action ended 12:11:52: INSTALL. Return value 3.
I am using <MediaTemplate EmbedCab="yes" /> and WIX Toolset 3.10.
Thanks for your time.
You have a security/permission issue.
Check the line before this issue.
Also it could be related to exe file you are using in your CA.
Hope it helped.
Okay so i sort this issue out.In my specific case i have a post-build action that copies the msi file to the Resources folder of C# class library project.Somehow the msi got corrupted and thats why i had this Cabinet error code 1 .After i manually copy paste the msi the error is gone.
I'm working on moving a set of installers from VS2010 to WIX and have encountered an error with our NT Service applications.
After creating and installing the NT Service using the WIX installer, the service is not looking for the app.config named as you would expect (ApplicationName.exe.config). Our application name is akin to XXX.YYYYYYYY and when injecting the debugger into the service during start up, i can see that it is looking for XXX.config instead of XXX.YYYYYYY.exe.config.
I've tried running the application via the console and when I do, it looks for the correct app.config file name. Using the VS2010 installer also has the service looking for the correct app.config file name.
Is there some setting in wxi3.8 that I am missing, or putting the incorrect value into, that would cause this? Here is the segment of the wxs that controls the service:
<Component Id="Service" Guid="DCE18608-D25F-4DC0-9E1B-C2E3575D0BFE">
<File Id="ServiceComponentMain" Name="$(var.XXX.YYYYYYY.TargetName)" Source="$(var.HHG.SpecOrderLoadSync.TargetPath)"
DiskId="1" Vital="yes" KeyPath="yes"/>
<ServiceInstall Id="Service" Name="$(var.XXX.YYYYYYY.TargetName)" Type="ownProcess" DisplayName="$(var.XXX.YYYYYYY.TargetName)"
Description="$(var.XXX.YYYYYYY.TargetName)" Start="auto" Account="NT AUTHORITY\LocalService" ErrorControl="normal">
<util:PermissionEx User="Everyone" ServicePauseContinue="yes" ServiceQueryStatus="yes"
ServiceStart="no" ServiceStop="yes" ServiceUserDefinedControl="yes"/>
</ServiceInstall>
<ServiceControl Id="Service" Stop="both" Remove="both" Name="$(var.XXX.YYYYYYY.TargetName)" Wait="no"/>
Finally figured this out after digging around the registery. It appears that with my current wsx file it isn't registering the full path to the executable including ".exe" at the end. This is what is causing the config file name to be confused. Why in the world this makes a difference is beyond me, but just another thing to annoy me about windows i guess...
To fix, changing the Name on the File element in the segment above to be $(var.XXX.YYYYYYY.TargetName).exe instead of just $(var.XXX.YYYYYYY.TargetName) seems to work.
I provided a path like this as the Property Value: [INSTALLFOLDER]Program Scripts\Script1.rss
where INSTALLFOLDER is C:\Program Files (x86)\ABCCompany\DEFProductInstaller\
But it somehow gets interpreted like this:
C:\Windows\SysWOW64\C:\Program Files (x86)\ABCCompany\DEFProductInstaller\Program Scripts\Script1.rss
This is the Property and the associated CustomAction
<Property Id="CreateDataSources"
Value=""rs.exe" -i "[INSTALLFOLDER]Program Scripts\Script1.rss""/>
<CustomAction Id="CreateDataSources" BinaryKey="WixCA" DllEntry="CAQuietExec" Execute="deferred" Return="check" Impersonate="no"/>
This is the log:
Property(S): SystemFolder = C:\Windows\SysWOW64\
...
MSI (s) (8C:44) [14:41:41:202]: Executing op: CustomActionSchedule(Action=CreateDataSources,ActionType=3073,Source=BinaryData,Target=CAQuietExec,CustomActionData="rs.exe" -i "[INSTALLFOLDER]Program Scripts\Script1.rss" -s http://localhost/ReportServer -v DataSourcePath="" -v DBServer="." -v InitialCatalog="MyDB" -v UserId="" -v Password="" -v IntegratedSecurity="True")
MSI (s) (8C:78) [14:41:41:211]: Invoking remote custom action. DLL: C:\Windows\Installer\MSIFB.tmp, Entrypoint: CAQuietExec
MSI (s) (8C:90) [14:41:41:211]: Generating random cookie.
MSI (s) (8C:90) [14:41:41:213]: Created Custom Action Server with PID 16716 (0x414C).
MSI (s) (8C:C4) [14:41:41:237]: Running as a service.
MSI (s) (8C:C4) [14:41:41:238]: Hello, I'm your 32bit Impersonated custom action server.
CAQuietExec: Could not find a part of the path 'C:\Windows\SysWOW64\C:\Program Files (x86)\ABCCompany\DEFProductInstaller\Program Scripts\Script1.rss'.
CAQuietExec: Error 0x80070001: Command line returned an error.
CAQuietExec: Error 0x80070001: CAQuietExec Failed
Any idea as to what I'm doing wrong?
UPDATE Changing the <Property> value to an absolute path fixes this issue.
<Property Id="CreateDataSources"
Value='"rs.exe" -i "C:\Program Files (x86)\ABCCompany\DEFProductInstaller\Program Scripts\Script1.rss"/>
But I need it to work with INSTALLFOLDER
The log isn't failing the way I expect it to fail (perhaps there has been a recent WiX change) but in my experience the call to rs.exe has to not only be wrapped in quotes but it has to be an absolute path. "[SystemFolder]rs.exe"
BTW, it seems you are using RS.exe to deploy reporting services changes. I don't believe that file is legally redistributable. I was working for a company about 6 years ago where I wrote a table driven C#/DTF custom action that consumed the SSRS web service to publish directories, reports and datasources. I never implemented rollback though. Also this is one type where Impersonate=No may end poorly. This is due to the fact that in some situations the logged on user might have writes to the SSRS web service and the SYSTEM account may not.
You need to provide a full path to the .exe you want to run. CreateProcess does not use the system path: http://msdn.microsoft.com/en-us/library/windows/desktop/ms682425%28v=vs.85%29.aspx
I have a requirement to update config files with the command line provided arguments for some reason, the file is not being updated so I wrote a small utility app in c# to be started by msiexec. The intention is to get the commandline params to this app so that it would open the config file and update it during the course of installation.
My app was executed fine but when trying to read the parent process (msiexec) command line params, I get something like C:\windows\msiexec /V not the ones I specify on the msiexec command line (I'm not even using /V)
Any ideas about what could be the issue? If you have a better way to handle this please suggest.
Thanks.
Update:
Sorry for the confusion, I was using WiX installer and I start the WiX generated .msi on the command line as below for eg.
C:\> msiexec /I foo.msi ARG1="v1" ARG2="v2"
ARG1 and ARG2 are defined in Wix installer script.
What I'm looking at is a way to access the command line params ARG1="v1", ARG2="V" by a small application which will be started by msiexec (the app is specified in Wix installer script as custom action).
Ideally, when I use xmlFile (tried xmlConfig as well), my WiX installer script should be able to update my config files with v1, v2 but its not happening so wrote an application that should be able to read v1 & v2 and write to the config file.
using xmlFile I get the following error:
ExecXmlFile: Error 0x8007006e: failed to load XML file: Error 25531. Failed to open XML file , system error: -2147024786 MSI (s) (E4!54) [18:11:36:714]: Product: -- Error 25531. Failed to open XML file , system error: -2147024786 –
Doesn't get any meaningful info. I used the msiexec argument /l*v to generate the logging.
Log excerpt:
Actually xmlFile should do my requirement but I get the following error while using it. Any help on this would be greatly appreciated.
MSI (s) (E4:00) [18:11:32:110]: Executing op: ActionStart(Name=ExecXmlFile,,) Action 18:11:32: ExecXmlFile.
MSI (s) (E4:00) [18:11:32:111]: Executing op: CustomActionSchedule(Action=ExecXmlFile,ActionType=3073,Source=BinaryData,Target=ExecXmlFile,CustomActionData=1030//cloudRecognition/connectiontype130//cloudRecognition/connectionaddress192.168.128.59;192.168.128.261030//cloudRecognition/connectionport50001;50001)
MSI (s) (E4:DC) [18:11:32:113]: Invoking remote custom action. DLL: C:\Windows\Installer\MSIA419.tmp, Entrypoint: ExecXmlFile
MSI (s) (E4:EC) [18:11:32:113]: Generating random cookie.
MSI (s) (E4:EC) [18:11:32:115]: Created Custom Action Server with PID 10104 (0x2778).
MSI (s) (E4:68) [18:11:32:402]: Running as a service.
MSI (s) (E4:68) [18:11:32:403]: Hello, I'm your 32bit Elevated custom action server.
ExecXmlFile: Error 0x8007006e: failed to load XML file:
Error 25531. Failed to open XML file , system error: -2147024786
MSI (s) (E4!54) [18:11:36:714]: Product: -- Error 25531. Failed to open XML file , system error: -2147024786
CustomAction ExecXmlFile returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox)
Are you passing the arguments as MSI properties? If yes, then you can read them from the MSI database. Check this:
http://www.alteridem.net/2008/05/20/read-properties-from-an-msi-file/
I am guessing you are setting environment specific application properties to the Config file? If so, why don't you have all the properties defined in the config file and make the application smart enough to read the right properties (by checking the environment)? I would do that.
Above comments are just based on the limited information you provided. You would have your own reasons to do so :)
It seems to me that you need to add a CustomAction to your install process.
You might need both or just one, depending of the request that you have.
To Update Configuration files can you use XmlFile CustomAction, to change modify any XML file.
To launch a Quiet Execution CustomAction
I believe that this will allow you to change the values of the configuration file during the installation. You can find a nice introduction to CustomActions and their types here. Have a look at the type 2 CustomAction.
Edit for follow question in Answer section:
When is the CA scheduled to launch during the installation process?
Do you have a log file for the install?
Re-edit
Without Code or more information about the installation process, I can't really help more.
Helpfull info would be:
Where in the installation sequence is your CA launched?
What WiX Element are you using to change the values in your file.
Did you try to create an installer that does just the part that you are having trouble with, to isolate the behavior.