From 2ffbfd804be77580c5bab991d2715eecf1346128 Mon Sep 17 00:00:00 2001 From: David Pinedo Date: Mon, 6 Jun 2016 09:09:13 -0600 Subject: winsdkinstaller: add cmd copy as additional diagnosic for ps failure --- windowsRuntimeInstaller/InstallerRT.nsi | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) (limited to 'windowsRuntimeInstaller') diff --git a/windowsRuntimeInstaller/InstallerRT.nsi b/windowsRuntimeInstaller/InstallerRT.nsi index 6421c00a..270447d6 100644 --- a/windowsRuntimeInstaller/InstallerRT.nsi +++ b/windowsRuntimeInstaller/InstallerRT.nsi @@ -415,12 +415,27 @@ Section pop $0 Rename "$TEMP\ConfigLayersAndVulkanDLL.log" "$TEMP\VulkanRTinstall\ConfigLayersAndVulkanDLL.log" ${If} $0 != 0 - LogText "ConfigLayersAndVulkanDLL.ps1 return value is $0" - # PS Script failed, see if we can run a simple ps command and a simple ps script + # PS Script failed, see if we can run a ps command, a ps script, and/or a cmd copy + LogText "ConfigLayersAndVulkanDLL.ps1 rval1 is $0" + pop $1 + LogText "ConfigLayersAndVulkanDLL.ps1 rval2 is $1" nsExec::ExecToStack 'powershell -NoProfile -NoLogo -NonInteractive -WindowStyle Hidden -inputformat none -Command Write-Output Diagnostic0 | Out-File -encoding ascii -filePath "$TEMP\VulkanRTinstall\Diagnostic0.log"' + pop $1 + LogText "ps cmd rval1 is $1" + pop $1 + LogText "ps cmd rval2 is $1" File Diagnostic1.ps1 nsExec::ExecToStack 'powershell -NoProfile -NoLogo -NonInteractive -WindowStyle Hidden -inputformat none -ExecutionPolicy RemoteSigned -Command .\Diagnostic1.ps1' + pop $1 + LogText "ps script rval1 is $1" + pop $1 + LogText "ps script rval2 is $1" Delete Diagnostic1.ps1 + nsExec::ExecToStack 'cmd /k copy /y nul "$TEMP\VulkanRTinstall\Diagnostic2.log"' + pop $1 + LogText "cmd rval1 is $1" + pop $1 + LogText "cmd rval2 is $1" SetErrors ${EndIf} IntOp $1 10000 + $0 @@ -630,7 +645,7 @@ Section "uninstall" # Finish logging LogSet off - Rename "$INSTDIR\install.log" "$TEMP\VulkanRTuninstall\Uninstall.log" + Rename "$INSTDIR\install.log" "$TEMP\VulkanRTuninstall\uninstall.log" SectionEnd !endif @@ -706,7 +721,7 @@ Function un.CheckForError # Finish logging and move log file to TEMP dir LogSet off - Rename "$INSTDIR\install.log" "$TEMP\VulkanRTuninstall\Uninstall.log" + Rename "$INSTDIR\install.log" "$TEMP\VulkanRTuninstall\uninstall.log" Quit ${EndIf} -- cgit v1.2.3