0

We have apps running on Windows Server 2003 and now 2008 as well. Unfortunately some of our code relies on inspecting the Documents and Settings directory which no longer exists in Windows 2008.

It looks like there are "Junction Points" set up for backwards compatibility - http://msdn.microsoft.com/en-us/library/bb756982.aspx. But it seems like nothing I can do can get me access. I basically need to be able to call from a command line on both 2003 and 2008:

C:\Documents and Settings\Administrator\Local Settings\Application Data\Google\Chrome\Application\chrome.exe

Which translates in Windows 2008 to :

C:\Users\Administrator\AppData\Local\Google\Chrome\Application\chrome.exe

I've tried setting up my own "Documents and Settings" folder in 2008 but it won't let me as that seems to be reserved for these Juntion Points.

Evan Anderson
  • 141,071
  • 19
  • 191
  • 328
brendan
  • 158
  • 7

1 Answers1

1

If you go to Windows Explorer -> Tools -> Folder Options -> View and uncheck "Hide protected operating system files", you will see all the "Junction Point" folder. Junction points are "Deny" "List folder / read data" rights by default.

You can remove the "Deny" permission for "Everyone" group to allow these folders but it's not recommended.

It is best to have the application updated to be compatible with Windows Server 2008.

The C:\Documents and Settings folder is now a "Junction Point" that redirects you to C:\Users.

You should use a variable, such as %userprofile%\ to hit the "Junction Point".

Looking at the "C:\Users\UserName\AppData" folder, the user should have "Full control". The "C:\Users\UserName\Application Data" folder is a junction point with special rights as it redirects to the "C:\Users\UserName\AppData" folder.

If you double click on the "C:\Users\UserName\Application Data" folder, you should get an "Access is Denied" message due to this being a junction point.

Vivek Kumbhar
  • 3,063
  • 1
  • 17
  • 13
  • Agreed the best way to go is probably environment variables since I'll need to support both environments. Unfortunately I can't seem to find an environment variable path that works in this case. %localappdata% does not seem to work in Windows 2003. – brendan Mar 25 '10 at 14:30
  • Anyway, will ask about environment variables in a separate question – brendan Mar 25 '10 at 14:31