xxxman360 / LogonVistaOrb

A .NET Framework app designed to bring the iconic Windows Vista startup animation in the login to Windows 10 and up
GNU General Public License v3.0
4 stars 0 forks source link

Making logon and shutdown sounds get pulled from an applied sound scheme, aswell as log off sounds. #1

Open iongsd opened 2 weeks ago

iongsd commented 2 weeks ago

As the title says, making the sounds be pulled from the currently applied sound scheme, and adding the log off sound.

Here's a reg file to add the sound events to the sound scheme CPL so that they can be easily modified if this feature is to be implemented: Sound.zip

This singular reg file wont restore the sounds, just simply unhides them from the list.

xxxman360 commented 2 weeks ago

Sounds like a great idea! I could see this being added to v1.1. I'm a bit new to working with the registry in C#, but as far as I'm concerned, I just have to read the value at .Current.

Or so it may seem that way...

There's just two problems I have with this approach:

  1. There's no way to obtain the entry for "SystemStart" as at the stage the sound would be played at, the user is still not logged in yet.
  2. When the animation is run, it only runs once as the SYSTEM account. This means all registry values for HKEY_CURRENT_USER will be taken from SYSTEM, rather than from the account that is being logged in to. The way the animation preps itself again is via a task that runs at shutdown that configures the "Debugger" value for LogonUI.exe to be LogonVistaOrb. This is also why the "logoff" sound was never added.

However, if you can think of a better approach to circumvent these issues, I will gladly add in your suggestion. I'd like to make this software as customizable as I can. Note however, that I will not approve of running LogonVistaOrb in the background as a solution.

dominichayesferen commented 2 weeks ago

This is a stupid idea, but since part of your payload is basically intercepting the execution of LogonUI.exe, what's stopping you from doing the same with explorer.exe?

In actual Windowses with the login sound, its playback is handled by an initialised explorer.exe, so with the right waiting an interception could theoretically be a suitable substitute.

dominichayesferen commented 2 weeks ago

Additionally, while I'm not sure HOW you would go about doing it, if you were able to, as SYSTEM, identify the user that is active, maybe you could also get their SID and thus route into HKEY_USERS\ for the sound scheme settings...?

xxxman360 commented 1 week ago

Update: I've figured out a solution to this issue In the configuration section, a check called "Use sounds from my sound scheme" can be clicked which will update the LogonVistaOrb registry with the user ID so that LogonVistaOrb can load the sounds from the path specified by that user account.

As for the logoff sound, I could make that into another scheduled task (toggle-able of course), and then have the process that plays the logoff sound wait for LogonUI to close to then play the logon sound.

Thoughts?