imabdk / Toast-Notification-Script

My Windows Toast Notification Script explained in details here: https://imab.dk/windows-10-toast-notification-script/

Home Page:https://imab.dk

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature request "vanilla config"

mr-crux opened this issue · comments

I don’t know how to summarize this feature shortly, so I'll try to describe it the way I see it.

What I was thinking when I saw the full config used to run only one feature: is it possible to store all config options in a false state as "vanilla config" and pass to the script a config with specific feature (pass check, reboot etc.) configuration options?

For example:
vanilla_config.xml

<Feature Name="Toast" Enabled="false" />
<Feature Name="PendingRebootUptime" Enabled="False" />
<Feature Name="PendingRebootCheck" Enabled="False" />
<Feature Name="UpgradeOS" Enabled="False" />
<Option Name="Scenario" Type="reminder" />
<Option ..... Enabled="False">
....
<en-US>
...
</en-US>
....

PendingRebootUptime.xml

<Feature Name="Toast" Enabled="true" />
<Feature Name="PendingRebootUptime" Enabled="True" />
<Option Name="PendingRebootUptimeText" Enabled="True" />
<Option Name="MaxUptimeDays"           Value="-6" />
<Option Name="Scenario"                    Type="reminder" />
<Option Name="CreateScriptsAndProtocols"   Enabled="True" /> 
<Option Name="LimitToastToRunEveryMinutes" Enabled="True" Value="1" />
<Option Name="UseSoftwareCenterApp"        Enabled="False" />
<Option Name="UsePowershellApp"            Enabled="True" />
<Option Name="CustomAudio"   Enabled="False" />
<Option Name="LogoImageName" Value="ToastLogoImageDefault.jpg" />
<Option Name="HeroImageName" Value="ToastHeroImageDefault.jpg" />
...

So, when launching toast.ps1 with PendingRebootUptime.xml config, it would first read “vanilla config” and then would "replace" necessary values from PendingRebootUptime.xml.
In this case a specific action config would contain only params that are essential for that action.

I found out that it is possible to have only one necessary feature and its options in a config (and remove others) and it works.
I was misled by the list of all the settings in the config that performs only one function.