mirror of
https://github.com/mintty/wsltty.git
synced 2025-01-18 20:10:58 +00:00
attempt to avoid virus scanners choking on VBS script name (#94)
This commit is contained in:
parent
36e0d9c58a
commit
f66c87cc62
@ -197,6 +197,8 @@ do
|
|||||||
cmd /C del "%LOCALAPPDATA%\\Microsoft\\WindowsApps\\$name.bat"
|
cmd /C del "%LOCALAPPDATA%\\Microsoft\\WindowsApps\\$name.bat"
|
||||||
cmd /C del "%LOCALAPPDATA%\\Microsoft\\WindowsApps\\$name~.bat"
|
cmd /C del "%LOCALAPPDATA%\\Microsoft\\WindowsApps\\$name~.bat"
|
||||||
else
|
else
|
||||||
|
cmd /C copy mkshortcut.bat mkshortcut.vbs
|
||||||
|
|
||||||
# desktop shortcut in %USERPROFILE% -> Start Menu - WSLtty
|
# desktop shortcut in %USERPROFILE% -> Start Menu - WSLtty
|
||||||
cscript /nologo mkshortcut.vbs "/name:$name Terminal %"
|
cscript /nologo mkshortcut.vbs "/name:$name Terminal %"
|
||||||
cmd /C copy "$name Terminal %.lnk" "%APPDATA%\\Microsoft\\Windows\\Start Menu\\Programs\\WSLtty"
|
cmd /C copy "$name Terminal %.lnk" "%APPDATA%\\Microsoft\\Windows\\Start Menu\\Programs\\WSLtty"
|
||||||
|
@ -28,7 +28,7 @@ copy "remove from context menu.lnk" "%installdir%"
|
|||||||
copy "configure WSL shortcuts.lnk" "%installdir%"
|
copy "configure WSL shortcuts.lnk" "%installdir%"
|
||||||
copy wsl.ico "%installdir%"
|
copy wsl.ico "%installdir%"
|
||||||
copy config-distros.sh "%installdir%"
|
copy config-distros.sh "%installdir%"
|
||||||
copy mkshortcut.vbs "%installdir%"
|
copy mkshortcut.bat "%installdir%"
|
||||||
|
|
||||||
if not exist "%installdir%\bin" goto instbin
|
if not exist "%installdir%\bin" goto instbin
|
||||||
rem move previous programs possibly in use out of the way
|
rem move previous programs possibly in use out of the way
|
||||||
|
2
makefile
2
makefile
@ -163,7 +163,7 @@ cop: ver
|
|||||||
cp *.url rel/
|
cp *.url rel/
|
||||||
cp *.bat rel/
|
cp *.bat rel/
|
||||||
cp *.sh rel/
|
cp *.sh rel/
|
||||||
cp *.vbs rel/
|
#cp *.vbs rel/
|
||||||
|
|
||||||
cab: cop
|
cab: cop
|
||||||
cd rel; iexpress /n wsltty.SED
|
cd rel; iexpress /n wsltty.SED
|
||||||
|
@ -41,7 +41,7 @@ FILE5="LICENSE.mintty"
|
|||||||
FILE6="LICENSE.wslbridge"
|
FILE6="LICENSE.wslbridge"
|
||||||
FILE7="config-distros.sh"
|
FILE7="config-distros.sh"
|
||||||
FILE8="configure WSL shortcuts.lnk"
|
FILE8="configure WSL shortcuts.lnk"
|
||||||
FILE9="mkshortcut.vbs"
|
FILE9="mkshortcut.bat"
|
||||||
FILE10="VERSION"
|
FILE10="VERSION"
|
||||||
FILE11="dash.exe"
|
FILE11="dash.exe"
|
||||||
FILE12="regtool.exe"
|
FILE12="regtool.exe"
|
||||||
|
57
mkshortcut.bat
Executable file
57
mkshortcut.bat
Executable file
@ -0,0 +1,57 @@
|
|||||||
|
rem cscript mkshortcut [/param:arg] /target:link
|
||||||
|
|
||||||
|
rem /target:%LOCALAPPDATA%\wsltty\bin\mintty.exe
|
||||||
|
rem /workingdir:%USERPROFILE%
|
||||||
|
rem /icon:%LOCALAPPDATA%\wsltty\wsl.ico
|
||||||
|
rem deprecated: /icon:%LOCALAPPDATA%\lxss\bash.ico
|
||||||
|
rem deprecated: %
|
||||||
|
rem /arguments:--wsl -o Locale=C -o Charset=UTF-8 /bin/wslbridge -t /bin/bash
|
||||||
|
rem deprecated: ~
|
||||||
|
rem /arguments:--wsl -o Locale=C -o Charset=UTF-8 /bin/wslbridge -C~ -t /bin/bash
|
||||||
|
rem deprecated: -l
|
||||||
|
rem /arguments:--wsl -o Locale=C -o Charset=UTF-8 /bin/wslbridge -t /bin/bash -l
|
||||||
|
|
||||||
|
rem General - Name:
|
||||||
|
name = Wscript.Arguments.Named("name") & ".lnk"
|
||||||
|
set wshell = WScript.CreateObject("WScript.Shell")
|
||||||
|
wscript.echo "Creating " & name
|
||||||
|
set lnk = wshell.CreateShortcut(name)
|
||||||
|
|
||||||
|
rem Target:
|
||||||
|
rem lnk.TargetPath = Wscript.Arguments.Named("target")
|
||||||
|
rem lnk.Arguments = Wscript.Arguments.Named("arguments")
|
||||||
|
|
||||||
|
lnk.TargetPath = wshell.ExpandEnvironmentStrings("%target%")
|
||||||
|
minttyargs = wshell.ExpandEnvironmentStrings("%minttyargs%")
|
||||||
|
bridgeargs = wshell.ExpandEnvironmentStrings("%bridgeargs%")
|
||||||
|
lnk.Arguments = minttyargs & bridgeargs
|
||||||
|
rem wscript.echo "minttyargs: " & minttyargs
|
||||||
|
rem wscript.echo lnk.Arguments
|
||||||
|
|
||||||
|
rem Start in:
|
||||||
|
rem lnk.WorkingDirectory = Wscript.Arguments.Named("workingdir")
|
||||||
|
lnk.WorkingDirectory = "%USERPROFILE%"
|
||||||
|
|
||||||
|
rem Icon:
|
||||||
|
rem icon = Wscript.Arguments.Named("icon")
|
||||||
|
rem rem iconoffset = Wscript.Arguments.Named("iconoffset")
|
||||||
|
rem rem icon = icon & ", " & iconoffset
|
||||||
|
icon = wshell.ExpandEnvironmentStrings("%icon%")
|
||||||
|
rem wscript.echo "icon: " & icon
|
||||||
|
lnk.IconLocation = icon
|
||||||
|
rem rem lnk.IconLocation = "%LOCALAPPDATA%\lxss\bash.ico"
|
||||||
|
rem lnk.IconLocation = "%LOCALAPPDATA%\wsltty\wsl.ico"
|
||||||
|
|
||||||
|
rem Shorcut key:
|
||||||
|
rem lnk.HotKey = "ALT+CTRL+W"
|
||||||
|
|
||||||
|
rem Run:
|
||||||
|
rem lnk.WindowStyle = 1
|
||||||
|
|
||||||
|
rem Comment:
|
||||||
|
rem lnk.IconLocation = Wscript.Arguments.Named("desc")
|
||||||
|
rem lnk.Description = "WSLtty"
|
||||||
|
|
||||||
|
lnk.Save
|
||||||
|
wscript.echo "Created " & name
|
||||||
|
wscript.echo
|
Loading…
x
Reference in New Issue
Block a user