Advertisement
ibi

get_appver.ps1

ibi
Oct 15th, 2019
777
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Start-Transcript -path c:\temp\appver_$env:computername.txt
  2. Trap { write "file not found: $_"; continue }
  3. [System.Diagnostics.FileVersionInfo]::GetVersionInfo("C:\apps\7z\7za.exe")
  4. [System.Diagnostics.FileVersionInfo]::GetVersionInfo("C:\apps\bc4\bcompare.exe")
  5. [System.Diagnostics.FileVersionInfo]::GetVersionInfo("C:\apps\Notepad++\notepad++.exe")
  6. [System.Diagnostics.FileVersionInfo]::GetVersionInfo("C:\apps\SumatraPDF\SumatraPDF.exe")
  7. [System.Diagnostics.FileVersionInfo]::GetVersionInfo("C:\apps\Sylpheed\sylpheed.exe")
  8. [System.Diagnostics.FileVersionInfo]::GetVersionInfo("C:\apps\IronPortable\Iron\chrome.exe")
  9. [System.Diagnostics.FileVersionInfo]::GetVersionInfo("C:\apps\chromium_x64\bin\chrome.exe")
  10. [System.Diagnostics.FileVersionInfo]::GetVersionInfo("C:\apps\pmp64\Bin\Palemoon\palemoon.exe")
  11. [System.Diagnostics.FileVersionInfo]::GetVersionInfo("C:\apps\totalcmd\totalcmd.exe")
  12. [System.Diagnostics.FileVersionInfo]::GetVersionInfo("C:\apps\zeus\zeus.exe")
  13. [System.Diagnostics.FileVersionInfo]::GetVersionInfo("$env:ProgramFiles\winrar\winrar.exe")
  14. # [System.Diagnostics.FileVersionInfo]::GetVersionInfo("$env:ProgramFiles (x86)\ramdisk\ramdisk.exe")
  15. # [System.Diagnostics.FileVersionInfo]::GetVersionInfo("$env:ProgramFiles\Oracle\VirtualBox\VirtualBox.exe")
  16. if (test-path 'HKLM:\software\Microsoft\Windows\CurrentVersion\Uninstall\{B2FE1952-0186-46C3-BAEC-A80AA35AC5B8}_Display.Driver') { gp 'HKLM:\software\Microsoft\Windows\CurrentVersion\Uninstall\{B2FE1952-0186-46C3-BAEC-A80AA35AC5B8}_Display.Driver' | select displayname, displayversion, installdate | ft -autosize }
  17. if (test-path 'HKLM:\software\wow6432node\Microsoft\Windows\CurrentVersion\Uninstall\{F0E3AD40-2BBD-4360-9C76-B9AC9A5886EA}') { gp 'HKLM:\software\wow6432node\Microsoft\Windows\CurrentVersion\Uninstall\{F0E3AD40-2BBD-4360-9C76-B9AC9A5886EA}' | select displayname, displayversion | ft -autosize }
  18. gci $env:windir\system32\drivers\etc -filter hos* | select fullname, lastwritetime, length | ft -autosize
  19. gci c:\apps -filter *.cmd | select fullname, lastwritetime, length | ft -autosize
  20. get-appxpackage | ft name, installlocation
  21. gwmi win32_product | ft identifyingnumber, version, name -wrap -autosize
  22. # $ibiWMISet = @("Win32_ComputerSystem", "Win32_OperatingSystem", "Win32_BaseBoard")
  23. # foreach ($ele in $ibiWMISet) { write $ele; gwmi $ele | ft -autosize }
  24. Stop-Transcript
  25. mv c:\temp\appver_*.txt \\kermit\logs\ -force
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement