Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > PowerShell

Vista - Wrong $home variable value

Reply
 
Old 10-29-2009   #1 (permalink)
hayate


 
 

Wrong $home variable value

I installed Powershell V2 RTM yesterday on my vista sp2 box, and I
found my $home is C:, which is very strange
My vista is installed on D:, and homepath is D:\users\xxx

Any comments is appreciated

My System SpecsSystem Spec
Old 10-29-2009   #2 (permalink)
Larry__Weiss


 
 

Re: Wrong $home variable value

Yes, it is strange.
$home value should coincide with env:\HOMEDRIVE and env:\HOMEPATH

PS C:> gc env:\HOMEDRIVE
C:
PS C:> gc env:\HOMEPATH
\Documents and Settings\Larry
PS C:> $home
C:\Documents and Settings\Larry
PS C:>

- Larry


hayate wrote:
Quote:

> I installed Powershell V2 RTM yesterday on my vista sp2 box, and I
> found my $home is C:, which is very strange
> My vista is installed on D:, and homepath is D:\users\xxx
>
> Any comments is appreciated
My System SpecsSystem Spec
Old 10-30-2009   #3 (permalink)
Martin Zugec


 
 

Re: Wrong $home variable value

Hi hayate,

can you please run following and give us results?

dir env:home*
dir variable:home

Martin
My System SpecsSystem Spec
Old 10-30-2009   #4 (permalink)
hayate


 
 

Re: Wrong $home variable value

On Oct 30, 5:19*pm, Martin Zugec <martin.zu...@newsgroup> wrote:
Quote:

> Hi hayate,
>
> can you please run following and give us results?
>
> dir env:home*
> dir variable:home
>
> Martin
Hi, the result:
21# dir env:home*

Name Value
---- -----
HOMEPATH \Users\xxx
HOMEDRIVE D:

22# dir variable:home

Name Value
---- -----
HOME C:

Thanks all the same
My System SpecsSystem Spec
Old 4 Weeks Ago   #5 (permalink)
hayate


 
 

Re: Wrong $home variable value

On Oct 31, 12:58*am, hayate <hayate...@newsgroup> wrote:
Quote:

> On Oct 30, 5:19*pm, Martin Zugec <martin.zu...@newsgroup> wrote:
>
Quote:

> > Hi hayate,
>
Quote:

> > can you please run following and give us results?
>
Quote:

> > dir env:home*
> > dir variable:home
>
Quote:

> > Martin
>
> Hi, the result:
> 21# dir env:home*
>
> Name * * * * * * * * * * * * * Value
> ---- * * * * * * * * * * * * * -----
> HOMEPATH * * * * * * * * * * * \Users\xxx
> HOMEDRIVE * * * * * * * * * * *D:
>
> 22# dir variable:home
>
> Name * * * * * * * * * * * * * Value
> ---- * * * * * * * * * * * * * -----
> HOME * * * * * * * * * * * * * C:
>
> Thanks all the same
It seems that the $home value is the parent of the document folder,
because my document is located at C:\Documents
My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Home Prem x64 SP2 RC1 wrong HD order Vista hardware & devices
Vista Home Premium - Taskbar clock permanently wrong Vista installation & setup
Something wen Wrong On My Windows Vista Home Pre academic Vista General
Dual Boot w/XP Home Gone Wrong.......... Vista installation & setup
How can I ensure that a variable is a built-in powershell variable? PowerShell


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46