Author Posts

June 3, 2018 at 6:53 am

Sir/Madam,

I am learning PS from the Book by Jones and Hicks (PS in a month of lunches, 3rd ed.).
On page 59, I followed the example to set-location as follows:
> set-location -path hkcu
and got the error message that "C:\hkcu" does not exist, which is true.
I must be missing some simple setting, configuration, or ??? I have Windows 7, PS 5.1.
Any tips, advice or hints would be appreciated.
— SORRY SORRY — PLEASE IGNORE THIS POST:
I found out my mistake: I forgot the colon ':' in 'hkcu:'

Sincerely,
RTan

June 3, 2018 at 12:05 pm

If you like to change the provider as well when changing the location you have to make obvious that it is another drive or provider ... like so

Set-Location -Path hkcu:

or provide the provider as well with the path like this:

Set-Location REGISTRY::HKCU