I have a piece of code in powershell which I use as an "installation recipe". I use this script to check that the preparation of the PCs is good and that the various software are installed correctly. Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Force
If ((Test-Path "C:\Program Files\7-Zip") -eq $True)
{Write-Host " ~ 7-ZIP : Installation => OK! ~" -ForegroundColor Green}
else{Write-Host " ~ 7-ZIP : Installation => NOK! ~" -ForegroundColor Red}
Sleep 3
If ((Test-Path "C:\Program Files (x86)\Adobe\Acrobat Reader DC") -eq $True)
{Write-Host " ~ Adobe Reader DC : Install => OK! ~" -ForegroundColor Green}
else{Write-Host " ~ Adobe Reader DC : Install => NOK! ~" -ForegroundColor Red}
exit
If the installation is OK (OK), then it generates a value that we store and then export to a .CSV or .XLSX file. Ditto if the installation is not OK (NOK).
How do you do that?
Thanks for your help