Reputation: 81
Hope you can help...
Executing the below powershell (I'm a newbie btw) to get the value of a registry entry and when I execute the first powershell statement I get all the properties I'd expect but when I execute the second statement against VisualStudio\10.0 it returns no properties even though in the registry editor there are a bunch of properties (including InstallDir which is the one I'm chasing!) staring me in the face. Can you help??
Thanks
PS C:\DEV\GeoMet> Get-ItemProperty -path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion
PSPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion
PSParentPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows
PSChildName : CurrentVersion
PSDrive : HKLM
PSProvider : Microsoft.PowerShell.Core\Registry
SM_GamesName : Games
SM_ConfigureProgramsName : Set Program Access and Defaults
CommonFilesDir : C:\Program Files\Common Files
CommonFilesDir (x86) : C:\Program Files (x86)\Common Files
CommonW6432Dir : C:\Program Files\Common Files
DevicePath : C:\Windows\inf
MediaPathUnexpanded : C:\Windows\Media
ProgramFilesDir : C:\Program Files
ProgramFilesDir (x86) : C:\Program Files (x86)
ProgramFilesPath : C:\Program Files
ProgramW6432Dir : C:\Program Files
PS C:\DEV\GeoMet> Get-ItemProperty -path HKLM:\SOFTWARE\Microsoft\VisualStudio\10.0
PS C:\DEV\GeoMet>
Upvotes: 0
Views: 2118
Reputation: 16812
You are almost surely looking at the 32-bit reg hive on a 64 bit machine. Double check your regedit path - is it really HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\10.0
?
I see properties (e.g. InstallDir) in the 32 bit key, but not the 64 bit key.
This would be the proper query if so:
Get-ItemProperty -path HKLM:\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\10.0
Upvotes: 1
Reputation: 301587
This is what I see on regedit:
So, the output you get from Get-ItemProperty
is correct. For the other path you mentioned, you will see that there are lots of values.
The ones you see under the 10.0 like Debugger etc can be got by using Get-ChildItem
cmdlet.
Upvotes: 0