As part of my detection PowerShell script I'm running AdobeUninstaller.exe, their console app that lists installed Creative Cloud software. To get the output from that app I have to redirect the output and I believe that is populating StdOut, thus always forcing detection as success. The relevant part of the initial detection script shown below.
Start-Process -FilePath PowerShell.exe -ArgumentList '--list' -RedirectStandardOutput C:\Temp\Removal.log -wait
I've tried running the command below in a second script on the target computer and called that second script from the detection script. The command below failed. It launched a PowerShell window for a brief instant but failed to run the script. The script was tested independently and ran without issue.
Start-Process Powershell.exe -Argumentlist 'c:\somefolder\somescript.ps1'
I ended up running the script with the command below but wondered if this is running in the same instance of PowerShell as the detection script as I only see one PowerShell process running.
& 'C:\Tools\Detection.ps1'
I'm hoping to find a way to run the console tool independently of the detection script, but triggered from the detection script, so that the detection script is not interfered with by the output from the console app.
Ultimately I'm trying to find a way to run AdobeUninstaller.exe --list and get the output in a file that I can review in the detection script. Any offers of advice or suggestions would be appreciated thanks.