1

I was wondering if it were posible to use use junction (or mklink?) to have c:\Projects point to the current users my documents\projects map.

I tried junction.exe c:\project "%HOMEPATH%\my documents\projects" but it just makes a link to the interpretation of the path and not to the variable (so c:\projects would point to administrator\my documents\projects instead of %HOMEPATH%).

I'm using Windows Server 2003 R2.

Thank you!

Jon Koeter
  • 1,005
  • 2
  • 16
  • 25

1 Answers1

1

It isn't possible to do exactly what you are describing. i.e. Have a Junction that dynamically routes itself based on an environment variable.

You can get close to this behavior by creating a logon script that deletes and recreates the junction when the user logs in. Obviously this only works if there is only ever one user logged into the box at a time, otherwise they would be stomping over each other.

joshuapoehls
  • 32,695
  • 11
  • 50
  • 61