-
July 10th, 2019, 04:14 AM
#1
How to stop Windows from auto-saving to AppData
Hi everyone,
I have an application that for some reason lets Windows automatically store a backup file to C:\Users\Username\AppData\Local
This happens every 5 minutes or so.
Now, in principle this shouldn't be a problem, but in rare cases memory use for this application can be something around 10GB.
In this case the program will freeze for about 30 seconds every 5 minutes to perform the save.
I'm not sure why these auto-saves are being performed, because from what I can tell, none of my other applications seem to do this.
The application is written in C++ in Visual Studio 2017.
Is there some setting that prompts these saves, or some other way or preventing them?
Thank you in advance.
-
July 10th, 2019, 06:44 AM
#2
Re: How to stop Windows from auto-saving to AppData
I would assume that the Application itself is doing the save. It would be the only app that has a vested interest in protecting you.
-
July 10th, 2019, 12:10 PM
#3
Re: How to stop Windows from auto-saving to AppData
Ok, I think that I figured it out.
It appears that these files are created by Windows Restart Manager.
This is because in CMyProgrammApp::CMyProgrammApp() the following flag is set:
m_dwRestartManagerSupportFlags = AFX_RESTART_MANAGER_SUPPORT_ALL_ASPECTS;
By changing this to
m_dwRestartManagerSupportFlags = AFX_RESTART_MANAGER_SUPPORT_NO_AUTOSAVE;
the auto-saving appears to now have stopped.
I've had to manually make this change.
I can't find anything under Tools or "Project->MyProject Properties".
If anyone knows where this is located in the menu for Visual Studio then please let me know.
-
July 11th, 2019, 02:27 AM
#4
Re: How to stop Windows from auto-saving to AppData
All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!
C++23 Compiler: Microsoft VS2022 (17.6.5)
-
July 11th, 2019, 03:07 AM
#5
Re: How to stop Windows from auto-saving to AppData
Originally Posted by rmirani
If anyone knows where this is located in the menu for Visual Studio then please let me know.
It seems Restart Manager support in MFC is selected in the application wizard.
https://mariusbancila.ro/blog/2009/0...anager-in-mfc/
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|