Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- @rem A windows batch/cmd script to run HexChat from USB/Portable drive, with
- @rem portable perl support. HexChat IRC Client/communication software.
- @rem HexChat is based on XChat software.
- @rem This script will also allow to run a second/2nd instance of HexChat.
- @rem When installing HexChat, you must select "Portable" option,
- @rem if you want to run HexChat from a USB drive or from your own choice of
- @rem folder, which will not conflict with existing 1st/main HexChat.
- @rem Copy & paste these codes into a file, name the file HexChat-USB.cmd
- @rem You must place the file next to hexchat.exe file, inside HexChat folder.
- @rem Download Strawberry Perl : if hexchat includes perl interface interpreter
- @rem for version 5.20, then get strawberry PORTABLE ZIP file version 5.20
- @rem If "HexChat" is in this E:\ location (E:\HexChat\), then create
- @rem a "Perl" folder next to it, means, create a "Perl" folder in same
- @rem prefix location, in E:\ So in end, "Perl" will be E:\Perl\
- @rem Decompress strawberry perl zip file inside E:\Perl\
- @rem You may use 7zip, or Windows default zip extraction.
- @rem So in end, perl.exe file will have to be here E:\Perl\perl\bin\
- @rem Double click on HexChat-USB.cmd file, to start HexChat, from USB.
- @rem No copyright. For anyone to use anywhere. by tErik.
- setlocal
- @rem echo %~dp0
- @rem E:\HexChat\
- set STARTPTH=%~dp0
- set PERLPATH=%STARTPTH%..\..\Perl\;%STARTPTH%..\..\Perl\perl\;%STARTPTH%..\..\Perl\perl\bin\
- set PATH=%STARTPTH%;%PERLPATH%;%PATH%
- @rem Display environment variable values/content:
- @echo STARTPTH=%STARTPTH%
- @echo .
- @echo PERLPATH=%PERLPATH%
- @echo .
- @echo PATH=%PATH%
- @echo .
- @echo .
- IF EXIST %STARTPTH%..\..\Perl\perl\bin\perl.exe GOTO perlFnd
- :perlNfnd
- @echo ERROR: perl.exe file not found, (inside the "Perl" directory/folder
- @echo structure for portable use, which suppose to be placed next to "HexChat"
- @echo folder/directory). See "notes" inside HexChat-USB.cmd file.
- @echo .
- @echo HexChat is now executed to run, (without Portable Perl support,
- @echo and HexChat will try to use host system's Perl, if exists & specified
- @echo in host system's PATH environment variable, and if that perl version
- @echo is compatible with perl interface interpreter included with HexChat).
- GOTO StartHxc
- :perlFnd
- @echo HexChat is now executed to run, (with custom/portable Perl support).
- :StartHxc
- @echo .
- @echo When HexChat is closed, then, (or after HexChat starts up), this window will AUTO CLOSE AFTER 20 SECONDS.
- @echo .
- @rem START "title" [/D path] [options] "command" [parameters]
- @START "HexChat (Portable)" /D%STARTPTH% "hexchat.exe"
- @rem CMD [charset] [options] [/K Command]
- @rem %WINDIR%\system32\cmd.exe /C ""%%STARTPTH%%\hexchat.exe""
- timeout 20
- endlocal
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement