c# Delete file in all user in profile
From here you can get the windows users list, and then add it to your address to delete it
foreach(string userName in userList)
File.Delete(userName+@"\MyApplicationName\Directory\FileIWantToAccess\YouFileName");
AppDataFolder maps to wrong folder when installed by a standard user
Installing files to the user-profile is a problematic endeavor. Consider other approaches as explained here: Create folder and file on Current user profile, from Admin Profile.
That linked answer is somewhat over the top (it tries to summarize all the problems that can result from user-profile deployment), but basically you can have your application copy the file in question to the right user-profile folder on application launch for every user from a read-only template copy installed somewhere in the main application installation directory (under %ProgramFiles%).
Using the application to copy such files to the user-profile will eliminate a lot of deployment problems that can otherwise result. Please read the linked answer above for details.
As to what happens technically in your case, I am guessing that you have set a disk key-path for a per-user component. You need to set a HKCU registry path for such components if you want to avoid that erroneous link to the administrator folder.
UPDATE: Check if this explanation is better: http://forum.installsite.net/index.php?showtopic=21586#entry60600. By setting a HKCU path for the hosting component you won't get that hard coded name (erroneous) that is showing in red letters. Check the other answer below in the linked thread if the problem is still not clear.
If you chose to go down the HKCU key path approach, please read section 3: MSI Self-Repair
in the linked answer at the top above.
Related Topics
How to Create a Simple Proxy in C#
How to Use Moq to Mock an Extension Method
C# Switch Statement Limitations - Why
Compiler Ambiguous Invocation Error - Anonymous Method and Method Group with Func<> or Action
C# Download All Files and Subdirectories Through Ftp
How to Make Something That Catches All 'Unhandled' Exceptions in a Winforms Application
Copy File(S) from One Project to Another Using Post Build Event...Vs2010
Start a .Net Process as a Different User
Xml Serialization - Hide Null Values
Mono Shared Library Under Linux Location
ASP.NET MVC Custom Error Handling Application_Error Global.Asax
Using Regex to Balance Match Parenthesis
How to Merge Multiple Assemblies into One
Parallel.Foreach and Async-Await
Ignoring a Class Property in Entity Framework 4.1 Code First