diff --git a/install-portable.bat b/install-portable.bat index 813e93b..47e4948 100755 --- a/install-portable.bat +++ b/install-portable.bat @@ -1,29 +1,34 @@ @echo off +chcp 65001 > nul + echo Installing WSL Terminal Portable echo Select target folder in popup dialog ... set sel="Select folder to place installation of portable wsltty" -chcp 65001 > nul for /f "usebackq delims=" %%f in (`powershell "(new-object -COM Shell.Application).BrowseForFolder(0, '%sel%', 0, 0).self.path"`) do set f=%%f set instdir=%f%\wsltty if exist %f%\LICENSE.mintty set instdir=%f% if "%f%"=="" ( - echo no installation + echo No installation selected + pause exit ) else if not exist "%f%" ( - echo invalid installation folder %instdir% + echo Invalid installation folder %instdir% + pause exit ) rem call main installation call install "%instdir%" "%instdir%" /P +rem this already changes into "%instdir%" rem create shortcut +cd /D "%instdir%" +rem set drive-relative path for shortcut working directory and icon set instpath=%instdir:~2% -cd /D "%instpath%" set target=%%COMSPEC%% set minttyargs=/C bin\mintty.exe --WSL= --icon=/wsl.ico --configdir=. -~ set bridgeargs= - diff --git a/install.bat b/install.bat index 7224536..7fdc3c9 100755 --- a/install.bat +++ b/install.bat @@ -15,9 +15,7 @@ call dequote oldconfigdir rem override installdir, configdir if parameters given set arg1=%1 -echo %arg1% call dequote arg1 -echo %arg1% if "%arg1%" == "%%arg1%%" goto deploy set refinstalldir=%arg1% set installdir=%arg1%