From 688cb1b32373b76c444f9b4e859d8b3246d1aaa8 Mon Sep 17 00:00:00 2001 From: David Sangrey Date: Fri, 18 Aug 2023 16:39:55 -0400 Subject: [PATCH] [Installer] Simplify the PowerShell Search --- resources/EDMC_Installer_Config_template.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/EDMC_Installer_Config_template.txt b/resources/EDMC_Installer_Config_template.txt index ff030776..254c95ca 100644 --- a/resources/EDMC_Installer_Config_template.txt +++ b/resources/EDMC_Installer_Config_template.txt @@ -78,7 +78,7 @@ begin begin PowerShellOutputFile := ExpandConstant('{tmp}\PowershellOutput.txt'); // Construct the PowerShell command and capture output to a file - Exec('powershell.exe', '-NoProfile -ExecutionPolicy Bypass -Command "Get-WmiObject -Class Win32_Product | ForEach-Object { $_.Name -like ''*Elite Dangerous Market Connector*'' } | Select-Object -ExpandProperty IdentifyingNumber" | Out-File -Encoding ASCII "' + PowerShellOutputFile + '"', '', SW_HIDE, ewWaitUntilTerminated, ResultCode); + Exec('powershell.exe', '-NoProfile -ExecutionPolicy Bypass -Command "Get-WmiObject -Class Win32_Product | where Name -eq ''Elite Dangerous Market Connector'' | select-object -expandproperty IdentifyingNumber" | Out-File -Encoding ASCII "' + PowerShellOutputFile + '"', '', SW_HIDE, ewWaitUntilTerminated, ResultCode); begin if LoadStringFromFile(PowerShellOutputFile, S) then S:= Trim(S);