Wix CAQuietExec - Path gets prefixed with 'C:\Windows\SysWOW64\'

0

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="&quot;rs.exe&quot; -i &quot;[INSTALLFOLDER]Program Scripts\Script1.rss&quot;"/>

<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='&quot;rs.exe&quot; -i &quot;C:\Program Files (x86)\ABCCompany\DEFProductInstaller\Program Scripts\Script1.rss&quot;/>

But I need it to work with INSTALLFOLDER

windows
wix
windows-installer
asked on Stack Overflow Apr 23, 2014 by escist • edited Apr 24, 2014 by escist

2 Answers

0

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. &quot;[SystemFolder]rs.exe&quot;

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.

answered on Stack Overflow Apr 23, 2014 by Christopher Painter
0

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

answered on Stack Overflow Apr 23, 2014 by Bob Arnson

User contributions licensed under CC BY-SA 3.0