# Python Script To Lock Windows PC After 15 minutes

**URL:** <https://forum.xcitium.com/t/python-script-to-lock-windows-pc-after-15-minutes/17015>\
**Category:** Help & Support\
**Created:** [April 12, 2024, 7:36pm UTC](https://forum.xcitium.com/t/python-script-to-lock-windows-pc-after-15-minutes/17015 "2024-04-12T19:36:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![itplain](https://forum.xcitium.com/user_avatar/forum.xcitium.com/itplain/32/1025_2.png) [@itplain](https://forum.xcitium.com/u/itplain)\
**Post date:** [April 12, 2024, 7:36pm UTC](https://forum.xcitium.com/t/python-script-to-lock-windows-pc-after-15-minutes/17015/1 "2024-04-12T19:36:25Z")

</div>

Hi,  
Would anyone have a script to simply deploy a 15 minute inactivity screen lock for privacy purposes? Bonus would be if we can set it so the local user can’t change it which some users like to touch the settings.

Thanks!

---

<div class="post-metadata">

**Author:** ![nivedithab](https://forum.xcitium.com/user_avatar/forum.xcitium.com/nivedithab/32/883_2.png) [@nivedithab](https://forum.xcitium.com/u/nivedithab)\
**Post date:** [April 12, 2024, 8:34pm UTC](https://forum.xcitium.com/t/python-script-to-lock-windows-pc-after-15-minutes/17015/2 "2024-04-12T20:34:15Z")

</div>

hi @itplain

I have forwarded your query to concern team to into it and they shall get back to you.

thank you

---

<div class="post-metadata">

**Author:** ![nivedithab](https://forum.xcitium.com/user_avatar/forum.xcitium.com/nivedithab/32/883_2.png) [@nivedithab](https://forum.xcitium.com/u/nivedithab)\
**Post date:** [April 15, 2024, 8:22am UTC](https://forum.xcitium.com/t/python-script-to-lock-windows-pc-after-15-minutes/17015/3 "2024-04-15T08:22:42Z")

</div>

hi @itplain

could you please look into the below script

[https://scripts.itarian.com/frontend/web/topic/lock-the-workstation-if-it-is-inactive-for-more-than-threshold-time](https://scripts.itarian.com/frontend/web/topic/lock-the-workstation-if-it-is-inactive-for-more-than-threshold-time)
