I have an audio PC running Windows XP SP3 that has a multi-input sound card and I need to create a logon script that will set the proper default values. I am savvy enough to edit pre-existing scripts but am very limited in my scripting abilities.
I have sort of stumbled half way onto the proper script but I am having problems createing the entire structure in the registry. Apparently the Sound Mapper settings don't get created in the registry until the user goes into control panel and changes what comes up by default so it appears that I will have to create the entire Sound Mapper registry directory for new users.
So far I have a script to add the proper strings for my sound card but I can't figure out how to add the proper REG Dword values to complete the field.
Here is what the completed registry directory should look like:
HKCU/Software/Microsoft/Multimedia/Sound Mapper:
(Default) REG_SZ (Value Not Set)
ConsoleVoiceComPlayback REG_SZ LynxONE Digital Out
Playback REG_SZ LynxONE Digital Out
PrefferredOnly REG_DWORD 0x00000000(0)
Record REG_SZ LynxONE Digital In
SetupPreferredAudioDevicesCount REG_DWORD 0x00000000(0)
I have managed to find a script that will add REG_SZ values, one at a time but I would prefere a script that would create everything in one script. Here is the script I am using to create a single REG_SZ value.
strSetTo = "LynxONE Digital Out"
Set wshShell = CreateObject("WScript.Shell")
strRegVal = "HKEY_CURRENT_USER\Software\Microsoft\Multimedia\Sound Mapper\Playback"
strSetting = ""
On Error Resume Next
strSetting = wshShell.RegRead(strRegVal)
On Error Goto 0
If strSetting <> strSetTo Then
wshShell.RegWrite strRegVal, strSetTo
End If
If there is a better way to go about setting default audio card settings for all users on a single machine then I am all ears. Either way, thanks in advance for any help.