ORelio / Sound-Manager

Manage and share Windows sound schemes, restoring missing sounds on recent Windows versions
79 stars 5 forks source link

Feature: Use Task Scheduler for Startup for quicker logon sound in Win10/11 #1

Closed ninjaeon closed 2 years ago

ninjaeon commented 2 years ago

In Windows 11, when using "at logon" trigger with Task Schedule, the logon sound plays much sooner than when using the built-in startup folder start menu shortcut created by the startup option in "Sound Manager".

Action used in Task Schedule "Start a Program": "C:\Program Files (x86)\SoundManager\SoundManager.exe" --bg-sounds

EDIT: Optionally, "Stop task if it runs longer than..." can be set (1 minute works great for me) to automatically close the SoundManager.exe process afterwards. However, this will break logoff and shutdown sounds.

After creating the Task Scheduler task, the "Sound Manager" startup option can be disabled.

Thank you SO much for this tool! It's a huge help for me in Windows 10/11 since my built-in system sounds window is bugged at my monitor DPI/resolution settings. With the built-in Windows Sound Settings, the window is cut off at the bottom so I can't browse or select different sounds for each sound event. Clean installing Windows didn't help in my case, and this was in both Windows 10 and 11.

ORelio commented 2 years ago

I'm glad to see that SoundManager was helpful for you. I created it mainly to allow easier sharing of sound schemes and restore missing sounds on recent Windows systems. Since it's not very popular, I'm curious about how you found it?

Anyway, thanks for suggesting the use of Task Scheduler. I was unaware that tasks run much sooner than regular startup programs and could reproduce your findings. I'll definitely rework the startup feature to take advantage of that! I think I should also take this opportunity to make sure that everything works well on Windows 11.

The app stays idle in background after playing the startup sound because it's the only reliable way of handling the logoff/shutdown event. Starting a process when the system is trying to stop is a gamble. Having a background process should not pose an issue because it wakes only on the lock/unlock/shutdown system events and takes only ~2 MB of RAM, but ultimately, it's up to you.

ninjaeon commented 2 years ago

I'm glad to see that SoundManager was helpful for you. I created it mainly to allow easier sharing of sound schemes and restore missing sounds on recent Windows systems. Since it's not very popular, I'm curious about how you found it?

I found it through a Google search for "play sound on windows startup github". Second result. The fact that this app ALSO resolves my issues with changing any system sound was a treat since I had previously searched high and low for a solution and couldn't find one.

Anyway, thanks for suggesting the use of Task Scheduler. I was unaware that tasks run much sooner than regular startup programs and could reproduce your findings. I'll definitely rework the startup feature to take advantage of that! I think I should also take this opportunity to make sure that everything works well on Windows 11.

I'm not sure if changing "Startup" sound works in Windows 11 with your app, but "Log On" sound works which is enough for me. Windows 11 has a built-in startup sound that works if you select "Play Startup Sound" checkout in system sounds, and maybe you change it with the built-in system sounds window, but I can't see or access the portion of the window that lets you "browse" for sound files, so I don't know.

EDIT: Changing the Windows 11 startup sound to something custom in Sound Manager does not change the startup sound from default when the "Play Startup Sound" box is checked in system sounds.

The app stays idle in background after playing the startup sound because it's the only reliable way of handling the logoff/shutdown event. Starting a process when the system is trying to stop is a gamble. Having a background process should not pose an issue because it wakes only on the lock/unlock/shutdown system events and takes only ~2 MB of RAM, but ultimately, it's up to you.

Good point, and I noticed that the memory usage was between 700k-6mb. Since I found a "Log off/Shutdown" sound I want to use, I will keep the process running from now on. The "Log off/Shutdown" sounds set in your app do not play for me in Windows 11 unless I have the sound manager process running in the background.

Really enjoying my "Windows 95 startup" logon sound and "Command & Conquer - Battle Control Terminated EVA" logoff sounds :) Thank you very much!

ORelio commented 2 years ago

Just to let you know, SoundManager v3.0.2 has just been released. As suggested, it implements the Scheduled Task to start faster, and adds full support for Windows 11. You can also apply the Windows 11 sound scheme to all supported Windows versions.

I found it through a Google search for "play sound on windows startup github". Second result.

Thanks. Didn't know you could find it that easily so it's good to hear.

I'm not sure if changing "Startup" sound works in Windows 11 with your app, but "Log On" sound works which is enough for me. Windows 11 has a built-in startup sound that works if you select "Play Startup Sound" checkout in system sounds, and maybe you change it with the built-in system sounds window, but I can't see or access the portion of the window that lets you "browse" for sound files, so I don't know. EDIT: Changing the Windows 11 startup sound to something custom in Sound Manager does not change the startup sound from default when the "Play Startup Sound" box is checked in system sounds.

Sound events in Windows are... well... complicated. All was good until Windows XP but with Windows Vista/7, the startup sound became non-user changeable. SoundManager resorts to DLL patching to change it anyway, but it's not optimal. With Windows 8, many sound events were removed: logon, lock, unlock, shutdown. Startup sound is disabled by default and still not changeable. Interesting fact, Windows 8 had a new logon sound that could never be heard because the sound event was removed. The corresponding sound file is still present in Windows 10 and 11, and SoundManager picks it up because it is registered as logon sound. So by default, when you install SoundManager, you hear this hidden logon sound. When installing the newest SoundManager on Windows 11, it will disable the default startup sound for you, and offer to download and apply the correct Windows 11 sound scheme from repository. When applying the sound scheme, the correct startup sound will be installed.

Really enjoying my "Windows 95 startup" logon sound and "Command & Conquer - Battle Control Terminated EVA" logoff sounds :) Thank you very much!

Great! If you ever make a complete sound scheme, feel free to submit it 🙂 On a side note, I'll mark the issue as closed because the feature is implemented, but that will not prevent further replies.