I am trying to set an ini file as a system file but before I do this I want to make it hidden. I want to do this because I want no one to be able to see it even if they have hidden files enabled (so that they can see hidden files). But when I set the file to hidden and then set it to system it removes the hidden attribute and makes it system only. I have also tried setting it hidden manually and then setting it system via my program but it doesn't work.
The code I am using is simply just this:
File.SetAttributes(settingsDir, FileAttributes.Hidden)
File.SetAttributes(settingsDir, FileAttributes.System)
Thanks.