As a developer, how should I use the special folders in Windows Vista (and Windows 7)?

后端 未结 5 695
野的像风
野的像风 2020-12-05 04:53

Where should I save data related to my application? Where should I save configuration files? Where should I save temporary files? Should I do it in \"Documents\"? \"AppData\

5条回答
  •  春和景丽
    2020-12-05 05:35

    In general, Windows best practices are to follow the appropriate environment variables. Configuration data that you want to stick around should go in %APPDATA%, and temporary files should go in %TEMP%.

    This has the advantage of not breaking horribly if Windows changes things, and respecting strange configurations people may have.

    Also, I agree with other answers that "Documents" should only be for user-created data and only after a prompt.

提交回复
热议问题