How to Play Sound at Logoff (Sign-out) in Windows 10  

Page 1 of 2 12 LastLast
    How to Play Sound at Logoff (Sign-out) in Windows 10

    How to Play Sound at Logoff (Sign-out) in Windows 10

    Published by Category: Customization
    11 Jul 2020
    Designer Media Ltd


    How to Play Sound at Logoff (Sign-out) in Windows 10


    Starting in Windows 8, the Windows Logoff sound event has been disabled. This leaves you unable to change or play the Windows Logoff sound at sign-out in Windows 10.

    As a workaround, you can still create an elevated task to play a sound at sign-out (logoff) to Windows 10.

    This tutorial will show you how to play a sound at logoff (sign-out) for all users in Windows 10.

    You must be signed in as an administrator with a password to create an elevated task.

    Depending on how fast your system logs out the user, the logoff sound may get cut off while played at sign out.

    If this happens, then you may need to test different logoff sounds for one that sounds best for you.



    Contents

    • Option One: Add or Remove Play a Sound at Logoff (Sign-out) Task Automatically using a BAT file
    • Option Two: Add or Remove Play a Sound at Logoff (Sign-out) Task Manually in Task Scheduler






    OPTION ONE

    Add or Remove Play a Sound at Logoff (Sign-out Task Automatically using a BAT file


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


    1 Do step 2 (add) or step 3 (remove) below for what you would like to do.


    2 To Add Play a Sound at Logoff (Sign-out Task

    A) Download the Play_Sound_at_Logoff.bat file below to your desktop.
    B) Unblock the downloaded .bat file.

    C) Run the .bat file.

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

    E) When prompted, enter the full path of the .wav file you want to play at logoff (sign-out). (see screenshot below)

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

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

    How to Play Sound at Logoff (Sign-out) in Windows 10-success.jpg


    3 To Remove Play a Sound at Logoff (Sign-out Task

    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 by UAC, click/tap on Yes to approve running the .bat file elevated (run as administrator).

    E) When finished, press any key to close the command prompt.






    OPTION TWO

    Add or Remove Play a Sound at Logoff (Sign-out) Task Manually in Task Scheduler


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

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

    How to Play Sound at Logoff (Sign-out) in Windows 10-play_sound_at_logoff_task-1.jpg

    3 In the General tab, type a name (ex: "Play logoff sound") you want for this task. (see screenshot below)

    How to Play Sound at Logoff (Sign-out) in Windows 10-play_sound_at_logoff_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 at Logoff (Sign-out) in Windows 10-play_sound_at_logoff_task-3.png

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

    How to Play Sound at Logoff (Sign-out) in Windows 10-play_sound_at_logoff_task-4.png

    6 In the General tab, select Windows 10 in the Configure for drop down. (see screenshot below)

    How to Play Sound at Logoff (Sign-out) in Windows 10-play_sound_at_logoff_task-5.png

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

    How to Play Sound at Logoff (Sign-out) in Windows 10-play_sound_at_logoff_task-6.png

    8 Perform the actions below: (see screenshot below)

    A) Select On an event in the Begin the task drop down.

    B) Select Security in the Log drop down.

    C) Type 4647 (user initiated logoff) in the Event ID drop down, and click/tap on OK.

    How to Play Sound at Logoff (Sign-out) in Windows 10-play_sound_at_logoff_task-7.png

    9 Click/tap on the Actions tab, and click/tap on the New button. (see screenshot below)

    How to Play Sound at Logoff (Sign-out) in Windows 10-play_sound_at_logoff_task-8.png

    10 Perform the actions below: (see screenshot below)

    A) Select Start a program in the Action drop down.

    B) Type PowerShell into the Program/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 Logoff Sound.wav').PlaySync();

    If you wanted to play a sound (.wav file) of your choice instead, you can substitute C:\Windows\Media\Windows Logoff Sound.wav in the command above with the full path of the .wav file you want to be played.

    How to Play Sound at Logoff (Sign-out) in Windows 10-play_sound_at_logoff_task-9.png

    11 Click/tap on the Conditions tab, uncheck the Start the task only if the computer is on AC power box, and click/tap on OK. (see screenshot below)

    How to Play Sound at Logoff (Sign-out) in Windows 10-play_sound_at_logoff_task-10.png

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

    How to Play Sound at Logoff (Sign-out) in Windows 10-play_sound_at_logoff_task-11.png

    13 This task (ex: "Play logoff sound") is now finished, and will now play a sound at sign-out for all users on your PC. (see screenshot below)

    How to Play Sound at Logoff (Sign-out) in Windows 10-play_sound_at_logoff_task-12.png


    That's it,
    Shawn



  1. Matthew Wai's Avatar
    Posts : 5,146
    Windows 10 Home 20H2
       #1
      My Computer

  2. Brink's Avatar
    Posts : 56,475
    64-bit Windows 10 Pro for Workstations build 21364
    Thread Starter
       #2

    Thank you @Matthew Wai. Now added as option 1.
      My Computers


  3. Posts : 81
    w10 pro
       #3

    I am trying to replicate the tutorial.
    But, as "Program/Script" I try to enter a vbs file (which runs fine from Windows Explorer)..

    Any ideas why it is not working?


    The vbs is as follows:
    Set oVoice = CreateObject("SAPI.SpVoice")
    set oSpFileStream = CreateObject("SAPI.SpFileStream")
    oSpFileStream.Open "D:\Music\SystemSounds\SystemDown_Ivy.wav"
    oVoice.SpeakStream oSpFileStream
    oSpFileStream.Close
      My Computer

  4. Matthew Wai's Avatar
    Posts : 5,146
    Windows 10 Home 20H2
       #4

    abax2000 said:
    Any ideas why it is not working?
    "Program/script" wscript.exe
    "Add arguments" the full path of your VBScript file.
      My Computer


  5. Posts : 81
    w10 pro
       #5

    Still not working.
    Tried with and without quotation marks (" ").
      My Computer

  6. Matthew Wai's Avatar
    Posts : 5,146
    Windows 10 Home 20H2
       #6

    You need quotation marks around the file path.
    What is the file path?
      My Computer


  7. Posts : 81
    w10 pro
       #7

    I tried that also (quotation marks only for file path).
    Current pinned on desktop "C:\Desktop\LogOutSound.vbs"
      My Computer

  8. Matthew Wai's Avatar
    Posts : 5,146
    Windows 10 Home 20H2
       #8

    abax2000 said:
    "C:\Desktop\LogOutSound.vbs"
    The following works at my end.

    How to Play Sound at Logoff (Sign-out) in Windows 10-logoutsound.jpg
      My Computer


  9. Posts : 81
    w10 pro
       #9

    Exactly same...not working

    ...and yes, wscript.exe is present in windows\system32
    Windows10 64pro, 20H2, 19042.928
      My Computer


 
Page 1 of 2 12 LastLast

Tutorial Categories

How to Play Sound at Logoff (Sign-out) in Windows 10 Tutorial Index Network & Sharing Instalation and Upgrade Browsers and Email General Tips Gaming Customization Apps and Features Virtualization BSOD System Security User Accounts Hardware and Drivers Updates and Activation Backup and Restore Performance and Maintenance Mixed Reality Phone


  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd
All times are GMT -5. The time now is 15:36.
Find Us




Windows 10 Forums