Techncially yes, but practically no.
When Vista was introduced, programs stopped being given write access to the default install locations (think Program Files). Config and save files were expected to be either online, or stored in one or more locations:
- AppData (local and roaming)
- Registry (although, not so much these days)
Note that if you try to save files in Program Files, it will most likely end up in the “VirtualStore” folder, which is inside AppData and leave the original file unchanged.
The user would have to manually provide full control of the installation in order for it to change itself, or run the program as Administrator, or run your program entirely in one of the above mentioned folders.
You could have two executables and use a launcher to decide which one to run. You’d have to relaunch the game to get it to change mid-session.