{"id":51933,"date":"2023-05-27T10:34:34","date_gmt":"2023-05-27T09:34:34","guid":{"rendered":"https:\/\/ekiwi-blog.de\/51933\/prevent-automatic-logout-in-windows-10\/"},"modified":"2023-05-27T10:35:33","modified_gmt":"2023-05-27T09:35:33","slug":"prevent-automatic-logout-in-windows-10","status":"publish","type":"post","link":"https:\/\/ekiwi-blog.de\/en\/51933\/prevent-automatic-logout-in-windows-10\/","title":{"rendered":"Prevent automatic logout in Windows 10"},"content":{"rendered":"<p>How do I prevent an automatic screen lock in Windows 10, which is set by policy?<\/p>\n<p><!--more--><\/p>\n<p><iframe loading=\"lazy\" src=\"https:\/\/www.youtube.com\/embed\/jnVRe8gm1M4\" width=\"560\" height=\"315\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n<p>Many companies use special policies for their company PCs which, for example, also automatically lock the computer after a set time if the computer is not being used. This can sometimes be annoying and the setting is locked for the user.<\/p>\n<p>We show two ways to stop the computer from being locked automatically.<\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of content<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/ekiwi-blog.de\/en\/51933\/prevent-automatic-logout-in-windows-10\/#Media_Player\" >Media Player<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/ekiwi-blog.de\/en\/51933\/prevent-automatic-logout-in-windows-10\/#VBS_script\" >VBS script<\/a><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"Media_Player\"><\/span>Media Player<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>The computer is not automatically locked when you play media. You can use Windows Media Player to open a video or audio file, activate endless playback and set the sound to 0.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-7061\" src=\"https:\/\/ekiwi-blog.de\/wp-content\/uploads\/2020\/07\/sperre_1.jpg\" alt=\"\" width=\"605\" height=\"320\" srcset=\"https:\/\/ekiwi-blog.de\/wp-content\/uploads\/2020\/07\/sperre_1.jpg 605w, https:\/\/ekiwi-blog.de\/wp-content\/uploads\/2020\/07\/sperre_1-300x159.jpg 300w\" sizes=\"auto, (max-width: 605px) 100vw, 605px\" \/><\/p>\n<p>Then simply let the video\/audio run in the background. The computer no longer locks up<\/p>\n<h2><span class=\"ez-toc-section\" id=\"VBS_script\"><\/span>VBS script<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>A second possibility is to use a Visual Basic script. This does not always have to work, as the execution of such scripts can also be disabled for security reasons.<\/p>\n<p>Here is an example script:<\/p>\n<pre>Dim objResult\r\nSet objShell = WScript.CreateObject(\"WScript.Shell\")\r\nDo While True\r\n  objResult = objShell.sendkeys(\"{NUMLOCK}{NUMLOCK}\")\r\n  Wscript.Sleep (20000)\r\nLoop\r\n<\/pre>\n<p>This script is saved with a text editor as a text file with the extension .vbs.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-7062\" src=\"https:\/\/ekiwi-blog.de\/wp-content\/uploads\/2020\/07\/sperre_2.jpg\" alt=\"\" width=\"620\" height=\"318\" srcset=\"https:\/\/ekiwi-blog.de\/wp-content\/uploads\/2020\/07\/sperre_2.jpg 620w, https:\/\/ekiwi-blog.de\/wp-content\/uploads\/2020\/07\/sperre_2-300x154.jpg 300w\" sizes=\"auto, (max-width: 620px) 100vw, 620px\" \/><\/p>\n<p>Then we start the file. The script is now <a href=\"https:\/\/ekiwi-blog.de\/en\/62776\/activate-num-key-numlock-permanently\/\" title=\"Activate Num key (NumLock) permanently\">activated in the background and press the Num-Lock key<\/a> twice every 20 seconds.<\/p>\n<p>This simulates a regular keystroke. To end the script, restart the computer or end the &#8220;wsscript&#8221; task via the task manager.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-7063\" src=\"https:\/\/ekiwi-blog.de\/wp-content\/uploads\/2020\/07\/sperre_3.png\" alt=\"\" width=\"546\" height=\"546\" srcset=\"https:\/\/ekiwi-blog.de\/wp-content\/uploads\/2020\/07\/sperre_3.png 546w, https:\/\/ekiwi-blog.de\/wp-content\/uploads\/2020\/07\/sperre_3-300x300.png 300w, https:\/\/ekiwi-blog.de\/wp-content\/uploads\/2020\/07\/sperre_3-150x150.png 150w\" sizes=\"auto, (max-width: 546px) 100vw, 546px\" \/><\/p>\n<p>Both tips are to be used at your own risk. \ud83d\ude42<\/p>\n\n<div class=\"aawp\">\n\n            \n            \n<div class=\"aawp-product aawp-product--horizontal aawp-product--bestseller aawp-product--ribbon\"  data-aawp-product-asin=\"1119049326\" data-aawp-product-id=\"109919\" data-aawp-tracking-id=\"ekiwide0b-21\" data-aawp-product-title=\"Windows 10 for Dummies Book\">\n\n    <span class=\"aawp-product__ribbon aawp-product__ribbon--bestseller\">Bestseller No. 1<\/span>\n    <div class=\"aawp-product__thumb\">\n        <a class=\"aawp-product__image-link\"\n           href=\"https:\/\/www.amazon.de\/dp\/1119049326?tag=ekiwide0b-21&linkCode=ogi&th=1&psc=1&keywords=windows%2010%20book\" title=\"Windows 10 for Dummies Book\" rel=\"nofollow noopener sponsored\" target=\"_blank\">\n            <img decoding=\"async\" class=\"aawp-product__image\" src=\"https:\/\/m.media-amazon.com\/images\/I\/51JNBwAAlbL._SL160_.jpg\" alt=\"Windows 10 for Dummies Book\"  \/>\n        <\/a>\n\n            <\/div>\n\n    <div class=\"aawp-product__content\">\n        <a class=\"aawp-product__title\" href=\"https:\/\/www.amazon.de\/dp\/1119049326?tag=ekiwide0b-21&linkCode=ogi&th=1&psc=1&keywords=windows%2010%20book\" title=\"Windows 10 for Dummies Book\" rel=\"nofollow noopener sponsored\" target=\"_blank\">\n            Windows 10 for Dummies Book        <\/a>\n        <div class=\"aawp-product__description\">\n                    <\/div>\n    <\/div>\n\n    <div class=\"aawp-product__footer\">\n\n        <div class=\"aawp-product__pricing\">\n            \n                            <span class=\"aawp-product__price aawp-product__price--current\">48,50 EUR<\/span>\n            \n                    <\/div>\n\n                <a class=\"aawp-button aawp-button--buy aawp-button--icon aawp-button--icon-black\" href=\"https:\/\/www.amazon.de\/dp\/1119049326?tag=ekiwide0b-21&#038;linkCode=ogi&#038;th=1&#038;psc=1&#038;keywords=windows%2010%20book\" title=\"Buy on Amazon\" target=\"_blank\" rel=\"nofollow noopener sponsored\">Buy on Amazon<\/a>\n            <\/div>\n\n<\/div>\n\n            \n            \n<div class=\"aawp-product aawp-product--horizontal aawp-product--bestseller aawp-product--ribbon\"  data-aawp-product-asin=\"152382459X\" data-aawp-product-id=\"109920\" data-aawp-tracking-id=\"ekiwide0b-21\" data-aawp-product-title=\"Windows 10  Bootcamp Learn the Basics of Windows 10 in 2 Weeks! FREE Bonus Wind  FREE Books Windows 10 Books\">\n\n    <span class=\"aawp-product__ribbon aawp-product__ribbon--bestseller\">Bestseller No. 2<\/span>\n    <div class=\"aawp-product__thumb\">\n        <a class=\"aawp-product__image-link\"\n           href=\"https:\/\/www.amazon.de\/dp\/152382459X?tag=ekiwide0b-21&linkCode=ogi&th=1&psc=1&keywords=windows%2010%20book\" title=\"Windows 10: Bootcamp Learn the Basics of Windows 10 in 2 Weeks! FREE Bonus, Wind (FREE Books...\" rel=\"nofollow noopener sponsored\" target=\"_blank\">\n            <img decoding=\"async\" class=\"aawp-product__image\" src=\"https:\/\/m.media-amazon.com\/images\/I\/31C3ePuihQL._SL160_.jpg\" alt=\"Windows 10: Bootcamp Learn the Basics of Windows 10 in 2 Weeks! FREE Bonus, Wind (FREE Books...\"  \/>\n        <\/a>\n\n            <\/div>\n\n    <div class=\"aawp-product__content\">\n        <a class=\"aawp-product__title\" href=\"https:\/\/www.amazon.de\/dp\/152382459X?tag=ekiwide0b-21&linkCode=ogi&th=1&psc=1&keywords=windows%2010%20book\" title=\"Windows 10: Bootcamp Learn the Basics of Windows 10 in 2 Weeks! FREE Bonus, Wind (FREE Books...\" rel=\"nofollow noopener sponsored\" target=\"_blank\">\n            Windows 10: Bootcamp Learn the Basics of Windows 10 in 2 Weeks! FREE Bonus, Wind (FREE Books...        <\/a>\n        <div class=\"aawp-product__description\">\n                    <\/div>\n    <\/div>\n\n    <div class=\"aawp-product__footer\">\n\n        <div class=\"aawp-product__pricing\">\n            \n                            <span class=\"aawp-product__price aawp-product__price--current\">11,76 EUR<\/span>\n            \n            <a href=\"https:\/\/www.amazon.de\/gp\/prime\/?tag=ekiwide0b-21\" title=\"Amazon Prime\" rel=\"nofollow noopener sponsored\" target=\"_blank\" class=\"aawp-check-prime\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ekiwi-blog.de\/wp-content\/plugins\/aawp\/assets\/img\/icon-check-prime.svg\" height=\"16\" width=\"55\" alt=\"Amazon Prime\" \/><\/a>        <\/div>\n\n                <a class=\"aawp-button aawp-button--buy aawp-button--icon aawp-button--icon-black\" href=\"https:\/\/www.amazon.de\/dp\/152382459X?tag=ekiwide0b-21&#038;linkCode=ogi&#038;th=1&#038;psc=1&#038;keywords=windows%2010%20book\" title=\"Buy on Amazon\" target=\"_blank\" rel=\"nofollow noopener sponsored\">Buy on Amazon<\/a>\n            <\/div>\n\n<\/div>\n\n    \n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>How do I prevent an automatic screen lock in Windows 10, which is set by policy?<\/p>\n","protected":false},"author":1,"featured_media":4560,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1555],"tags":[2753,2000,2068],"class_list":["post-51933","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-software-en","tag-instruction","tag-video-en","tag-windows-en-2"],"_links":{"self":[{"href":"https:\/\/ekiwi-blog.de\/en\/wp-json\/wp\/v2\/posts\/51933","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ekiwi-blog.de\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ekiwi-blog.de\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ekiwi-blog.de\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ekiwi-blog.de\/en\/wp-json\/wp\/v2\/comments?post=51933"}],"version-history":[{"count":0,"href":"https:\/\/ekiwi-blog.de\/en\/wp-json\/wp\/v2\/posts\/51933\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ekiwi-blog.de\/en\/wp-json\/wp\/v2\/media\/4560"}],"wp:attachment":[{"href":"https:\/\/ekiwi-blog.de\/en\/wp-json\/wp\/v2\/media?parent=51933"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ekiwi-blog.de\/en\/wp-json\/wp\/v2\/categories?post=51933"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ekiwi-blog.de\/en\/wp-json\/wp\/v2\/tags?post=51933"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}