Updated on November 7, 2026
For a quick fix, mute the speakers before pressing Windows + L. For automatic muting, WinMute can react when you lock the PC. You can also use Task Scheduler with a command that mutes the default sound output.

Choose a way to mute sound on lock
| Method | What to set up | What to expect |
|---|---|---|
| Mute manually | Press the keyboard’s speaker-mute key or use the Windows volume control before locking. | Useful when you only need to mute occasionally. |
| WinMute | Enable muting on workstation lock in the app’s settings. | Can mute sound devices automatically and restore sound when you return. |
| Task Scheduler with NirCmd | Create a task triggered by workstation lock. | Mutes the default sound device and leaves it muted until you unmute it. |
Mute a laptop before or after locking it
On Windows 11, press Windows + A and use the speaker control to mute, then press Windows + L. You can also use the keyboard’s speaker-mute key. Some laptops require Fn with that key. Our Windows keyboard shortcut guide covers common keyboard controls.
If the computer is already locked, try the physical mute or volume button on the keyboard, speakers or headset. Keyboard controls depend on the device and driver. If they don’t respond, unlock the PC to change its volume settings.
Mute automatically with WinMute
- Get WinMute from its official releases page or the store link in the project’s documentation.
- Start the app and find its icon in the taskbar’s notification area. Right-click it to open the settings.
- Enable muting when the workstation is locked. Review the options for restoring sound when you return and for other events, such as the display turning off.
- Enable the app’s startup option if you want the rule available after signing in.
- Test with a quiet audio clip. Press Windows + L, check that the output goes silent, then unlock and check the restore behavior you chose.
Check the output devices you actually use, including USB and Bluetooth headsets. The WinMute project guide documents the supported triggers and setup options.
Create a mute task for Windows lock with NirCmd
NirCmd’s mutesysvolume 1 command mutes the default sound device. Download the utility from NirSoft and extract it to a folder you’ll keep, such as C:\Tools\NirCmd.
- Open Task Scheduler and select Create Task. Give the task a clear name, such as
Mute sound on lock, and select Run only when user is logged on. - On Triggers, select New > On workstation lock. Choose the user account the rule should apply to.
- On Actions, select New > Start a program. Enter
C:\Tools\NirCmd\nircmd.exeas the program andmutesysvolume 1as the arguments. Use the path where you extracted the utility. - On a laptop, review Conditions so the task can run on battery when needed.
- Save the task, run it once to check the command, then test by locking Windows. Unmute manually after the test.
See NirSoft’s mute command reference and Microsoft’s session-change trigger documentation.
Frequently asked questions
Why does music keep playing when I lock Windows?
Locking keeps the session running. A player may keep sending audio until you mute it, pause it, or configure an automatic mute rule.
Can I mute a computer that is already locked?
Try the keyboard’s mute key or a physical button on the speakers or headset. If it doesn’t respond, unlock Windows to adjust the volume.
Will WinMute restore sound when I unlock?
WinMute supports automatic unmuting when you return. Check its settings and test the behavior with the output device you use.
Does the NirCmd task mute every sound device?
The command shown mutes the default sound device. If your apps use another output, check that device separately or use a tool that handles multiple outputs.
How do I keep music playing while the PC is locked?
Pause or disable a rule that mutes sound when Windows locks and leave the player running. Sleep and power settings can also affect whether playback continues.
How do I stop the scheduled mute rule?
Open Task Scheduler, find the task you created and choose Disable. You can enable it again later.