21 lines
557 B
Batchfile
21 lines
557 B
Batchfile
@echo off
|
|
setlocal EnableExtensions
|
|
set "TARGET=%~dp0run_collector.vbs"
|
|
set "DESKTOP=%USERPROFILE%\Desktop"
|
|
set "LNK=%DESKTOP%\DouyinIMCollector.lnk"
|
|
|
|
powershell -NoProfile -ExecutionPolicy Bypass -Command ^
|
|
"$s=(New-Object -ComObject WScript.Shell).CreateShortcut('%LNK%');" ^
|
|
"$s.TargetPath='%TARGET%';" ^
|
|
"$s.WorkingDirectory='%~dp0';" ^
|
|
"$s.Description='Douyin IM Collector';" ^
|
|
"$s.Save()"
|
|
|
|
if exist "%LNK%" (
|
|
echo Desktop shortcut created: DouyinIMCollector
|
|
) else (
|
|
echo Failed. Double-click run_collector.vbs instead.
|
|
)
|
|
pause
|
|
endlocal
|