powershell: listing stuff from add/remove programs
heard from my buddy stefan stranger today and was discussing how to get information from ARP. this is what we came up with:
my method
dir "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" | % { get-itemproperty $_.pspath }
his method
get-itemproperty HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*
his method requires less typing but in actuality took longer -- usually about twice as long. still too fast to notice the difference but interesting anyway. must be the wildcard.
measure-command {dir "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" | % { get-itemproperty $_.pspath }}
Days : 0
Hours : 0
Minutes : 0
Seconds : 0
Milliseconds : 736
Ticks : 7368684
TotalDays : 8.52856944444444E-06
TotalHours : 0.000204685666666667
TotalMinutes : 0.01228114
TotalSeconds : 0.7368684
TotalMilliseconds : 736.8684
measure-command {get-itemproperty HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*}Days : 0
Hours : 0
Minutes : 0
Seconds : 2
Milliseconds : 876
Ticks : 28768438
TotalDays : 3.32968032407407E-05
TotalHours : 0.000799123277777778
TotalMinutes : 0.0479473966666667
TotalSeconds : 2.8768438
TotalMilliseconds : 2876.8438
Comments
Post a Comment