├── README.md ├── .gitignore └── DirectSound Wrapper Registry Patcher.cmd /README.md: -------------------------------------------------------------------------------- 1 | # DSWRP 2 | DirectSound Wrapper Registry Patcher 3 | By 3DJ with credit to Henky!!, John-Paul Ownby and Nucleoprotein 4 | Originally posted in https://github.com/kcat/dsoal/issues/34#issuecomment-1139239755 5 | Automated and expanded version of: 6 | - https://www.indirectsound.com/registryIssues.html 7 | - https://www.vogons.org/viewtopic.php?p=692601#p692601 8 | 9 | This registry key patch script is required for some apps/games to load the local `dsound.dll` (used by DirectSound3D wrappers like DSOAL and Creative ALchemy) instead of `C:\Windows\SysWOW64\dsound.dll`. 10 | 11 | It also creates a `Backup.reg` file that you can merge to revert all changes made by the script. 12 | The release version includes SetACL ([with explicit permission from the developer as required](https://github.com/user-attachments/assets/f7801af2-93d3-4ec6-8b59-d746cd6c5328)), a program that automatically takes ownerwhip of the system-protected registry keys so that the user doesn't have to. 13 | 14 | # Instructions 15 | 16 | 17 | - Right-click `DirectSound Wrapper Registry Patcher.cmd` script file > **Run as an administrator** (needed for SetACL) 18 | - You should see a list of patched registry keys in green text, indicating it succeeded: 19 | ![image](https://github.com/user-attachments/assets/72ae2569-3f1b-4405-9764-55487fc89a1a) 20 | - App/games should now be able to load dsound.dll replacements like DSOAL/ALchemy. 21 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | Backup/HKEY_LOCAL_MACHINE-SOFTWARE-Classes-WOW6432Node-CLSID-{FEA4300C-7959-4147-B26A-2377B9E7A91D}-InprocServer32.reg 3 | Backup/HKEY_LOCAL_MACHINE-SOFTWARE-Classes-WOW6432Node-CLSID-{E4BCAC13-7F99-4908-9A8E-74E3BF24B6E1}-InprocServer32.reg 4 | Backup/HKEY_LOCAL_MACHINE-SOFTWARE-Classes-WOW6432Node-CLSID-{B2F586D4-5558-49D1-A07B-3249DBBB33C2}-InprocServer32.reg 5 | Backup/HKEY_LOCAL_MACHINE-SOFTWARE-Classes-WOW6432Node-CLSID-{B0210780-89CD-11d0-AF08-00A0C925CD16}-InprocServer32.reg 6 | Backup/HKEY_LOCAL_MACHINE-SOFTWARE-Classes-WOW6432Node-CLSID-{47D4D946-62E8-11CF-93BC-444553540000}-InprocServer32.reg 7 | Backup/HKEY_LOCAL_MACHINE-SOFTWARE-Classes-WOW6432Node-CLSID-{3901CC3F-84B5-4FA4-BA35-AA8172B8A09B}-InprocServer32.reg 8 | Backup/HKEY_LOCAL_MACHINE-SOFTWARE-Classes-WOW6432Node-CLSID-{11AB3EC0-25EC-11D1-A4D8-00C04FC28ACA}-InprocServer32.reg 9 | Backup/HKEY_LOCAL_MACHINE-SOFTWARE-Classes-CLSID-{FEA4300C-7959-4147-B26A-2377B9E7A91D}-InprocServer32.reg 10 | Backup/HKEY_LOCAL_MACHINE-SOFTWARE-Classes-CLSID-{E4BCAC13-7F99-4908-9A8E-74E3BF24B6E1}-InprocServer32.reg 11 | Backup/HKEY_LOCAL_MACHINE-SOFTWARE-Classes-CLSID-{B2F586D4-5558-49D1-A07B-3249DBBB33C2}-InprocServer32.reg 12 | Backup/HKEY_LOCAL_MACHINE-SOFTWARE-Classes-CLSID-{B0210780-89CD-11d0-AF08-00A0C925CD16}-InprocServer32.reg 13 | Backup/HKEY_LOCAL_MACHINE-SOFTWARE-Classes-CLSID-{47D4D946-62E8-11CF-93BC-444553540000}-InprocServer32.reg 14 | Backup/HKEY_LOCAL_MACHINE-SOFTWARE-Classes-CLSID-{3901CC3F-84B5-4FA4-BA35-AA8172B8A09B}-InprocServer32.reg 15 | Backup/HKEY_LOCAL_MACHINE-SOFTWARE-Classes-CLSID-{11AB3EC0-25EC-11D1-A4D8-00C04FC28ACA}-InprocServer32.reg 16 | Backup/HKEY_CURRENT_USER-SOFTWARE-Classes-WOW6432Node-CLSID-{FEA4300C-7959-4147-B26A-2377B9E7A91D}-InprocServer32.reg 17 | Backup/HKEY_CURRENT_USER-SOFTWARE-Classes-WOW6432Node-CLSID-{E4BCAC13-7F99-4908-9A8E-74E3BF24B6E1}-InprocServer32.reg 18 | Backup/HKEY_CURRENT_USER-SOFTWARE-Classes-WOW6432Node-CLSID-{B2F586D4-5558-49D1-A07B-3249DBBB33C2}-InprocServer32.reg 19 | Backup/HKEY_CURRENT_USER-SOFTWARE-Classes-WOW6432Node-CLSID-{B0210780-89CD-11d0-AF08-00A0C925CD16}-InprocServer32.reg 20 | Backup/HKEY_CURRENT_USER-SOFTWARE-Classes-WOW6432Node-CLSID-{47D4D946-62E8-11CF-93BC-444553540000}-InprocServer32.reg 21 | Backup/HKEY_CURRENT_USER-SOFTWARE-Classes-WOW6432Node-CLSID-{3901CC3F-84B5-4FA4-BA35-AA8172B8A09B}-InprocServer32.reg 22 | Backup/HKEY_CURRENT_USER-SOFTWARE-Classes-WOW6432Node-CLSID-{11AB3EC0-25EC-11D1-A4D8-00C04FC28ACA}-InprocServer32.reg 23 | Backup/HKEY_CURRENT_USER-SOFTWARE-Classes-CLSID-{FEA4300C-7959-4147-B26A-2377B9E7A91D}-InprocServer32.reg 24 | Backup/HKEY_CURRENT_USER-SOFTWARE-Classes-CLSID-{E4BCAC13-7F99-4908-9A8E-74E3BF24B6E1}-InprocServer32.reg 25 | Backup/HKEY_CURRENT_USER-SOFTWARE-Classes-CLSID-{B2F586D4-5558-49D1-A07B-3249DBBB33C2}-InprocServer32.reg 26 | Backup/HKEY_CURRENT_USER-SOFTWARE-Classes-CLSID-{B0210780-89CD-11d0-AF08-00A0C925CD16}-InprocServer32.reg 27 | Backup/HKEY_CURRENT_USER-SOFTWARE-Classes-CLSID-{47D4D946-62E8-11CF-93BC-444553540000}-InprocServer32.reg 28 | Backup/HKEY_CURRENT_USER-SOFTWARE-Classes-CLSID-{3901CC3F-84B5-4FA4-BA35-AA8172B8A09B}-InprocServer32.reg 29 | Backup/HKEY_CURRENT_USER-SOFTWARE-Classes-CLSID-{11AB3EC0-25EC-11D1-A4D8-00C04FC28ACA}-InprocServer32.reg 30 | Backup.reg 31 | -------------------------------------------------------------------------------- /DirectSound Wrapper Registry Patcher.cmd: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | SETlocal EnableExtensions 3 | SETlocal EnableDelayedExpansion 4 | MODE con: cols=150 lines=50 5 | pushd "%~dp0" 6 | 7 | reg Query "HKLM\Hardware\Description\System\CentralProcessor\0" | find /i "x86" > NUL || SET "WindowsArchitectureBits=64" 8 | 9 | SET RegistryHive[0]=HKEY_LOCAL_MACHINE 10 | SET RegistryHive[1]=HKEY_CURRENT_USER 11 | 12 | SET RegistryNode[0]=\ 13 | SET RegistryNode[1]=\WOW6432Node\ 14 | 15 | SET RegistryID[0]={11AB3EC0-25EC-11D1-A4D8-00C04FC28ACA} 16 | SET RegistryID[1]={3901CC3F-84B5-4FA4-BA35-AA8172B8A09B} 17 | SET RegistryID[2]={47D4D946-62E8-11CF-93BC-444553540000} 18 | SET RegistryID[3]={B0210780-89CD-11d0-AF08-00A0C925CD16} 19 | SET RegistryID[4]={B2F586D4-5558-49D1-A07B-3249DBBB33C2} 20 | SET RegistryID[5]={E4BCAC13-7F99-4908-9A8E-74E3BF24B6E1} 21 | SET RegistryID[6]={FEA4300C-7959-4147-B26A-2377B9E7A91D} 22 | 23 | TITLE DirectSound wrapper registry patcher v1.3 - By 3DJ with credit to Henky!!, John-Paul Ownby and Nucleoprotein 24 | ECHO. 25 | ECHO Registering DirectSound references (dsound.dll)... 26 | 27 | whoami /groups | find "S-1-16-12288" > nul 28 | if !ErrorLevel! == 0 ( 29 | IF NOT EXIST "Backup.reg" ( 30 | ECHO Windows Registry Editor Version 5.00>"Backup.reg" 31 | ) 32 | for /F "tokens=2 delims==" %%H in ('set RegistryHive[') do ( 33 | for /F "tokens=2 delims==" %%N in ('set RegistryNode[') do ( 34 | for /F "tokens=2 delims==" %%I in ('set RegistryID[') do ( 35 | SET "RegistryPath=%%H\SOFTWARE\Classes%%NCLSID\%%I\InprocServer32" 36 | IF NOT EXIST "Backup" (MKDIR "Backup") 37 | IF NOT EXIST "Backup\!RegistryPath:\=-!.reg" ( 38 | reg query "!RegistryPath!" 1>> NUL 2>&1 39 | IF !ERRORLEVEL! EQU 0 ( 40 | reg export "!RegistryPath!" "Backup\!RegistryPath:\=-!.reg" /y 1>>NUL 2>&1 41 | IF EXIST "Backup\!RegistryPath:\=-!.reg" (type "Backup\!RegistryPath:\=-!.reg" | find /v "Windows Registry Editor Version 5.00">>"Backup.reg") 42 | ) ELSE ( 43 | ECHO Windows Registry Editor Version 5.00>"Backup\!RegistryPath:\=-!.reg" 44 | ECHO.>>"Backup\!RegistryPath:\=-!.reg" 45 | ECHO [-!RegistryPath!]>>"Backup\!RegistryPath:\=-!.reg" 46 | ECHO.>>"Backup\!RegistryPath:\=-!.reg" 47 | ECHO.>>"Backup\!RegistryPath:\=-!.reg" 48 | type "Backup\!RegistryPath:\=-!.reg" | find /v "Windows Registry Editor Version 5.00">>"Backup.reg" 49 | ) 50 | ) 51 | SET /P var=!RegistryPath!: >NUL 2>&1 54 | SetACL.exe -on "!RegistryPath!" -ot reg -actn ace -ace "n:Administrators;p:full" -rec Yes 1>>NUL 2>&1 55 | ) 56 | reg add "!RegistryPath!" /V "" /T "REG_SZ" /D "dsound.dll" /F Run as administrator 65 | ) ELSE ( 66 | COLOR A 67 | ECHO SUCCESS: All registry keys have been updated. 68 | ) 69 | ) else ( 70 | echo Failed to acquire elevation. Please, close this window then right click this .cmd file ^> Run as administrator 71 | ) 72 | pause --------------------------------------------------------------------------------