VOGONS


First post, by noabody

User metadata
Rank Newbie
Rank
Newbie

I installed this program on four XP computers and each one had an issue with uninstallation. It seemed to mess up all system variables including delayed expansion and the path variables. Everything went back to normal when I reinstalled the program. I don't know if there is a fix for the problem with the uninstaller but here is a batch I made that should do mostly the same thing.

VDMSuninst.bat

@echo off
set x=
set /a y=0
set z=
set wd=%~dp0

cls
REM Get the path to VDMS from the registry and output raw.
for /F "usebackq tokens=3-10 skip=4" %%A in (`reg query "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v "VDMSPath"`) do set x=%%A %%B %%C %%D %%E %%F %%G %%H done
IF ""=="%x%" goto ERR
goto TRIM

REM Cleanup the VDMS path info.
:TRIM
cls
set /a y=%y%+1
for /F "tokens=%y%" %%A in ("%x%") do (
IF %%A==done goto ENDTRIM
IF "%y%"=="1" (set z=%%A) else set z=%z% %%A
)
goto TRIM

REM Unregister all dll's, delete regsitry entries and program folder.
:ENDTRIM
set x="%z%"
regsvr32 /u /s %x%\DiskWriter.dll
regsvr32 /u /s %x%\DMAController.dll
regsvr32 /u /s %x%\DSoundDevice.dll
regsvr32 /u /s %x%\EmuAdLib.dll
regsvr32 /u /s %x%\EmuJoystick.dll
regsvr32 /u /s %x%\EmuMPU401.dll
regsvr32 /u /s %x%\EmuSBCompat.dll
regsvr32 /u /s %x%\LaunchPad.dll
regsvr32 /u /s %x%\MIDIDevice.dll
regsvr32 /u /s %x%\MIDIIndicator.dll
regsvr32 /u /s %x%\MIDIToolkit.dll
regsvr32 /u /s %x%\VDDLoader.dll
regsvr32 /u /s %x%\VDMConfig.dll
regsvr32 /u /s %x%\WaveDevice.dll
reg delete "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v "VDMSPath" /f
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\VDMSound" /f
taskkill /f /im explorer.exe
pause
rmdir /s /q %x%
start explorer
goto END

:ERR
echo I thought this batch file was perfect, but something went wrong.
pause

:END
exit

The only oddball thing here is me killing explorer.exe which is the XP GUI. I do that because launchpad.dll is hooked by the system and the folder will not delete until you kill explorer which frees it up for deletion. I start explorer up again immediately afterward.

Attachments

  • Filename
    VDMSuninst.zip
    File size
    810 Bytes
    Downloads
    695 downloads
    File comment
    File attached for convienience.
    File license
    Fair use/fair dealing exception