I would like my WIX Installer to quietly invoke a NETSH command to bind a self-signed certificate to an IP address:port.
The CAQuietExec is being invoked, but the NETSH command fails.
MSI (s) (C4:84) [16:19:50:455]: Executing op: CustomActionSchedule(Action=customQtExecRtBindCertToPort,ActionType=3137,Source=BinaryData,Target=CAQuietExec,CustomActionData="netsh" http add sslcert ipport=0.0.0.0:8080 certhash=2B2C23C6B1334F886B9FFD827D64BDC072BBEFD7 appid={123456-7890-12345-4567-AAABBBCCCDDDFFFF})
MSI (s) (C4:8C) [16:19:50:457]: Invoking remote custom action. DLL: C:\Windows\Installer\MSI87DB.tmp, Entrypoint: CAQuietExec
MSI (s) (C4:78) [16:19:50:457]: Generating random cookie.
MSI (s) (C4:78) [16:19:50:458]: Created Custom Action Server with PID 2588 (0xA1C).
MSI (s) (C4:38) [16:19:50:477]: Running as a service.
MSI (s) (C4:38) [16:19:50:479]: Hello, I'm your 32bit Elevated custom action server.
CAQuietExec:
CAQuietExec: SSL Certificate add failed, Error: 1312
CAQuietExec: A specified logon session does not exist. It may already have been terminated.
A specified logon session does not exist. It may already have been terminated.
When I run the exact same command from a command shell, I am successful:
>SSL Certificate successfully added
My code is fairly simple:
<CustomAction
Id="customQtExecRtBindCertToPortData"
Property="customQtExecRtBindCertToPort"
Value=""netsh" http add sslcert ipport=0.0.0.0:[RT_PORT] certhash=[CERT_THUMBPRINT] appid={123456-7890-12345-4567-AAABBBCCCDDDFFFF}"
/>
<CustomAction
Id="customQtExecRtBindCertToPort"
BinaryKey="WixCA"
DllEntry="CAQuietExec"
Execute="deferred"
Return="ignore"
Impersonate="no"
/>
I've tried running with elevated privileges in Windows Server 2008 R2, but still receive the same log output.