-
Notifications
You must be signed in to change notification settings - Fork 4
/
softwareInstallCheck.ps1
28 lines (20 loc) · 1.28 KB
/
softwareInstallCheck.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<#
softwareInstallCheck.ps1
.DESCRIPTION
Prueft ob bestimmte Software (siehe Variablen)
instaliert ist
https://github.com/thelamescriptkiddiemax/powershell
#>
#--------------------------------------------------------------------------------------------------------------------------------------------------------
#--- Variablen ------------------------------------------------------------------------------------------------------------------------------------------
$software = "Microsoft .NET Core Runtime - 2.0.0 (x64)" # Welche Software?
#--------------------------------------------------------------------------------------------------------------------------------------------------------
#--- Installueberpruefung -------------------------------------------------------------------------------------------------------------------------------
$installed = (Get-ItemProperty HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\* | Where-Object { $_.DisplayName -eq $software }) -ne $null
If(-Not $installed) {
Write-Host "'$software' ist NICHT installiert!";
} else {
Write-Host "'$software' ist installiert."
}
Start-Sleep -s 3
#--------------------------------------------------------------------------------------------------------------------------------------------------------