none
How to Set Default Windows Sound Scheme for Windows 7 in OSD?

    Question

  • Hi Everyone,

    I'm putting a Windows 7 image together via SCCM 2007 SP2 R3 and there are 2 tweaks that I'm having a tough time getting to take hold.

    1. How to set the default user's sound scheme to "no sounds"
    2. How to set Advanced Performance settings (Properties on "Computer", Advanced System Settings, Advanced tab, Performance, Settings.  Under here we just want to turn off some of the Fade and Animate settings.


    For #1 above it would appear as though this is all located under HKCU\AppEvents\Schemes however when trying to add this to the Default User profile, my script is running OK and by using a pause I can see in the Registry where the default hive is getting mounted, modified and unloaded (same way I've done some other tweaks without any issues), but in the end, when I then logon with a new user (thus it builds their profile) the user is still getting the "Windows Default" sound scheme instead of the "No Sounds" scheme.

    Here is the script I'm running:

    VBS Script:

    ' Enable Script Logging
    Dim logFile
    logFile = "C:\Support\Logs\PerfOverDrive.log"

    Set objFSO = CreateObject("Scripting.FileSystemObject")
    Set logStream = objFSO.CreateTextFile(logFile , True)
    logStream.WriteLine Now & " - " & "Begin Logging"


    'Customize Default User Profile
    logStream.WriteLine Now & " - " & "Updating Default User Profile Sound and Performance Settings"

    Dim objWshShell, objFSO, HIVE, cmdStr
    Set objWshShell = WScript.CreateObject("WScript.Shell")
    Set objFSO = Wscript.CreateObject("Scripting.FileSystemObject")

    'Load the Default User profile registry hive
    HIVE="C:\Users\Default User\NTuser.dat"
    cmdStr = "reg.exe load HKEY_USERS\CustomizeDefaultUserProfile " & """" & HIVE & """"

    objWshShell.Run (cmdStr), 0, True

       ' Set Default Sound Scheme
       objWshShell.RegWrite "HKEY_USERS\CustomizeDefaultUserProfile\AppEvents\Schemes\", ".None","REG_SZ"
       objWshShell.Run ("regedit.exe /S SoundSettings.REG"), 0, True 

       'Set VisualFXSetting
       objWshShell.RegWrite "HKEY_USERS\CustomizeDefaultUserProfile\Software\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects\VisualFXSetting", "3","REG_DWORD"
       objWshShell.Run ("regedit.exe /S VisualFXSettings.REG"), 0, True

    '   WScript.Sleep(45000)

    'Unload the Default User profile registry hive
    objWshShell.Run ("reg.exe unload HKEY_USERS\CustomizeDefaultUserProfile"), 0, True

    logStream.WriteLine Now & " - " & "Finished Updating Default User Profile"

    logStream.WriteLine Now & " - " & "Finish Logging"
    logStream.WriteLine Now & " - " & "Exit Code = " & Err.Number
    logStream.Close

    SOUNDSETTINGS.REG

    Windows Registry Editor Version 5.00
     
    [HKEY_USERS\CustomizeDefaultProfile\AppEvents\Schemes]
     ""=".None"
     
    [HKEY_USERS\CustomizeDefaultProfile\AppEvents\Schemes\Names\.None]
     ""="No Sounds"
     
    [HKEY_USERS\CustomizeDefaultProfile\AppEvents\Schemes\Apps\.Default\SystemAsterisk\.Current]
     ""=-
     
    [HKEY_USERS\CustomizeDefaultProfile\AppEvents\Schemes\Apps\.Default\Close\.Current]
     ""=-
     
    [HKEY_USERS\CustomizeDefaultProfile\AppEvents\Schemes\Apps\.Default\CriticalBatteryAlarm\.Current]
     ""=-
     
    [HKEY_USERS\CustomizeDefaultProfile\AppEvents\Schemes\Apps\.Default\SystemHand\.Current]
     ""=-
     
    [HKEY_USERS\CustomizeDefaultProfile\AppEvents\Schemes\Apps\.Default\.Default\.Current]
     ""=-
     
    [HKEY_USERS\CustomizeDefaultProfile\AppEvents\Schemes\Apps\.Default\DeviceConnect\.Current]
     ""=-
     
    [HKEY_USERS\CustomizeDefaultProfile\AppEvents\Schemes\Apps\.Default\DeviceDisconnect\.Current]
     ""=-
     
    [HKEY_USERS\CustomizeDefaultProfile\AppEvents\Schemes\Apps\.Default\DeviceFail\.Current]
     ""=-
     
    [HKEY_USERS\CustomizeDefaultProfile\AppEvents\Schemes\Apps\.Default\SystemExclamation\.Current]
     ""=-
     
    [HKEY_USERS\CustomizeDefaultProfile\AppEvents\Schemes\Apps\.Default\SystemExit\.Current]
     ""=-
     
    [HKEY_USERS\CustomizeDefaultProfile\AppEvents\Schemes\Apps\.Default\LowBatteryAlarm\.Current]
     ""=-
     
    [HKEY_USERS\CustomizeDefaultProfile\AppEvents\Schemes\Apps\.Default\Maximize\.Current]
     ""=-
     
    [HKEY_USERS\CustomizeDefaultProfile\AppEvents\Schemes\Apps\.Default\MenuCommand\.Current]
     ""=-
     
    [HKEY_USERS\CustomizeDefaultProfile\AppEvents\Schemes\Apps\.Default\MenuPopup\.Current]
     ""=-
     
    [HKEY_USERS\CustomizeDefaultProfile\AppEvents\Schemes\Apps\.Default\Minimize\.Current]
     ""=-
     
    [HKEY_USERS\CustomizeDefaultProfile\AppEvents\Schemes\Apps\.Default\FaxBeep\.Current]
     ""=-
     
    [HKEY_USERS\CustomizeDefaultProfile\AppEvents\Schemes\Apps\.Default\MailBeep\.Current]
     ""=-
     
    [HKEY_USERS\CustomizeDefaultProfile\AppEvents\Schemes\Apps\.Default\Open\.Current]
     ""=-
     
    [HKEY_USERS\CustomizeDefaultProfile\AppEvents\Schemes\Apps\.Default\PrintComplete\.Current]
     ""=-
     
    [HKEY_USERS\CustomizeDefaultProfile\AppEvents\Schemes\Apps\.Default\AppGPFault\.Current]
     ""=-
     
    [HKEY_USERS\CustomizeDefaultProfile\AppEvents\Schemes\Apps\.Default\SystemQuestion\.Current]
     ""=-
     
    [HKEY_USERS\CustomizeDefaultProfile\AppEvents\Schemes\Apps\.Default\RestoreDown\.Current]
     ""=-
     
    [HKEY_USERS\CustomizeDefaultProfile\AppEvents\Schemes\Apps\.Default\RestoreUp\.Current]
     ""=-
     
    [HKEY_USERS\CustomizeDefaultProfile\AppEvents\Schemes\Apps\.Default\CCSelect\.Current]
     ""=-
     
    [HKEY_USERS\CustomizeDefaultProfile\AppEvents\Schemes\Apps\.Default\ShowBand\.Current]
     ""=-
     
    [HKEY_USERS\CustomizeDefaultProfile\AppEvents\Schemes\Apps\.Default\SystemNotification\.Current]
     ""=-
     
    [HKEY_USERS\CustomizeDefaultProfile\AppEvents\Schemes\Apps\.Default\ChangeTheme\.Current]
     ""=-
     
    [HKEY_USERS\CustomizeDefaultProfile\AppEvents\Schemes\Apps\.Default\WindowsLogoff\.Current]
     ""=-
     
    [HKEY_USERS\CustomizeDefaultProfile\AppEvents\Schemes\Apps\.Default\WindowsLogon\.Current]
     ""=-
     
    [HKEY_USERS\CustomizeDefaultProfile\AppEvents\Schemes\Apps\.Default\WindowsUAC\.Current]
     ""=-
     
    [HKEY_USERS\CustomizeDefaultProfile\AppEvents\Schemes\Apps\Explorer\BlockedPopup\.current]
     ""=-
     
    [HKEY_USERS\CustomizeDefaultProfile\AppEvents\Schemes\Apps\Explorer\ActivatingDocument\.Current]
     ""=-
     
    [HKEY_USERS\CustomizeDefaultProfile\AppEvents\Schemes\Apps\Explorer\EmptyRecycleBin\.Current]
     ""=-
     
    [HKEY_USERS\CustomizeDefaultProfile\AppEvents\Schemes\Apps\Explorer\FaxError\.Current]
     ""=-
     
    [HKEY_USERS\CustomizeDefaultProfile\AppEvents\Schemes\Apps\Explorer\FaxSent\.Current]
     ""=-
     
    [HKEY_USERS\CustomizeDefaultProfile\AppEvents\Schemes\Apps\Explorer\FeedDiscovered\.current]
     ""=-
     
    [HKEY_USERS\CustomizeDefaultProfile\AppEvents\Schemes\Apps\Explorer\FaxLineRings\.Current]
     ""=-
     
    [HKEY_USERS\CustomizeDefaultProfile\AppEvents\Schemes\Apps\Explorer\MoveMenuItem\.Current]
     ""=-
     
    [HKEY_USERS\CustomizeDefaultProfile\AppEvents\Schemes\Apps\Explorer\SecurityBand\.current]
     ""=-
     
    [HKEY_USERS\CustomizeDefaultProfile\AppEvents\Schemes\Apps\Explorer\SearchProviderDiscovered\.Current]
     ""=-
     
    [HKEY_USERS\CustomizeDefaultProfile\AppEvents\Schemes\Apps\Explorer\Navigating\.Current]
     ""=-
     
    [HKEY_USERS\CustomizeDefaultProfile\AppEvents\Schemes\Apps\sapisvr\DisNumbersSound\.current]
     ""=-
     
    [HKEY_USERS\CustomizeDefaultProfile\AppEvents\Schemes\Apps\sapisvr\PanelSound\.current]
     ""=-
     
    [HKEY_USERS\CustomizeDefaultProfile\AppEvents\Schemes\Apps\sapisvr\MisrecoSound\.current]
     ""=-
     
    [HKEY_USERS\CustomizeDefaultProfile\AppEvents\Schemes\Apps\sapisvr\HubOffSound\.current]
     ""=-
     
    [HKEY_USERS\CustomizeDefaultProfile\AppEvents\Schemes\Apps\sapisvr\HubOnSound\.current]
     ""=-
     
    [HKEY_USERS\CustomizeDefaultProfile\AppEvents\Schemes\Apps\sapisvr\HubSleepSound\.current]
     ""=-

    VISUALFXSETTINGS.REG
    Windows Registry Editor Version 5.00

    [HKEY_USERS\CustomizeDefaultUserProfile\Control Panel\Desktop]
    "UserPreferencesMask"=hex:98,00,03,80,12,00,00,00

    Any help would be greatly appreciated!  Can either of these areas be controlled via GPO instead?

    Thanks,
    -Jeff


    • Edited by JeffLe73 Thursday, February 23, 2012 3:20 PM
    Thursday, February 23, 2012 3:19 PM

All replies

  • I've used Group Policy Prefrences to update these keys before.  You can use the conditions to limit who gets it as well.  GPP registry extension will allow you to import the settings from the local machine as well

    Jay Parekh | http://www.desktopguy.com

    Project Leadership Associates

    http://www.projectleadership.net

    Thursday, February 23, 2012 5:43 PM
  • Any other solutions?  After speaking with the team here we'd like these settings to be part of the image so that Workgroup systems get them as well.
    Thursday, February 23, 2012 6:39 PM
  • Use Active Setup to do run the script when the user logs on for the first time.  Change your reg keys to hkcu.. since it runs on the users profile, no need to load the hive.

    http://leereid.wordpress.com/2008/07/23/active-setup-your-friend/


    Jay Parekh | http://www.desktopguy.com

    Project Leadership Associates

    http://www.projectleadership.net

    Thursday, February 23, 2012 6:46 PM
  • Well I did get #1 above working on Friday as part of my automated Build and Capture sequence.  Since in Windows 7 (and probably Vista) the Sounds are tied to the active Theme, I basically created my own corporate theme and saved it out as a .theme file.  Then during my TS I copied it to C:\WINDOWS\Resources\Themes folder.  Next, in my customizations script for the default user profile I set HKCU\Software\Microsoft\Windows\CurrentVersion\Themes\CurrentTheme to C:\Windows\resources\Themes\corporate.theme.

    This seemed to work.  Previously I had just updated my Unattend.xml and added my "corporate" theme to be specified in there.  On first run it didn't take so I added the reg key to my customizations script and now all is well.


    Note:  In the customizations script it's not writing exactly to HKCU but rather the temporary hive where the default user registry is being mounted (see sample script above).

    Now on to the Advanced performance settings...

    -Jeff

    Monday, February 27, 2012 1:02 PM