Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set-Location C: not working as expected #314

Closed
michaellwest opened this issue Mar 21, 2015 · 2 comments
Closed

Set-Location C: not working as expected #314

michaellwest opened this issue Mar 21, 2015 · 2 comments
Milestone

Comments

@michaellwest
Copy link
Member

Using the path C: should change to the root of C but it instead changes to C:\windows\system32\inetsrv

Example:

PS master:\> Set-Location -Path C:
PS C:\windows\system32\inetsrv\>

Verify the behavior with the path HKLM:

@AdamNaj
Copy link
Member

AdamNaj commented Mar 30, 2015

As far as I can tell It's working as expected. Each PSDrive has a "current location" that is being maintained. For a drive from which the process was started it will be the location of the executable.

I suspect any other drive than C: it will land in the root. but C: in this case is special as C:\windows\system32\inetsrv\ is where the w3wp.exe lives.

The following wil yield the result you expected:

Set-Location -Path C:\

@michaellwest
Copy link
Member Author

I can see how the worker process trumps my argument. Thanks for looking into it @AdamNaj . I'll make a mention of this behavior in the gitbook.

@AdamNaj AdamNaj added this to the User Support - no issue found milestone May 3, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants