D
DeepakHirapur
Guest
Please help me
To get the "MyDocuments" Path of current logged-in user .
The logged-in user doesn't belongs to administrator group.
i have tried below three case it is returning "C:\Users\Administrator\MyDocuments". when i run the application with run as administrator.
1 Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)
2) Path.Combine(Environment.ExpandEnvironmentVariables("%userprofile%"), "Documents")
3) "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders", "Personal", RegistryHive.CurrentUser
But in the registry the "MyDocuments"path is different like "C:\Users\testAccount\Mydocuments". testAccount is logged-in user.
Continue reading...
To get the "MyDocuments" Path of current logged-in user .
The logged-in user doesn't belongs to administrator group.
i have tried below three case it is returning "C:\Users\Administrator\MyDocuments". when i run the application with run as administrator.
1 Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)
2) Path.Combine(Environment.ExpandEnvironmentVariables("%userprofile%"), "Documents")
3) "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders", "Personal", RegistryHive.CurrentUser
But in the registry the "MyDocuments"path is different like "C:\Users\testAccount\Mydocuments". testAccount is logged-in user.
Continue reading...