Clear $ErrorActionPreference='SilentlyContinue' $txt=$env:USERPROFILE+'\Desktop\logiciels.txt' $path='HKLM:SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall' $keys=Get-ChildItem -path $path ForEach($key in $Keys) { $tmp=$path+'\'+$key.PSChildName Get-ItemProperty -Path $tmp |Select DisplayName,DisplayVersion|ForEach{ If($.DisplayName -ne $null) { $value='32 bit : '+$.DisplayName+' '+$.DisplayVersion Add-Content -Path $txt -Value $value } } } $path='HKLM:SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall' $keys=Get-ChildItem -path $path ForEach($key in $Keys) { $tmp=$path+'\'+$key.PSChildName Get-ItemProperty -Path $tmp |Select DisplayName,DisplayVersion|ForEach{ If($.DisplayName -ne $null) { $value='64 bit : '+$.DisplayName+' '+$.DisplayVersion Add-Content -Path $txt -Value $value } } }
16726 shaares