-
Notifications
You must be signed in to change notification settings - Fork 150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New Feature: Select Day of Week #839
base: develop
Are you sure you want to change the base?
Conversation
Sources/Policies/ADMX/WAU.admx
Outdated
@@ -420,5 +420,48 @@ | |||
<text id="WingetSourceCustom" valueName="WAU_WingetSourceCustom" /> | |||
</elements> | |||
</policy> | |||
<policy name="DayofWeek_Enable" class="Machine" displayName="$(string.DayofWeek_Name)" explainText="$(string.DayofWeek_Explain)" key="Software\Policies\Romanitho\Winget-AutoUpdate" presentation="$(presentation.DayofWeek)"> | |||
<parentCategory ref="WAU"/> | |||
<supportedOn ref="WAU:SUPPORTED_WAU_1_16_0"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
supported version shout be the next one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated to 1_16_5, is that correct?
$tasktriggers += New-ScheduledTaskTrigger -Weekly -At $WAUConfig.WAU_UpdatesAtTime -DaysOfWeek $WAUConfig.WAU_DayofWeek -WeeksInterval 2 | ||
} else { | ||
$tasktriggers += New-ScheduledTaskTrigger -Weekly -At $WAUConfig.WAU_UpdatesAtTime -DaysOfWeek 2 -WeeksInterval 2 | ||
} | ||
} | ||
elseif ($WAUConfig.WAU_UpdatesInterval -eq "Monthly") { | ||
$tasktriggers += New-ScheduledTaskTrigger -Weekly -At $WAUConfig.WAU_UpdatesAtTime -DaysOfWeek 2 -WeeksInterval 4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could it be also possible to choose the day for a "monthly" as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Anyway, for the monthly trigger, I need to review it to make it more accurate than just running every 4 weeks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I looked into it, and you can do it utilizing schtasks.exe, but i noticed anti malware software does not like that, so hopefully someone other than me can come up with a solution, as I would love to be able to choose what day of the month the updates run on.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated this to use the dayofweek in the monthy selection as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
Don't forget to increase the revisions of the files in the headers so that the files are actually imported correctly in AD! |
supported version of admx file.
@@ -420,5 +420,48 @@ | |||
<text id="WingetSourceCustom" valueName="WAU_WingetSourceCustom" /> | |||
</elements> | |||
</policy> | |||
<policy name="DayofWeek_Enable" class="Machine" displayName="$(string.DayofWeek_Name)" explainText="$(string.DayofWeek_Explain)" key="Software\Policies\Romanitho\Winget-AutoUpdate" presentation="$(presentation.DayofWeek)"> | |||
<parentCategory ref="WAU"/> | |||
<supportedOn ref="WAU:SUPPORTED_WAU_1_16_5"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the next WAU version should be here, @KnifMelti?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ADMX/ADML is a mess to handle.
The one proposed is already in the header of ADMX and introducing something new must be mirrored in those strings:
<supportedOn>
<definitions>
<definition name="SUPPORTED_WAU_1_16_0" displayName="$(string.SUPPORTED_WAU_1_16_0)" />
<definition name="SUPPORTED_WAU_1_16_5" displayName="$(string.SUPPORTED_WAU_1_16_5)" />
<definition name="SUPPORTED_WAU_EXPERIMENTAL"
displayName="$(string.SUPPORTED_WAU_EXPERIMENTAL)" />
</definitions>
</supportedOn>
<categories>
<category displayName="$(string.WAU)" name="WAU" />
<category name="Experimental" displayName="$(string.WAUEX)">
<parentCategory ref="WAU" />
</category>
</categories>
ADML(en-US):
<string id="WAU">Winget-AutoUpdate</string>
<string id="WAUEX">Experimental</string>
<string id="SUPPORTED_WAU_1_16_0">Winget-AutoUpdate version 1.16.0 or later</string>
<string id="SUPPORTED_WAU_1_16_5">Winget-AutoUpdate version 1.16.5 or later</string>
<string id="SUPPORTED_WAU_EXPERIMENTAL">Winget-AutoUpdate Experimental, subject to change, do
not use on PROD</string>
ADML(fr-FR):
<string id="WAU">Winget-AutoUpdate</string>
<string id="WAUEX">Expérimental</string>
<string id="SUPPORTED_WAU_1_16_0">Winget-AutoUpdate version 1.16.0 ou ultérieure</string>
<string id="SUPPORTED_WAU_1_16_5">Winget-AutoUpdate version 1.16.5 ou ultérieure</string>
<string id="SUPPORTED_WAU_EXPERIMENTAL">Winget-AutoUpdate Expérimental, sujet à changements,
ne pas utiliser en PROD</string>
And.. ..evrytime the files are ment to be imported into AD the revisions must be increased if there's been a change in them. |
If I may elaborate on this, I don't understand why there is a second WAU.adml (fr-FR) at all. It only complicates synchronization. I have not encountered anyone with a localized Domain Controller (DC) in their Active Directory; it is always en-US (when seeking help online, searching for GPO settings, troubleshooting, etc.). Who will translate the ADML files and keep them synchronized? |
I agree. It will be harder to maintain. Google Translate or ChatGPT can help administrators if necessary 😅 |
Proposed Changes
"Day of Week" feature. This allows you to specify the day of the week updates are run on using the Weekly or Bi-Weekly policy. If the Weekly or Bi-Weekly policy is selected, the policy script will check the DayofWeek registry value and update the schedule task appropriately. I also updated the ADMX and both English and French ADML files to allow for the new change.
Related Issues