home *** CD-ROM | disk | FTP | other *** search
- @echo Off
- if not "%echo%" == "" echo %echo%
- echo.
- echo This batch file will install the Hummingbird Socks 4/5 client
- echo for Winsock v1.1 only.
- echo Copyright (c) 1996-2001, Hummingbird Ltd.
- echo All Rights Reserved.
- echo.
- if not exist humprdsk.dll goto direrror
- if not exist checkwin.exe goto direrror
- if not exist inwin.com goto direrror
- if not exist wsock32.hcl goto direrror
- if not exist winsock.hcl goto direrror
- if not exist socks.cfg goto direrror
- subst > NUL
- if "%OS%" == "Windows_NT" goto socknt
- if "%winbootdir%" == "" goto win16
- checkwin > NUL
- if errorlevel 2 goto sock2_95
-
- REM ************************************************************************
- :sock1_95
- echo.
- echo Install Socks 4/5 for WinSock 1 on Windows 95
- echo.
- inwin
- if errorlevel 1 goto indosmode
- echo Install.bat must be run from MS-DOS mode.
- echo Please restart Windows 95 in MS-DOS mode and run install.bat again.
- goto end
- :indosmode
- subst > NUL
- if exist %winbootdir%\system\wsock32o.dll goto NoRename95
- ren %winbootdir%\system\wsock32.dll wsock32o.dll
- if errorlevel 1 goto generalerror
- :NoRename95:
- copy %winbootdir%\system\wsock32o.dll %winbootdir%\system\wsock32.dll >NUL
- copy wsock32.hcl %winbootdir%\system\wsock32.dll >NUL
- copy humprdsk.dll %winbootdir%\system >NUL
- copy ..\system32\redist\ms\system\msvcrt.dll %winbootdir%\system >NUL
- if errorlevel 1 goto generalerror
- if exist %winbootdir%\system\socks.cnf goto cnf1_95
- if exist %winbootdir%\system\socks.cfg goto cfg1_95
- copy socks.cfg %winbootdir%\system >NUL
- if errorlevel 1 goto generalerror
- goto cnf1_win
- :cnf1_95
- echo.
- echo Previous version of the SOCKS configuration file was found and renamed to socks.cfg.
- echo.
- copy socks.cfg %winbootdir%\system\socks.new >NUL
- ren %winbootdir%\system\socks.cnf socks.cfg
- if errorlevel 1 goto generalerror
- goto cnf1_win
- :cfg1_95
- echo.
- echo Previous version of the SOCKS configuration file was found.
- echo.
- copy socks.cfg %winbootdir%\system\socks.new >NUL
- if errorlevel 1 goto generalerror
- :cnf1_win
- echo Edit SOCKS.cfg in your Windows System directory to setup Socks 4/5.
- echo.
- echo Please restart Windows now.
- echo.
- goto end
-
- REM ************************************************************************
- :win16
- echo.
- echo Install Socks 4 for WinSock 1 on Windows for Workgroups 3.11
- echo.
- inwin
- if errorlevel 1 goto dosmode
- echo Install.bat must be run from MS-DOS mode.
- echo Please exit Windows and run install.bat again.
- goto end
- :usagewin
- echo Re-run Install.bat with your Windows directory as a parameter.
- echo ie. "Install.bat C:\WINDOWS"
- goto end
- :invaliddir
- echo "%1" does not appear to contain Windows for Workgroups 3.11.
- goto end
- :dosmode
- subst > NUL
- if "%1" == "" goto usagewin
- if not exist %1\winsock.dll goto invaliddir
- if exist %1\system\kernel32.dll goto invaliddir
-
- if exist %1\winsocko.dll goto NoDosRename
- ren %1\winsock.dll winsocko.dll
- if errorlevel 1 goto generalerror
- :NoDosRename
- copy %1\winsocko.dll %1\winsock.dll >NUL
- copy winsock.hcl %1\winsock.dll >NUL
- if errorlevel 1 goto generalerror
- if exist %1\system\socks.cfg goto cnf_win31
- copy socks.cfg %1\system >NUL
- copy humprdsk.dll %1\system >NUL
- if errorlevel 1 goto generalerror
- goto cnf1_win31
- :cnf_win31
- copy socks.cfg %1\system\socks.new >NUL
- if errorlevel 1 goto generalerror
- :cnf1_win31
- echo Edit SOCKS.cfg in your Windows System directory to setup Socks 4.
- echo.
- echo Please restart Windows now.
- echo.
- goto end
-
-
-
- REM *************************************************************************
- :sock2_95
- echo.
- REM Install Socks 4/5 for WinSock 2 on Windows 95/98
- REM (Aborts with an error message. Must use MSI install instead)
-
- goto wsock2error
-
- REM *************************************************************************
- :socknt
- REM Install Socks 4/5 for WinSock 2 on Windows NT4/2000
- REM (Aborts with an error message. Must use MSI install instead)
-
- goto wsock2error
-
- REM *************************************************************************
- :wsock2error
- echo Error:
- echo Cannot install Socks 4/5 for Winsock2 using install.bat
- goto end
-
- REM *************************************************************************
- :direrror
- echo Error:
- echo %0 must be run from its own directory.
- goto end
-
- REM *************************************************************************
- :generalerror
- echo The above error prevented Socks 4/5 from being installed properly.
- echo Fix error and try again.
- goto end
-
- REM *************************************************************************
- :end
- pause
-