How safe is this?

Sep 30, 2012 at 2:59pm
Hey I'm making a program that saves some files, so that it can read from them later. I made a directory in C:\Windows in which to save these files. Is it safe to just create a directory in the Windows folder like that?

Thanks
Sep 30, 2012 at 3:02pm
closed account (zb0S216C)
Yeah, it's fine. I have multiple folders & files within the Windows directory.

Wazzak
Sep 30, 2012 at 4:02pm
Ok thanks
Sep 30, 2012 at 4:53pm
I'd recommend against creating files/folders in the Windows directory. You run the risk of over writing system data or having your data over written by the system.
Sep 30, 2012 at 5:45pm
+1 @ naraku.

Nevermind the safety issue, users don't like it when programs dump files where they don't expect. When they want to uninstall your program, they expect it to be uninstalled. They don't want it to leave a dozen files in the Windows directory that they didn't even know were there.


Put your files in the same directory as the exe. Or in UserName/AppData/Local/YourProgramName/
Last edited on Sep 30, 2012 at 5:46pm
Sep 30, 2012 at 7:55pm
I've added a function into my program where users can install it, which deletes all of those files
Topic archived. No new replies allowed.