TISKBAF
  • 🖥️Linux OS
    • Useful Linux commands
    • To get a list of the dependencies of a package
    • Reset a Forgotten Root Password
    • How to Kill a Port in Linux
    • How to Install/Reinstall Linux GRUB Menu
    • Concatenate mp4 files using FFmpeg
    • Command to stop mirroring screens
    • Command to Run when Trash Won’t Empty
    • Prey Configuration Command (via Terminal)
    • Prey Configuration Command (via Terminal)
  • 🖥️Windows OS
    • Custom Profile Badges
      • badge-maker
      • shields.io - static badges
    • How to kill a task via terminal on Windows
    • Find and terminate a Windows Process by Port
    • The Complete List of Command Prompt (CMD) Commands
    • youtube-dl Usage
    • WSA/Google Play Services Reference Information
    • Windows Update Blocker (Windows Services Blocker)
    • Windows 11 Shell commands with friendly names
    • Wifi not automatically connecting on start-up when Ethernet is connected
    • To install many APK files at once
    • To get Firefox to remember logged in accounts
    • Spicetify Commands
    • Speech Recognition Commands
    • Simpletask [Simple] Documentation
    • Sideload Apps in Windows Subsystem for Android from APK Files
    • SetUserFTA Utility
    • Screensaver not starting even though it is configured correctly
    • Run Keys Registry Location
    • Rainmeter Config Definitions
    • Pushover
    • Program Folder Locations
    • Add an exclusion to Windows Security (or just turn off real-time protection)
    • Reddit RSS Feeds
    • Portainer on Windows
    • PGP: Encrypt & sign emails in a few clicks
    • Permanently Remove OneDrive from Windows
    • IRC NickServ Commands (full list)
    • Convert a P12/PFX Certificate to a .CER
    • How to embed in HTML
    • Misc. Windows Information
    • Issues with missing icons in Windows
    • Information on ‘scoop’ package manager for Windows
    • DISMTools Docs
    • Creating Python Virtual Environment in Windows and Linux
    • Using XnConvert to bulk convert image sizes
    • How to Merge Multiple Text Files using different methods in Windows
    • How to use OLLAMA_ORIGINS in Windows
    • To permanently turn off Windows Security and Windows Defender1
    • Enabling the disabled sounds in Windows
    • Enable classic right-click context menu on Windows 11
    • How to Convert Kindle Books (.awz/.awz3) to Other E-book Formats
    • How to Create Symbolic Links with mklink
    • APIMyLlama Commands
  • 🏬[Graphic] Design
    • Create a Realistic Shadow for Objects in GIMP (video)
    • How to Add Outer Glow Effects in GIMP
    • How to Curve Text In GIMP
    • Rounded corners in GIMP (video)
    • WORD CLOUD TEXT PORTRAIT EFFECT IN PHOTOSHOP (video)
    • BROKEN 3D TEXT EFFECT | PHOTOSHOP (video)
    • Type on a path in Photoshop
    • Nudify Guide (Stable Diffusion)
  • 💻Coding & Developing
    • APIMyLlama V2
      • APIMyLlama Source: Github
    • Insert Back button on a webpage
    • How to have a web page refresh automatically
    • AstroPaper Blog Theme
      • How to configure AstroPaper theme - Blog
      • Adding new posts in AstroPaper theme
    • How to generate Django SECRET_KEY
  • 📒Everything else
    • RSS Feed in your Notion Pages
    • 12 Firefox Hidden Settings You Should Check Out
    • ADB (almost) Full Commands List
    • How to pair your Wear OS smartwatch with a new phone
    • How to reset Cync by GE smart lights
    • IRC Servers & Channels Info
    • Internxt CLI commands and usage
    • Call Forwarding on mobile device
    • Obsidian Templater plugin
    • Exportify Documentation
    • KLLOQUE K10 B Ball Lock User Manual
    • How to delete bloatware from Android device
Powered by GitBook
On this page
  • Logoff Sound:
  • Logon Sound:
  • Shutdown Sound:
  1. Windows OS

Enabling the disabled sounds in Windows

Logoff Sound:

Enable Using Registry Editor:

Step 1: Press the Windows key + R together on your keyboard to open the Run box. Now, type regedit in the search field and hit Enter to open the Registry Editor.

Step 2: In the Registry Editor window, navigate to the below path:

HKEY_CURRENT_USER\\AppEvents\\EventLabels
​

Now, under the EventLabels key, scroll down and click on WindowsLogoff. On the right side you will see the DWORD (32-bit) Value – ExcludeFromCPL. Double-click to edit this field.

Step 3: In the Edit DWORD (32-bit) Value dialogue box, change the Value Data field from 1 to 0. Click OK to save the changes and exit.

Step 4: Now, click on WindowsLogon and on the right side you will see the same DWORd (32-bit) Value, ExcludeFrom CPL (as you saw in the case of WindowsLogoff).

Now, follow the Step 2 and Step 3 as above to change the Value Data field from 1 to 0. Press OK to save the changes and exit.

Now, the Windows Log Off and Log On sounds are enabled in the Control Panel. From here, you need to go to the Control Panel to enable the sounds.

Add play a sound at Logoff in Task Scheduler:

You can create an automated task that will allow your computer to play the logoff sound.

  1. Press the Windows key+S keys together.

  2. Type “Task Scheduler” in the search box and click on “Task Scheduler“.

  3. You have to click on the “Task Scheduler Library” and then click on the “Create Task...”.

  4. Go to the “General” tab.

  5. Set the name of the program as “Play logoff sound“.

  6. Then, click on the radio button beside the “Run whether the user is logged on or not“.

  7. Then, check the option “Run with highest privileges” box.

  8. Finally, click on the ‘Configure for:’ and set it to “Windows 10“.

  9. Next, go to the “Triggers” tab.

  10. Then, click on “New…” to create a new trigger.

  11. In the New Trigger window, set the ‘Begin the Task:’ to “On an event“.

  12. Then, set the ‘Log:’ to “Security“.

  13. After that, set the ‘Event ID:’ to “4647“.

  14. Then, click on “OK” to create a new trigger.

  15. At the next step, go to the “Actions” window.

  16. Thereafter, click on “New“.

  17. Then, set the ‘Action:’ to “Start a program” from the drop-down.

  18. After that, type “PowerShell” in the Program/script.

  19. Now, copy-paste this code in the ‘Add arguments (optional):’.

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

✎ NOTE: This is standard Windows Log off the sound. If you want to customize the ‘Log off’ sound, simply paste the address of the preferred sound in the place of ’C:\Windows\Media\Windows Logoff Sound.wav‘ in the code.

  1. Then, click on “OK” to save the action.

  2. In the ‘Create Task’ window, go to the “Conditions” tab.

  3. Then, uncheck the “Start the task only if the computer is on AC power“.

  4. Next, click on “OK” to save it.

  5. Now, Task Scheduler will ask for your account password.

  6. Just type in your account password and tap on “OK” to finally create the task.

You can see the ‘Play Logoff Sound’ task in the Task Scheduler window. From now on, this computer will make a sound once any of the users logs off from the system.

How to delete the automated task

If you ever feel you don’t need the logoff sound while logging out, you can easily get rid of it.

  1. Open the Task Scheduler.

  2. Then, on the left-hand pane, click on the “Task Scheduler Library“.

  3. On the right-hand side, look for the “Play logoff sound“.

  4. Right-click on the task and click on “Delete“.

Deleting the task will stop the logoff sound while logging out from the system.

Logon Sound:

Create a VBScript File to play a logon sound:

✮ Open Notepad and paste the following lines into it:

Set oVoice = CreateObject("SAPI.SpVoice")
set oSpFileStream = CreateObject("SAPI.SpFileStream")
oSpFileStream.Open "C:\\Windows\\Media\\Windows Logon.wav"
oVoice.SpeakStream oSpFileStream
oSpFileStream.Close
​

✮ Save this file anywhere with a .VBS extension. For example, “LogonSound.vbs”.

✮ Double-click the file you’ve created and ensure that it plays your sound file.

✎ NOTE: This is a simple VBScript for Windows to play any sound using the Speech API. I prefer this method because it doesn’t depend on loading some slow program such as Windows Media Player or any third-party app to play the sound.

In this script, I am using the default sound file, C:\Windows\Media\Windows Logon.wav. You can use any file you want. Just modify the appropriate line.

💡 TIP: In the Notepad’s Save dialog, include the file name to quotes to ensure that you are saving the file with the VBS file extension and not TXT.

Now we need to create a special Task Scheduler task to play this sound. Task Scheduler is able to run tasks at logon, so specifying our script as the task’s action will make it play the sound every time you sign-in.

Play the Logon Sound that you created automatically upon logon:

✮ Open Administrative Tools.

✮ Click the Task Scheduler icon.

✮ In the Task Scheduler library, click on the Create Task… link on the right.

✮ In Create Task dialog, fill in the Name box some meaningful text like “Play logon sound”.

✮ Set the option Configure for: Windows 10.

✮ Switch to the Triggers tab and click on the New button.

✮ Set the event for the trigger to At log on.

✮ Switch to the Actions tab and click on the New… button.

✮ In the next dialog, set the action type to Start a program.

✮ In the Program box, specify wscript.exe as the program.

✮ Type the full path to your VBScript file into the Add arguments text box.

✮ Switch to the Conditions tab and disable the option Start the task only if the computer is on AC power.

✮ Click on the OK button to create the task.

Shutdown Sound:

Creating a Shutdown Sound event:

We need to create a task in Task Scheduler attached to a special Shut Down event. The event we need has ID 1074 = User Initiated Shutdown, as shown in the following screenshot.

Task Scheduler is able to run tasks attached to any event, so specifying our script as the task’s action will make it play the sound every time you shut down the OS. To play the sound, we have to use PowerShell.

Method limitations:

⚠ This method only works when you know and can use credentials for an administrative user account.

⚠ It doesn’t work if your user account has no password.

⚠ It might not work if you have Fast Startup disabled.

Unfortunately, there is no way to bypass these limitations.

Playing the Shutdown Sound upon shutdown of your system:

✮ Open Administrative Tools.

✮ Click the Task Scheduler icon.

✮ In the Task Scheduler library, click on the Create Task… link on the right.

✮ In Create Task dialog, fill in the Name box some meaningful text like “Play shutdown sound

✮ Set the options as follows:

✮ Configure for Windows 10.

✮ Run whether user is logged on or not

✮ Run with highest privileges box

✮ Switch to the Triggers tab and click on the New… button.

✮ Set the event for the trigger to On an event.

✮ Select System in the drop down list under Log.

✮ Enter the value 1074 in the Event ID text box.

✮ Switch to the Actions tab and click on the New… button.

✮ In the next dialog, set the action type to Start a program.

✮ In the Program box, specify powershell.exe as the program.

✮ Type the following text (or use copy and paste) into the Add arguments text box:

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

✮ Switch to the Conditions tab and disable the option Start the task only if the computer is on AC power

✮ Click on the OK button to create the task.

✮ Type your user account password (or other administrative user account credentials).

… and that’s it! Finished. You did it!

PreviousTo permanently turn off Windows Security and Windows Defender1NextEnable classic right-click context menu on Windows 11

Last updated 3 months ago

✎ NOTE: If your operating system is preventing you from saving your task due to a blank password, you can to your user account or disable the restriction in Local Security Policy under Administrative tools.

🖥️
add a password