diff --git a/windows/appchk.ps1 b/windows/appchk.ps1 new file mode 100644 index 0000000..e15c0d2 --- /dev/null +++ b/windows/appchk.ps1 @@ -0,0 +1,32 @@ +# Define the registry paths for 32-bit and 64-bit applications +$registryPaths = @( + "HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall", + "HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall" +) + +# Initialize an array to store application information +$applications = @() + +# Loop through each registry path +foreach ($registryPath in $registryPaths) { + # Get the registry keys for each application + $keys = Get-ChildItem -Path $registryPath + foreach ($key in $keys) { + # Get the application properties + $app = Get-ItemProperty -Path $key.PSPath + # Add the application information to the array + $applications += [PSCustomObject]@{ + Name = $app.DisplayName + Version = $app.DisplayVersion + Publisher = $app.Publisher + InstallDate = $app.InstallDate + Size = $app.EstimatedSize + } + } +} + +# Filter out applications with no name +$applications = $applications | Where-Object { $_.Name -ne $null } + +# Display the applications +$applications | Select-Object Name, Version, Publisher, InstallDate, Size | Format-Table -AutoSize