0

I am trying to find the current %USERPROFILE% path on windows 7.

What is the simplest way to do this?

I've tried hunting around with regedit


N.b. I'm doing this as part of setting up a python virtual envionment on windows.

4
  • 1
    Does this stackoverflow.com/questions/4906977/… help? Commented Aug 9, 2016 at 15:15
  • 2
    echo %userprofile% in a command prompt doesn't suffice? Commented Aug 9, 2016 at 15:20
  • @DudenamedBen Thanks yes - came to the same answer independently in the end..
    – Lee
    Commented Aug 9, 2016 at 15:21
  • I put it in, but you can accept it or your own answer. Whatever floats your boat. ;) Commented Aug 9, 2016 at 15:24

2 Answers 2

2

If you're not looking for a python-specific answer, you can just open a command prompt and run echo %userprofile%.

1

Managed to do it using python:

import os
os.environ['USERPROFILE']

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .