mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-04-12 23:37:14 +03:00
[Installer] Simplify the PowerShell Search
This commit is contained in:
parent
99f46dd01f
commit
688cb1b323
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user