diff --git a/README.md b/README.md index 6172b24..dd0e1bc 100644 --- a/README.md +++ b/README.md @@ -57,6 +57,13 @@ Portable installation does not install any start menu or desktop shortcuts and no context menu entries. It creates a shortcut in the selected portable installation folder to start the default WSL distribution. +Note: For an update installation, either the parent directory or the target +directory itself can be selected. + +Note: If you rename or move the installation directory, the icon of the +“WSL Terminal Portable” shortcut will not work anymore; re-run the +install-portable.bat script in the installation folder to refresh it. + #### Installation from archive #### In case a local anti-virus guard barfs about the wsltty installer, the diff --git a/install-portable.bat b/install-portable.bat index 47e4948..00f81a9 100755 --- a/install-portable.bat +++ b/install-portable.bat @@ -2,6 +2,13 @@ chcp 65001 > nul +if not exist "WSL Terminal Portable.lnk" goto install +echo Rebuilding WSL Terminal Portable shortcut +set instdir=%~dp0 +goto shortcut + +:install + echo Installing WSL Terminal Portable echo Select target folder in popup dialog ... @@ -25,6 +32,13 @@ rem call main installation call install "%instdir%" "%instdir%" /P rem this already changes into "%instdir%" +rem copy additional portable installation files +rem do this after call install as that deletes previous .bat files +copy "%~dp0\install-portable.bat" . +dir "%instdir%"\install-portable.bat + +:shortcut + rem create shortcut cd /D "%instdir%" rem set drive-relative path for shortcut working directory and icon