In Windows other than the registry -localmachine where can I place common user data that could be accessed by all users.
i need to do this without requesting elevation of admin rights
You can store it in the Application data folder. which you can get from Envorinment:
var appDataFolder = Environment.GetFolderPath(Environment.SpecialFolder.CommonDocuments);
To determine if you can access the folder without admin right, run Visual Studio, without admin rights, and see if this code executes successfully.
class Program
{
static void Main(string[] args)
{
var folder = Environment.GetFolderPath(Environment.SpecialFolder.CommonDocuments);
var file = Path.Combine(folder, "testfile.txt");
File.WriteAllText(file, " Test Settings");
Console.ReadLine();
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With