mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-11-11 04:48:44 +03:00
24 lines
491 B
Batchfile
24 lines
491 B
Batchfile
@echo off
|
|
|
|
set USAGE=Usage: %0 source name-on-desktop
|
|
|
|
if [%1] == [] (
|
|
echo %USAGE%
|
|
exit 1
|
|
)
|
|
if [%2] == [] (
|
|
echo %USAGE%
|
|
exit 2
|
|
)
|
|
|
|
set SCRIPT="%TEMP%\%RANDOM%-%RANDOM%-%RANDOM%-%RANDOM%.vbs"
|
|
|
|
echo Set oWS = WScript.CreateObject("WScript.Shell") >> %SCRIPT%
|
|
echo sLinkFile = "%USERPROFILE%\Desktop\%2.lnk" >> %SCRIPT%
|
|
echo Set oLink = oWS.CreateShortcut(sLinkFile) >> %SCRIPT%
|
|
echo oLink.TargetPath = %1 >> %SCRIPT%
|
|
echo oLink.Save >> %SCRIPT%
|
|
|
|
cscript /nologo %SCRIPT%
|
|
del %SCRIPT%
|