Managed code can get user-specific folder paths with system.environment.getfolderpath. You just need to specify the folderpath to be returned by passing the desired system.environment.specialfolder
C# Console Delete Directory With any username
Nico Verdetto
1
Reputation point
Ok so basically I am making a spoofer to unban you from FiveM and its going good and it works but not everyone is gonna have my username on my desktop so for example if its C:/Users/nicov/ and theres is C:/Users/richard/ it wont delete the folder for them because our usernames are different so is there a way I can bypass that and make it so it deletes the file for every username like a code like this C:/Users/$[USERNAME]/Appdata/ cause I really need a fix to this FAST!!!