How to Play a Sound When Locking Your Computer in Windows Windows doesn't always give clear feedback when your PC locks, especially if it happens automatically. You can make sure it's locked by playing a custom sound whenever it does. In this video, we'll show you how to set up a lock sound in Windows using built-in tools. Before we begin, be sure to subscribe to NinjaOne's IT Video Hub and our YouTube channel for more tech content like this. Setting Sound With Task Scheduler Let's start with the easiest method: using Task Scheduler. Open the Run dialog by pressing Win + R, type taskschd.msc, and hit Enter. Inside Task Scheduler, select Task Scheduler Library, then choose Create Task. Under the General tab, name the task something like “Play Sound on Lock.” Check the boxes for “Run whether user is logged on or not” and “Run with highest privileges.” Set Configure for to your version of Windows. Next, click on the Triggers tab, press New, and choose “On workstation lock” as the trigger. Now switch to the Actions tab. Click New, choose “Start a program,” and set the program to powershell.exe. In the Add arguments field, use this command: Replacing Path And More Control You can replace the path with any .wav file you prefer. Finish by disabling the “Start only if on AC power” setting under Conditions, and press OK. Want more control? Use a PowerShell script instead. Write a simple script that plays your chosen .wav file, save it as a .ps1 file, and schedule it just like before. Don’t forget to run Set-ExecutionPolicy RemoteSigned in PowerShell to enable local scripts. Third-party tools like AutoHotkey and Soundplant offer even more customization, but Windows’ built-in options are usually enough. For more information, check out our official blog post on how to play sound when locking your computer in Windows, linked in the description below.

How to Play a Sound When Locking Your Computer in Windows

Learn how to play a sound when locking your computer in Windows. This tutorial shows how to use Task Scheduler and PowerShell to trigger custom audio when your PC locks. Whether for confirmation or security, this step-by-step guide covers it all.

Read the full blog on How to Play Sound when Locking Your Computer in Windows

Never miss a NinjaOne video!