I am having some odd trouble getting a REG_SZ
value using:
(get-itemproperty -Path "Registry::HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall\VLC media player" -Name UninstallString).UninstallString
(get-itemproperty -Path "Registry::HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall\VLC media player" -Name UninstallString).UninstallString
get-itemproperty : Cannot find path 'HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall\VLC media player' because it
does not exist.
At line:1 char:2
+ (get-itemproperty -Path "Registry::HKEY_LOCAL_MACHINE\Software\Microsoft\Windows ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (HKEY_LOCAL_MACH...LC media player:String) [Get-ItemProperty], ItemNotFoundException
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetItemPropertyCommand
This method works for another REG_SZ
without issue, but when I call for many keys below Uninstall
it fails.
Specifically, it works with:
(get-itemproperty -Path "Registry::HKEY_CURRENT_USER\Software\Microsoft\Command Processor" -Name autorun).AutoRun
Both data entries exist on my system as visible in regedit....
However, what is very interesting, they do not exist in the resultant of:
Get-ChildItem "Registry::HKEY_LOCAL_MACHINE\software\microsoft\windows\currentversion\uninstall\"
There are several more "missing" keys as well. This seems like some odd registry namespace virtualization that I am not familiar with (similar to HKEY_CLASSES_ROOT)?