reset Preferences CFG file

This read-only archive contains discussions from the Adding Feature forum.
New feature request may be posted to the Adding Feature forum.
Technical support is available via the Help forum.
Locked
Edgar
Forum Crew
Posts: 2043
Joined: Thu Sep 03, 2009 9:13 pm
Operating System: Windows 10

reset Preferences CFG file

Post by Edgar » Sat Feb 04, 2012 6:47 pm

Forum elves often need to have users reset their Preferences configuration (audacity.cfg) file. Doing so is often difficult (explaining "how to" as well as actually doing it) and there has been a call for a method of resetting this file from within Audacity. Here is a solution:
resetPrefs2.patch
(6.13 KiB) Downloaded 376 times
it looks like:
resetCFG.png
resetCFG.png (43.69 KiB) Viewed 5627 times
(note--the "Save" and "Load" buttons are currently NOP as the current design only calls for "Reset" but I often see users asking to be able to backup/save/load Prefs)
-Edgar
running Audacity personally customized 2.0.6 daily in a professional audio studio
occasionally using current Audacity alpha for testing and support situations
64-bit Windows Pro 10

kozikowski
Forum Staff
Posts: 69357
Joined: Thu Aug 02, 2007 5:57 pm
Operating System: macOS 10.13 High Sierra

Re: reset Preferences CFG file

Post by kozikowski » Sat Feb 04, 2012 7:43 pm

Certainly. Save it before you Reset it against the time you blow the old one away and you can't remember how you set up your system -- and there's something critical missing.

Are you proposing a Universal config reset -- including that Windows Registry thing? I can hear Gale objecting to a partial solution.

Koz

Edgar
Forum Crew
Posts: 2043
Joined: Thu Sep 03, 2009 9:13 pm
Operating System: Windows 10

Re: reset Preferences CFG file

Post by Edgar » Sat Feb 04, 2012 8:30 pm

kozikowski wrote:
Edgar wrote: I often see users asking to be able to backup/save/load Prefs
Certainly. Save it before you Reset it against the time you blow the old one away and you can't remember how you set up your system -- and there's something critical missing.
If the buttons were "Backup" & "Restore" (not "Save" & ""Load")--i.e. only one level of storage, the code would be easy. Just copy audacity.cfg as audacity.cfg.bak for "Backup" (overwriting any existing--maybe with back-out warning or some incremental naming scheme--but incremental is getting too complicated). "Restore" would reverse that, deleting the old .bak file (doing nothing if audacity.cfg.bak was missing--maybe with warning) although the button itself could be disabled if the .bak file did not exist.
kozikowski wrote: Are you proposing a Universal config reset -- including that Windows Registry thing? I can hear Gale objecting to a partial solution.
As originally designed it was only to set audacity.cfg to the single line "NewPrefsInitialized=1" which, AFAIK, forces Audacity to ignore any Registry setting. To change the Registry one could write a REG script (a file of textual instructions with a .reg extension) which can be executed by double-click or via the CLI. Since 1.2.6 wrote the Registry entries, one might examine that code to see where said entries were written and use that information to add a function to current Audacity which would comb through the Registry removing them as needed. I could do either the REG script or add a function to Audacity to do the job but since I think it a moot point I am not to thrilled about spending the programming time doing so.
-Edgar
running Audacity personally customized 2.0.6 daily in a professional audio studio
occasionally using current Audacity alpha for testing and support situations
64-bit Windows Pro 10

Edgar
Forum Crew
Posts: 2043
Joined: Thu Sep 03, 2009 9:13 pm
Operating System: Windows 10

Re: reset Preferences CFG file

Post by Edgar » Tue Feb 07, 2012 9:42 am

resetPrefs3 now does incremental backup of the current Prefs CFG file before initializing. You will have files with names like:
audacityCFG7Feb2012_01_36_46.bak
with the part:
7Feb2012_01_36_46
being:
day-of-the-month_month_year_hour_minute_second
which should give us sufficient granularity.

Save & Load are not yet implemented but should be fairly easy. I might end up changing the extension to:
.CFGbak
so it is easy to filter for .cfg & .CFGbak in the Save & Load file dialogs.
Attachments
resetPrefs3.patch
(8.05 KiB) Downloaded 181 times
-Edgar
running Audacity personally customized 2.0.6 daily in a professional audio studio
occasionally using current Audacity alpha for testing and support situations
64-bit Windows Pro 10

steve
Site Admin
Posts: 81609
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: reset Preferences CFG file

Post by steve » Tue Feb 07, 2012 2:00 pm

A standalone "Audacity 1.2.x registry restore.reg" utility could be useful for anyone wanting to fully and permanently nuke Audacity 1.2.x from their system.
It looks like it would probably be fairly simple too: http://support.microsoft.com/kb/310516
(though "tampering" with the Windows Registry is not without risk).

This may be a preferable "reset" for 1.2.x than the current "Audacity 1.2.6 reset Preferences .reg file for Windows" http://wiki.audacityteam.org/wiki/Audac ... o_defaults
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

waxcylinder
Forum Staff
Posts: 14684
Joined: Tue Jul 31, 2007 11:03 am
Operating System: Windows 10

Re: reset Preferences CFG file

Post by waxcylinder » Tue Feb 07, 2012 2:13 pm

Gale already has a 1.2 reset at the bottom of this page on his website: http://www.gaclrecords.org.uk/audacity.html

WC
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * FAQ * * * * * Tutorials * * * * * Audacity Manual * * * * *

steve
Site Admin
Posts: 81609
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: reset Preferences CFG file

Post by steve » Tue Feb 07, 2012 2:32 pm

I like the simplicity of just one "Reset" button, and the simplicity of just "updating" the audacity.cfg with "NewPrefsInitialized=1".
(this does stop Audacity on Windows from inheriting settings from the registry).


Suggested alternative wording for the "are you sure" screen:
Reseting Audacity's Preferences cannot be undone!
It might be wise to make a backup copy first.

Resetting Audacity will also clear the Recent File list
and force Audacity to immediately shut down.

Select "Yes" to reset Audacity to factory defaults
and AUTOMATICALLY SHUT DOWN Audacity.

Select "No" if you do not wish to proceed.

Do you really want to reset Audacity?
.............[ No ]..[ Yes ]
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

steve
Site Admin
Posts: 81609
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: reset Preferences CFG file

Post by steve » Tue Feb 07, 2012 2:44 pm

Edgar wrote:resetPrefs3 now does incremental backup of the current Prefs CFG file before initializing.
I think that if we want to go down this road, we really need a full "Preferences Manager" (something along the lines of the "Equalization Preset Manager").
I'm not sure that we need to go down this route at all. I'd be happy with a simple Reset button as a kind of "Get out of Jail Free Card".
On the other hand, there is some demand for being able to manage Preferences: http://forum.audacityteam.org/viewtopic ... 16&t=63358
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Edgar
Forum Crew
Posts: 2043
Joined: Thu Sep 03, 2009 9:13 pm
Operating System: Windows 10

Re: reset Preferences CFG file

Post by Edgar » Tue Feb 07, 2012 5:18 pm

steve wrote: Resetting Audacity will also clear the Recent File list
I had to work really hard to figure out how to clear Recent Files and it ends up really simple to keep the Recent File list along with "NewPrefsInitialized=1". Saving it could be a checkbox...
cbox.png
cbox.png (3.03 KiB) Viewed 5602 times
...but we are getting close to needing:
bgravato wrote: About the location of the button... there could be another section/tab in Preferences that would say "Reset" or "Factory Defaults" and when the user selects that it would show a small description of what it does and would have the Reset button there following a text saying something like "If you want to reset preferences to factory defaults press this button".
-Edgar
running Audacity personally customized 2.0.6 daily in a professional audio studio
occasionally using current Audacity alpha for testing and support situations
64-bit Windows Pro 10

waxcylinder
Forum Staff
Posts: 14684
Joined: Tue Jul 31, 2007 11:03 am
Operating System: Windows 10

Re: reset Preferences CFG file

Post by waxcylinder » Thu Mar 01, 2012 8:25 pm

There is already a formal proposal on the Wiki which BillW kicked off in spring last year - see: http://wiki.audacityteam.org/wiki/Propo ... _cfg_Reset

Peter.
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * FAQ * * * * * Tutorials * * * * * Audacity Manual * * * * *

Locked