home *** CD-ROM | disk | FTP | other *** search
/ University of Pittsburgh…tware Toolkit - Fall 2002 / Toolkit.iso / pc / Connectivity / HostEx7.1 / SOCKS / Winsock1 / uninstal.bat < prev    next >
Encoding:
DOS Batch File  |  2001-06-07  |  3.1 KB  |  104 lines

  1. @echo Off
  2. if not "%echo%" == "" echo %echo%
  3. echo.
  4. echo  This batch file will remove the Hummingbird Socks 4/5 client
  5. echo  for Winsock v1.1 only.
  6. echo  Copyright (c) 1996-2001 Hummingbird Ltd. All Rights Reserved.
  7. echo  All Rights Reserved.
  8. echo.
  9.     if not exist inwin.com goto direrror
  10.     if not exist checkwin.exe goto direrror
  11.     subst > NUL
  12.     if "%OS%" == "Windows_NT" goto socknt
  13.     if "%winbootdir%" == "" goto win16
  14.     checkwin > NUL
  15.     if errorlevel 2 goto sock2_95
  16.  
  17. REM ************************************************************************
  18. :sock1_95
  19. echo.
  20. echo  Remove Socks 4/5 from WinSock 1 on Windows 95
  21. echo.
  22.     subst > NUL
  23.     if not exist %winbootdir%\system\wsock32o.dll goto notinst
  24.     inwin
  25.     if errorlevel 1 goto indosmode
  26.     echo uninstal.bat must be run from MS-DOS mode.
  27.     echo Please restart Windows 95 in MS-DOS mode and run uninstal.bat again.
  28.     goto end
  29. :indosmode
  30.     del %winbootdir%\system\wsock32.dll
  31.     del %winbootdir%\system\humprdsk.dll
  32.     del %winbootdir%\system\socks.cfg
  33.     ren %winbootdir%\system\wsock32o.dll wsock32.dll
  34. :cnf1_win
  35.     echo  Socks has been removed from your system.
  36.     echo.
  37.     echo  Please restart Windows now.
  38.     echo.
  39.     goto end
  40. :notinst
  41.     echo.
  42.     echo  Socks does not seem to be installed on your system
  43.     echo.
  44.     goto end
  45.  
  46. REM ************************************************************************
  47. :win16
  48. echo.
  49. echo  Remove Socks 4 from WinSock 1 on Windows for Workgroups 3.11
  50. echo.
  51.     subst > NUL
  52.     if "%1" == "" goto usagewin
  53.     if not exist %1\winsock.dll goto invaliddir
  54.     if exist %1\system\kernel32.dll goto invaliddir
  55.     if not exist %1\winsocko.dll goto notinst
  56.     inwin
  57.     if errorlevel 1 goto dosmode
  58.     echo uninstal.bat must be run from MS-DOS mode.
  59.     echo Please exit Windows and run uninstal.bat again.
  60.     goto end
  61. :usagewin
  62.     echo Re-run uninstal.bat with your Windows directory as a parameter.
  63.     echo ie. "uninstal.bat C:\WINDOWS"
  64.     goto end
  65. :invaliddir
  66.     echo "%1" does not appear to contain Windows for Workgroups 3.11.
  67.     goto end
  68. :dosmode
  69.     del %1\winsock.dll
  70.     del %1\humprdsk.dll
  71.     ren %1\winsocko.dll winsock.dll
  72.     goto cnf1_win
  73.  
  74. REM *************************************************************************
  75. :sock2_95
  76. echo.
  77. REM  Uninstall Socks 4/5 for WinSock 2 on Windows 95/98
  78. REM  (Aborts with an error message.  Must use MSI uninstall instead)
  79.  
  80. goto wsock2error
  81.  
  82. REM *************************************************************************
  83. :socknt
  84. REM  Uninstall Socks 4/5 for WinSock 2 on Windows NT4/2000
  85. REM  (Aborts with an error message.  Must use MSI uninstall instead)
  86.  
  87. goto wsock2error
  88.  
  89. REM *************************************************************************
  90. :wsock2error
  91.     echo Error:
  92.     echo Cannot uninstall Socks 4/5 for Winsock2 using uninstall.bat
  93.     goto end
  94.  
  95. REM *************************************************************************
  96. :direrror
  97.     echo Error:
  98.     echo %0 must be run from its own directory.
  99.     goto end
  100.  
  101. REM *************************************************************************
  102. :end
  103.     pause
  104.