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-dll
On Error Resume Next
Dim objWshShell : Set objWshShell = CreateObject("WScript.Shell")
Dim objFso : Set objFso = CreateObject("Scripting.FileSystemObject")
' Source folder with a3d DLLs on drive C
strA3dFolder = "C:\a3d-dll\"
' This reg key shows which hardware profile
' You are booted into in Windows 98
strCurrentConfig = objWshShell.RegRead _
' Change these variables depending
' on your setup
Select Case strCurrentConfig
strHardwareProfile = "Audigy"
strHardwareProfile = "Vortex2"
strHardwareProfile = "YMF724"
WScript.Echo "Unable to determine hardware profile. Goodbye"
strA3dFile = objFso.BuildPath(strA3dFolder & strHardwareProfile, "a3d.dll")
' Overwrite a3d.dll in C:\Windows\System
If objFso.FileExists(strA3dFile) Then
objFso.CopyFile strA3dFile, "C:\Windows\System\a3d.dll"
WScript.Echo "Unable to find " & strA3dFile & ". Goodbye"
' Output result
If Err.Number = 0 Then
objWshShell.Popup "Successfully copied a3d.dll for hardware profile: " _
& strHardwareProfile, 5, strHardwareProfile, 0 + 64
WScript.Echo "Unable to copy a3d.dll for hardware profile: " & _
strHardwareProfile & vbCrLf & "Error number: " & err.number & _
vbCrLf & "Error description: " & err.description
Win 11 - Intel Core i7-8809G - 8 GB - Radeon RX Vega M GH - Sound Blaster X4