Skip to content

Commit

Permalink
Fixes ADMX issue importing to intune
Browse files Browse the repository at this point in the history
  • Loading branch information
ryannewington committed Oct 16, 2023
1 parent a99ccb6 commit 7e02f61
Show file tree
Hide file tree
Showing 2 changed files with 126 additions and 109 deletions.
Original file line number Diff line number Diff line change
@@ -1,42 +1,44 @@
<policyDefinitionResources revision="1.0" schemaVersion="1.0">
<displayName>
</displayName>
<description>
</description>
<resources>
<stringTable>
<string id="cat_idle_logoff">IdleLogoff</string>
<string id="pol_enable_idle_logoff">Log off inactive users</string>
<string id="pol_show_warning_message">Show a warning message before logging off</string>
<string id="pol_show_warning_message_help">Shows a pop up notification informing the user of the time remaining before they are logged off.
<?xml version="1.0" encoding="utf-8"?>
<policyDefinitionResources
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
revision="1.0"
schemaVersion="1.0"
xmlns="http://www.microsoft.com/GroupPolicy/PolicyDefinitions">

<displayName>
</displayName>
<description>
</description>
<resources>
<stringTable>
<string id="cat_idle_logoff">IdleLogoff</string>
<string id="pol_enable_idle_logoff">Log off inactive users</string>
<string id="pol_enable_idle_logoff_help">Enables the agent to log off inactive users</string>
<string id="pol_show_warning_message">Show a warning message before logging off</string>
<string id="pol_show_warning_message_help">Shows a pop up notification informing the user of the time remaining before they are logged off.

You can optionally provide a custom message to show the user. Use {0} as a placeholder for the remaining time until logoff.
</string>
<string id="string_logoff">Log off</string>
<string id="string_reboot">Reboot</string>
<string id="string_shutdown">Shutdown</string>
<string id="SUPPORTED_WindowsVISTA">At least Microsoft Windows</string>
<string id="TS_SUPPORTED_WindowsXP">At least Microsoft Windows XP</string>
</stringTable>
<presentationTable>
<presentation id="pol_show_warning_message">
<decimalTextBox refId="txt_warning_period" defaultValue="0">Duration of warning message (seconds)</decimalTextBox>
<textBox refId="txt_warning_message">
<label>Warning message text</label>
<defaultValue>Your session has been idle for too long, and you will be logged out in {0}</defaultValue>
</textBox>
</presentation>
<presentation id="pol_enable_idle_logoff">
<decimalTextBox refId="txt_idle_limit" defaultValue="60">Idle timeout (minutes)</decimalTextBox>
<checkBox refId="ck_ignore_display_requested" defaultChecked="false">Ignore sleep prevention requests from applications such as media playback</checkBox>
<checkBox refId="ck_wait_for_input" defaultChecked="false">Wait for initial user interaction before starting idle timer (kiosk mode)</checkBox>
<dropdownList refId="dd_idle_action" defaultItem ="0">Action</dropdownList>
</presentation>
</presentationTable>
</resources>
</string>
<string id="string_logoff">Log off</string>
<string id="string_reboot">Reboot</string>
<string id="string_shutdown">Shutdown</string>
<string id="TS_SUPPORTED_WindowsXP">At least Microsoft Windows XP</string>
</stringTable>
<presentationTable>
<presentation id="pol_show_warning_message">
<decimalTextBox refId="txt_warning_period" defaultValue="0">Duration of warning message (seconds)</decimalTextBox>
<textBox refId="txt_warning_message">
<label>Warning message text</label>
<defaultValue>Your session has been idle for too long, and you will be logged out in {0}</defaultValue>
</textBox>
</presentation>
<presentation id="pol_enable_idle_logoff">
<decimalTextBox refId="txt_idle_limit" defaultValue="60">Idle timeout (minutes)</decimalTextBox>
<checkBox refId="ck_ignore_display_requested" defaultChecked="false">Ignore sleep prevention requests from applications such as media playback</checkBox>
<checkBox refId="ck_wait_for_input" defaultChecked="false">Wait for initial user interaction before starting idle timer (kiosk mode)</checkBox>
<dropdownList refId="dd_idle_action" defaultItem ="0">Action</dropdownList>
</presentation>
</presentationTable>
</resources>
</policyDefinitionResources>

<!--
txt_warning_period
DXT_8ab92f9f21e642dd9c343c1f185c8b4b
-->
155 changes: 85 additions & 70 deletions src/Lithnet.IdleLogoff/PolicyDefinitions/lithnet.idlelogoff.admx
Original file line number Diff line number Diff line change
@@ -1,73 +1,88 @@
<policyDefinitions revision="1.0" schemaVersion="1.0">
<policyNamespaces>
<target prefix="LithnetIdleLogoff" namespace="Lithnet.IdleLogoff" />
<using prefix="windows" namespace="Microsoft.Policies.Windows" />
<using prefix="lithnet" namespace="Lithnet" />
</policyNamespaces>
<supersededAdm fileName="" />
<resources minRequiredRevision="1.0" />
<supportedOn>
<definitions>
<definition name="SUPPORTED_WindowsVISTA" displayName="$(string.SUPPORTED_WindowsVISTA)" />
<definition name="TS_SUPPORTED_WindowsXP" displayName="$(string.TS_SUPPORTED_WindowsXP)" />
</definitions>
</supportedOn>
<categories>
<category name="cat_idle_logoff" displayName="$(string.cat_idle_logoff)">
<parentCategory ref="lithnet:CAT_300017F2_090D_4E59_A535_01350C2E0428" />
</category>
</categories>
<policies>
<?xml version="1.0" encoding="utf-8"?>
<policyDefinitions
xmlns="http://www.microsoft.com/GroupPolicy/PolicyDefinitions"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
revision="1.0"
schemaVersion="1.0">
<policyNamespaces>
<target prefix="LithnetIdleLogoff" namespace="Lithnet.IdleLogoff" />
<using prefix="lithnet" namespace="Lithnet" />
</policyNamespaces>
<supersededAdm fileName="" />
<resources minRequiredRevision="1.0" />
<supportedOn>
<definitions>
<definition name="TS_SUPPORTED_WindowsXP" displayName="$(string.TS_SUPPORTED_WindowsXP)" />
</definitions>
</supportedOn>
<categories>
<category name="cat_idle_logoff" displayName="$(string.cat_idle_logoff)">
<parentCategory ref="lithnet:CAT_300017F2_090D_4E59_A535_01350C2E0428" />
</category>
</categories>
<policies>

<policy name="pol_show_warning_message"
class="Both"
displayName="$(string.pol_show_warning_message)"
presentation="$(presentation.pol_show_warning_message)"
key="Software\Policies\Lithnet\IdleLogoff"
valueName="WarningEnabled"
explainText="$(string.pol_show_warning_message_help)">
<parentCategory ref="cat_idle_logoff" />
<supportedOn ref="TS_SUPPORTED_WindowsXP" />
<elements>
<decimal id="txt_warning_period" key="Software\Policies\Lithnet\IdleLogoff" valueName="WarningPeriod" minValue="10" />
<text id="txt_warning_message" key="Software\Policies\Lithnet\IdleLogoff" valueName="WarningMessage" required="false"/>
</elements>
</policy>

<policy name="pol_show_warning_message" class="Both" displayName="$(string.pol_show_warning_message)" presentation="$(presentation.pol_show_warning_message)" key="Software\Policies\Lithnet\IdleLogoff" valueName="WarningEnabled" explainText="$(string.pol_show_warning_message_help)">
<parentCategory ref="cat_idle_logoff" />
<supportedOn ref="TS_SUPPORTED_WindowsXP" />
<elements>
<decimal id="txt_warning_period" key="Software\Policies\Lithnet\IdleLogoff" valueName="WarningPeriod" minValue="10" />
<text id="txt_warning_message" key="Software\Policies\Lithnet\IdleLogoff" valueName="WarningMessage" required="false"/>
</elements>
</policy>

<policy name="pol_enable_idle_logoff" class="Both" displayName="$(string.pol_enable_idle_logoff)" presentation="$(presentation.pol_enable_idle_logoff)" key="Software\Policies\Lithnet\IdleLogoff" valueName="Enabled">
<parentCategory ref="cat_idle_logoff" />
<supportedOn ref="TS_SUPPORTED_WindowsXP" />
<elements>
<decimal id="txt_idle_limit" key="Software\Policies\Lithnet\IdleLogoff" valueName="IdleLimit" minValue="1" />
<boolean id="ck_ignore_display_requested" key="Software\Policies\Lithnet\IdleLogoff" valueName="IgnoreDisplayRequested">
<trueValue>
<decimal value="1" />
</trueValue>
<falseValue>
<decimal value="0" />
</falseValue>
</boolean>
<boolean id="ck_wait_for_input" key="Software\Policies\Lithnet\IdleLogoff" valueName="WaitForInitialInput">
<trueValue>
<decimal value="1" />
</trueValue>
<falseValue>
<decimal value="0" />
</falseValue>
</boolean>
<enum id="dd_idle_action" key="Software\Policies\Lithnet\IdleLogoff" valueName="Action">
<item displayName="$(string.string_logoff)">
<value>
<decimal value="0" />
</value>
</item>
<item displayName="$(string.string_reboot)">
<value>
<decimal value="1" />
</value>
</item>
<item displayName="$(string.string_shutdown)">
<value>
<decimal value="2" />
</value>
</item>
</enum>
</elements>
</policy>
</policies>
<policy name="pol_enable_idle_logoff"
class="Both"
displayName="$(string.pol_enable_idle_logoff)"
presentation="$(presentation.pol_enable_idle_logoff)"
key="Software\Policies\Lithnet\IdleLogoff"
valueName="Enabled"
explainText="$(string.pol_enable_idle_logoff_help)">
<parentCategory ref="cat_idle_logoff" />
<supportedOn ref="TS_SUPPORTED_WindowsXP" />
<elements>
<decimal id="txt_idle_limit" key="Software\Policies\Lithnet\IdleLogoff" valueName="IdleLimit" minValue="1" />
<boolean id="ck_ignore_display_requested" key="Software\Policies\Lithnet\IdleLogoff" valueName="IgnoreDisplayRequested">
<trueValue>
<decimal value="1" />
</trueValue>
<falseValue>
<decimal value="0" />
</falseValue>
</boolean>
<boolean id="ck_wait_for_input" key="Software\Policies\Lithnet\IdleLogoff" valueName="WaitForInitialInput">
<trueValue>
<decimal value="1" />
</trueValue>
<falseValue>
<decimal value="0" />
</falseValue>
</boolean>
<enum id="dd_idle_action" key="Software\Policies\Lithnet\IdleLogoff" valueName="Action">
<item displayName="$(string.string_logoff)">
<value>
<decimal value="0" />
</value>
</item>
<item displayName="$(string.string_reboot)">
<value>
<decimal value="1" />
</value>
</item>
<item displayName="$(string.string_shutdown)">
<value>
<decimal value="2" />
</value>
</item>
</enum>
</elements>
</policy>
</policies>
</policyDefinitions>

0 comments on commit 7e02f61

Please sign in to comment.