When using either custom action "Send Install Information To Your Web Server" or "Run PowerShell Inline Script" for the HTTPS request, it will error out. The latter creates logs that point to the following error: "The underlying connection was closed: An unexpected error occurred on a send". This seems to be an issue with this version of Windows not having TLS 1.1 and 1.2 (references: [1] [2]), and I have been able to confirm a simple (albeit cumbersome) fix for this specific error on a clean Win7 SP1 installation by following these steps:
Code: Select all
1) Install all "Important Updates" in Windows Update and restart the computer.
2) Install the following security update:
KB3140245
- 32-bit: http://download.windowsupdate.com/c/msdownload/update/software/updt/2016/04/windows6.1-kb3140245-x86_cdafb409afbe28db07e2254f40047774a0654f18.msu
- 64-bit: http://download.windowsupdate.com/c/msdownload/update/software/updt/2016/04/windows6.1-kb3140245-x64_5b067ffb69a94a6e5f9da89ce88c658e52a0dec0.msu
3) Create these registry keys and values:
32-bit
- [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v2.0.50727]
"SystemDefaultTlsVersions"=dword:00000001
- [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\WinHttp]
"DefaultSecureProtocols"=dword:00000a00
- [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.1\Client]
"DisabledByDefault"=dword:00000000
- [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Client]
"DisabledByDefault"=dword:00000000
64-bit (all of the above + the following)
- [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v2.0.50727]
"SystemDefaultTlsVersions"=dword:00000001
- [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Internet Settings\WinHttp]
"DefaultSecureProtocols"=dword:00000a00
4) Restart the computer.For reference, here's the PowerShell 2.0-compatible script that I've created:
Code: Select all
# Block for declaring the script parameters.
Param()
# Your code goes here.
$webClient = New-Object System.Net.WebClient
$webClient.Encoding = [system.Text.Encoding]::UTF8
$webClient.Headers.add("Content-Type", "application/x-www-form-urlencoded")
$value = AI_GetMsiProperty VALUE
try {
$response = $webClient.UploadString("https://my.url/my-endpoint","POST","VALUE=$value")
AI_SetMsiProperty HttpPostServerResponse $response
} catch {
AI_SetMsiProperty HttpPostServerResponse $null
throw
}
FOLLOW US
Get the latest news in Application Packaging