aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRechi <Rechi@users.noreply.github.com>2017-04-09 18:27:46 +0200
committerGitHub <noreply@github.com>2017-04-09 18:27:46 +0200
commitd67cbb8e1b93d60d8b696ffa69a4118507f39770 (patch)
tree877f9e1191d277d7177e58e1ba41bbf112bb47e4
parent6911b811cdea3bbf26e4b82ca91d7a3dcb5b71dd (diff)
parentefb1b77f1685af799fe9534c5314ebd6640dd034 (diff)
Merge pull request #11940 from Rechi/fixWinSetupKB
[windows] installer: call findstr with full path
-rw-r--r--project/Win32BuildSetup/genNsisInstaller.nsi12
1 files changed, 10 insertions, 2 deletions
diff --git a/project/Win32BuildSetup/genNsisInstaller.nsi b/project/Win32BuildSetup/genNsisInstaller.nsi
index f7c0a3764c..d1c92bc54b 100644
--- a/project/Win32BuildSetup/genNsisInstaller.nsi
+++ b/project/Win32BuildSetup/genNsisInstaller.nsi
@@ -361,8 +361,16 @@ Function .onInit
${OrIf} $1 == ""
MessageBox MB_OK|MB_ICONSTOP|MB_TOPMOST|MB_SETFOREGROUND "Unable to run the Windows program wmic.exe to verify that Windows Update KB$HotFixID is installed.$\nWmic is not installed correctly.$\nPlease fix this issue and try again to install Kodi."
Quit
- ${EndIf}
- nsExec::ExecToStack 'cmd /Q /C "%SYSTEMROOT%\System32\wbem\wmic.exe qfe get hotfixid | findstr "^KB$HotFixID[^0-9]""'
+ ${EndIf}
+ nsExec::ExecToStack 'cmd /Q /C "%SYSTEMROOT%\System32\findstr.exe /?"'
+ Pop $0 ; return value (it always 0 even if an error occured)
+ Pop $1 ; command output
+ ${If} $0 != 0
+ ${OrIf} $1 == ""
+ MessageBox MB_OK|MB_ICONSTOP|MB_TOPMOST|MB_SETFOREGROUND "Unable to run the Windows program findstr.exe to verify that Windows Update KB$HotFixID is installed.$\nFindstr is not installed correctly.$\nPlease fix this issue and try again to install Kodi."
+ Quit
+ ${EndIf}
+ nsExec::ExecToStack 'cmd /Q /C "%SYSTEMROOT%\System32\wbem\wmic.exe qfe get hotfixid | %SYSTEMROOT%\System32\findstr.exe "^KB$HotFixID[^0-9]""'
Pop $0 ; return value (it always 0 even if an error occured)
Pop $1 ; command output
${If} $0 != 0