How to Play Sound when Lock Calculator in Windows

Locking your PC protects it from unauthorized apply when you need to step away from the PC, and don't want to sign out or shut down.

When you lock the computer, you will be taken to the lock screen past default to unlock and sign in when ready to continue where you lot left off. Other users can all the same sign in to their accounts from the sign-in screen.

If you similar, you can still create an elevated task to play a audio when users lock the computer.

This tutorial will testify you how to play a sound when users lock the computer in Windows 7, Windows eight, Windows ten.

Yous must be signed in every bit an administrator with a password to create an elevated job.

Contents


  • Option One: Add together or Remove Play a Audio when Lock Computer Task Automatically using a BAT file
  • Selection Two: Add or Remove Play a Sound when Lock Estimator Job Manually in Task Scheduler

OPTION One

Add together or Remove Play a Audio when Lock Computer Task Automatically using a BAT file

Special thanks to Matthew for providing the .bat files in this option.

1 Practice stride 2 (add) or step 3 (remove) below for what you lot would similar to do.

ii To Add together Play a Sound when Lock Computer Task

A) Download the Play_Sound_when_Lock_Computer.bat file beneath to your desktop.

B) Unblock the downloaded .bat file.

C) Run the .bat file.

D) If prompted by UAC, click/tap on Aye to approve running the .bat file elevated (run as administrator).

E) When prompted, enter the full path of the .wav file y'all want to play when you lock the figurer. (see screenshot beneath)

F) When prompted, enter the countersign for the account to authorize the task.

G) When finished, press any cardinal to close the command prompt.

How to Play Sound when Lock Computer in Windows-success.jpg

3 To Remove Play a Sound when Lock Computer Job

A) Download the Delete_the_scheduled_task.bat file below to your desktop.

B) Unblock the downloaded .bat file.

C) Run the .bat file.

D) If prompted past UAC, click/tap on Yes to approve running the .bat file elevated (run as ambassador).

East) When finished, press any cardinal to shut the command prompt.

Pick TWO

Add or Remove Play a Sound when Lock Computer Job Manually in Task Scheduler

1 Press the Win + R keys to open up Run, type taskschd.msc into Run, and click/tap on OK to open Task Scheduler.

two Click/tap on Job Scheduler Library in the left pane of Chore Scheduler, and click/tap on Create Task in the right Actions pane. (see screenshot below)

How to Play Sound when Lock Computer in Windows-play_sound_at_lock_task-1.jpg

3 In the General tab, blazon a name (ex: "Play lock sound") you desire for this task. (run into screenshot below)

How to Play Sound when Lock Computer in Windows-play_sound_at_lock_task-2.png

4 In the General tab, select (dot) Run whether user is logged on or not. (see screenshot below)

How to Play Sound when Lock Computer in Windows-play_sound_at_lock_task-3.png

five In the General tab, check the Run with highest privileges box. (see screenshot beneath)

How to Play Sound when Lock Computer in Windows-play_sound_at_lock_task-4.png

half dozen In the General tab, select your Os (ex: "Windows 10") in the Configure for drop down. (see screenshot below)

How to Play Sound when Lock Computer in Windows-play_sound_at_lock_task-5.png

vii Click/tap on the Triggers tab, and click/tap on the New push. (see screenshot below)

How to Play Sound when Lock Computer in Windows-play_sound_at_lock_task-6.png

eight Select On workstation lock in the Begin the task driblet downward, and click/tap on OK. (see screenshot beneath)

How to Play Sound when Lock Computer in Windows-play_sound_at_lock_task-7.png

9 Click/tap on the Actions tab, and click/tap on the New push. (meet screenshot beneath)

How to Play Sound when Lock Computer in Windows-play_sound_at_lock_task-8.png

10 Perform the deportment beneath: (see screenshot below)

A) Select Start a programme in the Activeness drib downwards.

B) Blazon PowerShell in the Plan/script field box.

C) Enter the command below into the Add arguments field box, and click/tap on OK.

-c (New-Object Media.SoundPlayer 'C:\Windows\Media\Windows Unlock.wav').PlaySync();

If you wanted to play a audio (.wav file) of your selection instead, you tin substitute C:\Windows\Media\Windows Unlock.wav in the command above with the total path of the .wav file y'all want to be played.

The Windows Unlock.wav file is not available in Windows 7, but you can download it below if yous like.

Download

How to Play Sound when Lock Computer in Windows-play_sound_at_lock_task-9.png

eleven Click/tap on the Conditions tab, uncheck the Start the task simply if the computer is on Air conditioning power box, and click/tap on OK. (see screenshot below)

How to Play Sound when Lock Computer in Windows-play_sound_at_lock_task-10.png

12 Enter your account's password, and click/tap on OK. (run into screenshot below)

How to Play Sound when Lock Computer in Windows-play_sound_at_lock_task-11.png

13 This job (ex: "Play lock sound") is now finished, and will at present play a audio when users lock the estimator. (come across screenshot below)

How to Play Sound when Lock Computer in Windows-play_sound_at_lock_task-12.png

That'southward it,
Shawn

  • Windows 11 Tutorials