Added windows 95 start sound to scheduled tasks.
This commit is contained in:
Kurtis
2025-11-03 23:47:23 +10:00
parent 2806fc3bb8
commit 9fb902af7b

View File

@@ -178,8 +178,18 @@ Function Install-Clippy {
Function Update-Sounds {
Download-Sounds
Set-ItemProperty -Path "HKCU:\AppEvents\Schemes\Apps\.Default\WindowsLogon\.Current\" -Name "(default)" -Value "$folderPath\win95-sounds\The-Microsoft-Sound.wav"
Set-ItemProperty -Path "HKCU:\AppEvents\EventLabels\WindowsLogon\" -Name "ExcludeFromCPL" -Value "0"
Set-Content -Path "$folderPath\win95startsound.vbs" -Value "set oVoice = CreateObject(`"SAPI.SpVoice`")"
Add-Content -Path "$folderPath\win95startsound.vbs" -Value "set oSpFileStream = CreateObject(`"SAPI.SpFileStream`")"
Add-Content -Path "$folderPath\win95startsound.vbs" -Value "oSpFileStream.Open `"$folderPath\win95-sounds\The-Microsoft-Sound.wav`""
Add-Content -Path "$folderPath\win95startsound.vbs" -Value "oVoice.SpeakStream oSpFileStream"
Add-Content -Path "$folderPath\win95startsound.vbs" -Value "oSpFileStream.Close"
New-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\BootAnimation" -Name "DisableStartupSound" -PropertyType DWORD -Value 1
$action = New-ScheduledTaskAction -Execute "$folderPath\win95startsound.vbs"
$trigger = New-ScheduledTaskTrigger -AtLogon
$principal = New-ScheduledTaskPrincipal -UserId $env:USERNAME -LogonType Interactive
Register-ScheduledTask -TaskName "Win95-Startup-Sound" -Action $action -Trigger $trigger -Principal $principal -Description "Plays the windows 95 startup music at login"
Set-ItemProperty -Path "HKCU:\AppEvents\Schemes\Apps\.Default\SystemAsterisk\.Current\" -Name "(default)" -Value "$folderPath\win95-sounds\CHORD.WAV"
Set-ItemProperty -Path "HKCU:\AppEvents\Schemes\Apps\.Default\SystemExclamation\.Current\" -Name "(default)" -Value "$folderPath\win95-sounds\CHORD.WAV"
Set-ItemProperty -Path "HKCU:\AppEvents\Schemes\Apps\.Default\SystemQuestion\.Current\" -Name "(default)" -Value "$folderPath\win95-sounds\CHORD.WAV"
@@ -194,6 +204,8 @@ Function Update-Icons {
@("$ENV:APPDATA\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar\File Explorer.lnk",
"$folderPathicons\win95-icons\Folder.ico"),
@("$ENV:APPDATA\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar\Thunderbird.lnk",
"$folderPathicons\win95-icons\Mail.ico"),
@("$ENV:APPDATA\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar\Zen.lnk",
"$folderPathicons\win95-icons\Mail.ico")
)