1

Does the env. variable ALLUSERSPROFILE and the function

SHGetSpecialFolderPath(0, path, CSIDL_COMMON_APPDATA, FALSE)

Will always lead to the same path (in all Windows versions)?

I need this because our installer uses the env. variable and in our code we use the function call.

Thanks

kambi
  • 3,291
  • 10
  • 37
  • 58
  • 1
    So far as I can tell, the paths will be the same. But I can't find documentation to support that. – David Heffernan Mar 06 '12 at 12:46
  • Environment variables can be changed easily. So no, technically you're not safe. Practically you can blame the user for doing something silly. Do favor MSI. – Hans Passant Mar 06 '12 at 13:23

1 Answers1

0

Function and enviromental varibale will be same path. Im not sure if they will both be the same string on all versions of windows, IE one could produce a "DOS path".

Folder is likely to change between versions of windows and windows install language.

Testing on Windows 7 and XP both seem to produce a long path name ( IE above 8 chars )

EKS
  • 5,543
  • 6
  • 44
  • 60