First post, by Stretch
EDIT: This is a Visual Basic Script. Save it as a3d-dll.vbs if you want to use it.
I made a rudimentary script to overwrite a3d.dll in c:\windows\system under Win98 when using hardware profiles with different sound cards.
I created the script because I've experienced blue screen of death if I accidentally use an incorrect a3d.dll for a sound card, and I got tired of copying the file when I switch hardware profiles.
The requirements are Windows Script Host (Windows 98SE Unofficial Service Pack 2.1 installs it), Win98SE (not tested with Win95, Win98FE, or WinME), and more than one hardware profile.
The script does not check if it is running under Win98 and I cannot take responsibility if your OS gets corrupted from using the script.
To use the script create hardware profiles and matching sub-folders under C:\a3d-dll. In those folders copy the proper a3d.dll corresponding with the sound card.
You also have to modify the hardware profile names in the script under the "Select Case" section in the script.
When done, place the script in your startup folder at C:\WINDOWS\Start Menu\Programs\StartUp. Then when you boot up into your hardware profile, the script will automatically copy the proper a3d.dll file to c:\windows\system. You can also double-click the script to verify the proper a3d.dll is copied.
Improvements to the script could be: not overwriting a3d.dll unless necessary, better coding, and easier method of changing the variables for hardware profile names.
' This script will copy the a3d DLL' based on the current hardware profile selected' in Windows 98. Place the script in' C:\WINDOWS\Start Menu\Programs\StartUp' Place the a3d files corresponding with your' sound cards in sub-folders in C:\a3d-dllOption ExplicitOn Error Resume NextDim objWshShell : Set objWshShell = CreateObject("WScript.Shell")Dim objFso : Set objFso = CreateObject("Scripting.FileSystemObject")' Source folder with a3d DLLs on drive CDim strA3dFolderstrA3dFolder = "C:\a3d-dll\"' This reg key shows which hardware profile' You are booted into in Windows 98Dim strCurrentConfigstrCurrentConfig = objWshShell.RegRead _("HKLM\System\CurrentControlSet\Control\IDConfigDB\CurrentConfig")' Change these variables depending' on your setupDim strHardwareProfileSelect Case strCurrentConfigCase "0001"strHardwareProfile = "Audigy"Case "0002"strHardwareProfile = "Vortex2"Case "0003"strHardwareProfile = "YMF724"Case ElseWScript.Echo "Unable to determine hardware profile. Goodbye"WScript.QuitEnd SelectDim strA3dFilestrA3dFile = objFso.BuildPath(strA3dFolder & strHardwareProfile, "a3d.dll")' Overwrite a3d.dll in C:\Windows\SystemIf objFso.FileExists(strA3dFile) ThenobjFso.CopyFile strA3dFile, "C:\Windows\System\a3d.dll"ElseWScript.Echo "Unable to find " & strA3dFile & ". Goodbye"WScript.QuitEnd If' Output resultIf Err.Number = 0 ThenobjWshShell.Popup "Successfully copied a3d.dll for hardware profile: " _& strHardwareProfile, 5, strHardwareProfile, 0 + 64ElseWScript.Echo "Unable to copy a3d.dll for hardware profile: " & _strHardwareProfile & vbCrLf & "Error number: " & err.number & _vbCrLf & "Error description: " & err.descriptionEnd If
Win 11 - Intel i7-1360p - 32 GB - Intel Iris Xe - Cubilux 7.1 USB