Is there any way to "reset" all setup settings in Inno Setup into their default values?
I want to add Reset options
button into my setup, and clicking that button would set all the options to the same value as if the user never changed anything, but was clicking just Next
, Next
, Install
.
But please note that those values ale slightly different than compile-time default values
, as for example AppDir
can default to DefaultDirName
or wizardForm.PrevAppDir
. So I want all the options to default to dynamic defaults
, which for AppDir
is:
if wizardForm.PrevAppDir <> '' then
result := wizardForm.PrevAppDir
else
result := '{#SetupSetting("DefaultDirName")}';
I hope you understand what I want to accomplish. If the application is already installed, then set all options to the last-installation values, if the app is not installed, then set them to default values.
I know the setup does all of this at it's startup, but I want to add a button, which would revert all the changes user made (eg. in wpSelectComponents
) to their setup-startup defaults. How can I do that?