common_documents folder
-
Hi, I need to get the common_documents environment and it is NOT obtainable using system.environment so I need to use CSIDL and SHGetSpecialFolderPath. Can some one post some example code in c# on how I implement this please. Thanks,
Glen Harvy
-
Hi, I need to get the common_documents environment and it is NOT obtainable using system.environment so I need to use CSIDL and SHGetSpecialFolderPath. Can some one post some example code in c# on how I implement this please. Thanks,
Glen Harvy
string value = Microsoft.Win32.Registry.GetValue(@"HKey_Local_Machine\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders", "Common Documents", null) as string;
-
string value = Microsoft.Win32.Registry.GetValue(@"HKey_Local_Machine\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders", "Common Documents", null) as string;
Hi, For whatever reason, this does not achieve the result I need (at least on my W2K3 server). I need to install files into the common_documents directory so that any user can edit them (they are template type files). The code you listed does indeed return the correct path as far as I can tell (viz c:\documents and settings\all users\documents) however if I create a sub-directory in that directory it is not being shown in the MyDocuments window. This must have something to do with the network, profiles etc but it seems to me that I cannot achieve my goal as easily as I thought. Thanks for your response - much appreciated.
Glen Harvy
-
Hi, For whatever reason, this does not achieve the result I need (at least on my W2K3 server). I need to install files into the common_documents directory so that any user can edit them (they are template type files). The code you listed does indeed return the correct path as far as I can tell (viz c:\documents and settings\all users\documents) however if I create a sub-directory in that directory it is not being shown in the MyDocuments window. This must have something to do with the network, profiles etc but it seems to me that I cannot achieve my goal as easily as I thought. Thanks for your response - much appreciated.
Glen Harvy
Glen Harvy wrote:
however if I create a sub-directory in that directory it is not being shown in the MyDocuments window.
Glen Harvy wrote:
The code you listed does indeed return the correct path as far as I can tell
Ah, ok, you didn't mention that in your first post. Yeah, it may be wise to look into Win32 shell calls to have this done, but I'm not an expert in that area.
-
Hi, I need to get the common_documents environment and it is NOT obtainable using system.environment so I need to use CSIDL and SHGetSpecialFolderPath. Can some one post some example code in c# on how I implement this please. Thanks,
Glen Harvy
Scott. —In just two days, tomorrow will be yesterday. —Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are. - Buckaroo Banzai
[Forum Guidelines] [Articles] [Blog]