Using a batch file

Associate
Joined
18 Oct 2002
Posts
1,581
Location
Nottingham
Is it possible to use a batch file to change the default audio playback device?

I am wondering this because i have usb headphones that have their own soundcard and i use my speakers out of my actual soundcard.

What i want to be able to do is change which device is active. Normally i have everything coming through my headphones except my winamp which comes through my speakers. However sometimes i want to show someone something and so need to change the audio output to the speakers. I chop and change which way they are set many times per day and just wondered if there was a quicker way of doing it?
 
try using REGSHOT to capture registry changes before and after changing the output..

just before clicking 'ok' click 1st shot, in regshot
just after clicking ok, click 2nd shot, then Compare..

post the log here, if it makes sense, i could make two bat/reg files for you :)
 
i guess this is some of it?

----------------------------------
Values modified:14
----------------------------------
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryptography\RNG\Seed: A3 11 57 C0 67 84 5E AC 1C 9E 71 7A F0 97 2D BF 8E C4 E8 F2 36 D3 2B 0F 5C E5 49 9C B4 A6 F6 CC 0E 4E 33 32 C9 7D D1 4B C1 42 12 F0 D5 6A E1 56 C1 1B 8B 62 B9 AA 02 CC FA 78 6F 9D 24 F5 CF 74 CF 64 4B EE 8F F5 6A 10 81 10 29 41 6F 7B B1 D5
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryptography\RNG\Seed: FA 92 1A 22 71 37 DD BC A1 E2 8D E0 28 7C 29 6D 20 07 5A 8F 9E 43 13 60 1F 74 D4 12 FD AC 18 C8 D9 E6 0C 71 E1 C2 A2 86 4C 8F 62 65 A1 5F DA 44 3B B7 EA E3 58 84 39 53 D5 EC 63 9F 2D CE B4 B8 CC 73 89 07 BF 87 55 E5 5B E2 C3 1F 65 A0 43 16
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\DeviceClasses\{d6c5066e-72c1-11d2-9755-0000f8004788}\##?#SW#{a7c7a5b0-5af3-11d1-9ced-00a024bf0407}#{9B365890-165F-11D0-A195-0020AFD156E4}#{d6c5066e-72c1-11d2-9755-0000f8004788}\#SAD6\Device Parameters\FriendlyName: "SB Audigy 4 [E880]"
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\DeviceClasses\{d6c5066e-72c1-11d2-9755-0000f8004788}\##?#SW#{a7c7a5b0-5af3-11d1-9ced-00a024bf0407}#{9B365890-165F-11D0-A195-0020AFD156E4}#{d6c5066e-72c1-11d2-9755-0000f8004788}\#SAD6\Device Parameters\FriendlyName: "USB Audio Device"
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\DeviceClasses\{d6c5066e-72c1-11d2-9755-0000f8004788}\##?#SW#{a7c7a5b0-5af3-11d1-9ced-00a024bf0407}#{9B365890-165F-11D0-A195-0020AFD156E4}#{d6c5066e-72c1-11d2-9755-0000f8004788}\#SAD6\Device Parameters\FriendlyName: "SB Audigy 4 [E880]"
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\DeviceClasses\{d6c5066e-72c1-11d2-9755-0000f8004788}\##?#SW#{a7c7a5b0-5af3-11d1-9ced-00a024bf0407}#{9B365890-165F-11D0-A195-0020AFD156E4}#{d6c5066e-72c1-11d2-9755-0000f8004788}\#SAD6\Device Parameters\FriendlyName: "USB Audio Device"
HKEY_USERS\S-1-5-21-1078081533-1801674531-839522115-1003\Software\Microsoft\Multimedia\Sound Mapper\Playback: "SB Audigy 4 [E880]"
HKEY_USERS\S-1-5-21-1078081533-1801674531-839522115-1003\Software\Microsoft\Multimedia\Sound Mapper\Playback: "Plantronics Headset"
 
save it as a text file (pasting into forum windows puts extra spaces in, i wouldn't want to put a wrong entry in..)

-see the Control\De vice Class

should be Control\Device Class


email me the text file mate, its looks simple to me!

bleddyn ##at## gmail dot com
 
Back
Top Bottom