avhimkov
3/18/2017 - 9:57 AM

SCHTASKS loop Delete.bat

\\11.0.0.31
\\11.0.0.32
\\11.0.0.33
\\11.0.0.34
\\11.0.0.35
\\11.0.0.39
\\192.168.10.31
\\192.168.10.167
\\192.168.10.13
\\192.168.10.124
\\192.168.10.127
\\192.168.10.32
\\192.168.10.101
\\192.168.10.102
\\192.168.10.103
\\192.168.10.104
\\192.168.10.105
\\192.168.10.106
\\192.168.10.107
\\192.168.10.120
@echo off
set listfile=hostSR.txt
for /f "tokens=1" %%i in (%listfile%) DO (
echo SOKOK Task %%i
copy /y "C:\install\SOKOK.msi" "%%i\C$\install\"
copy /y "C:\install\Sokok.bat" "%%i\C$\install\"
SCHTASKS /Create /S %%i /SC ONLOGON /TN sokok /TR "C:\install\Sokok.bat" /RU System /RP)
pause
@echo off
set listfile=hostSR.txt
for /f "tokens=1" %%i in (%listfile%) DO (
echo PVD Task %%i
copy /y "C:\install\cadesplugin.exe" "%%i\System$\install\"
SCHTASKS /Create /S %%i /SC ONLOGON /TN CProPlugin /TR "C:\install\cadesplugin.exe -silent" /RU System /RP)
pause
@echo off
set listfile=hostSR.txt
for /f "tokens=1" %%i in (%listfile%) DO (
echo PVD %%i
copy /y "C:\install\PVD_S.bat" "%%i\C$\install"
copy /y "C:\install\hide_PVD.vbs" "%%i\C$\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup\hide_PVD.vbs")
pause
@echo off
set listfile=hostLN.txt
for /f "tokens=1" %%i in (%listfile%) DO (
echo PVD %%i
SCHTASKS /Create /S %%i /SC ONCE /ST 16:40 /TN MSU /TR "C:\install\Install_MSU.bat" /RU System /NP)
pause
@echo off
set listfile=hostLN.txt
for /f "tokens=1" %%i in (%listfile%) DO (
echo PVD %%i
copy /y "C:\install\PVD_S.bat" "%%i\System$\install"
SCHTASKS /Create /S %%i /SC ONLOGON /TN PVD /TR "C:\install\hide_PVD.vbs" /RU System /RP)
pause
@echo off
set listfile=hostLN.txt
for /f "tokens=1" %%i in (%listfile%) DO (
echo PVD %%i
copy /y "C:\install\PVD_S.bat" "%%i\System$\install"
SCHTASKS /Create /S %%i /SC ONLOGON /TN PVD /TR "C:\install\hide_PVD.vbs" /RU System /RP)
pause
@echo off
set listfile=hostLN.txt
for /f "tokens=1" %%i in (%listfile%) do call :procedure %%i
:procedure
::SCHTASKS /Create /S %1 /U MFC-LYANTOR\AvhimkovDL /P SpiritLe[ghthbq1 /SC ONLOGON /TN Tetst /TR "C:\1" /RU MFC-LYANTOR\AvhimkovDL /RP
SCHTASKS /Create /S %1 /SC ONLOGON /TN CProPlugin /TR "C:\install\cadesplugin.exe -silent" /RU MFC-LYANTOR\AvhimkovDL /RP
echo %1
::SCHTASKS /Create /S %1  /SC ONCE /ST 11:00 /TN RenameLAN /TR "C:\install\hide_LAN.vbs" /RU MFC-LYANTOR\AvhimkovDL
pause
@echo off
set listfile=hostLN.txt
for /f "tokens=1" %%i in (%listfile%) DO (
echo PVD Task %%i
SCHTASKS /Create /S %%i /SC ONLOGON /TN Xerox /TR "C:\install\Xerox3550Scaner.bat" /RU MFC-LYANTOR\AvhimkovDL /RP)
pause
@echo off
set listfile=hostLNmegved.txt
for /f "tokens=1" %%i in (%listfile%) DO (
echo PVD Task %%i
SCHTASKS /Create /S %%i /SC ONLOGON /TN Xerox /TR "C:\install\Xerox3550Scaner.bat" /RU MFC-LYANTOR\AvhimkovDL /RP)
pause
@echo off
set listfile=hostLN.txt
for /f "tokens=1" %%i in (%listfile%) DO (
echo PVD Task %%i
schtasks /query /s %%i /fo list /v /tn "PVD-VS")
pause
@echo off
set listfile=hostSR.txt
for /f "tokens=1" %%i in (%listfile%) DO (
echo PVD Task %%i
schtasks /query /s %%i /fo list /v /tn "PVD")
pause
schtasks /query /s 192.168.10.101 /fo list /v /tn "PVD"
schtasks /query /s 192.168.10.102 /fo list /v /tn "PVD-VS"
schtasks /query /s 192.168.10.103 /fo list /v /tn "PVD-VS"
schtasks /query /s 192.168.10.104 /fo list /v /tn "PVD-VS"
schtasks /query /s 192.168.10.105 /fo list /v /tn "PVD-VS"
schtasks /query /s 192.168.10.106 /fo list /v /tn "PVD-VS"
schtasks /query /s 192.168.10.107 /fo list /v /tn "PVD-VS"
schtasks /query /s 192.168.10.109 /fo list /v /tn "PVD-VS"
pause
@echo off
set listfile=hostSR.txt
for /f "tokens=1" %%i in (%listfile%) DO (
echo PVD Task %%i
SCHTASKS /Create /S %%i /SC ONLOGON /TN PVD /TR "C:\install\PVD.exe /VERYSILENT" /RU MFC-LYANTOR\AvhimkovDL /RP)
pause
@echo off
set listfile=hostLN.txt
for /f "tokens=1" %%i in (%listfile%) DO (
echo IFCPlugin Task %%i
copy /y "C:\install\IFCPlugin-x64.msi" "%%i\System$\install\"
SCHTASKS /Create /S %%i  /SC ONLOGON /TN IFCPlugin /TR "C:\install\IFCPlugin-x64.msi /quiet" /RU System /RP)
pause
@echo off
set listfile=hostLN.txt
for /f "tokens=1" %%i in (%listfile%) DO (
echo PVD Task %%i
SCHTASKS /Create /S %%i /SC ONLOGON /TN IE_def /TR "C:\install\IE_def.bat" /RU MFC-LYANTOR\AvhimkovDL /RP)
pause
@echo off
set listfile=hostLN.txt
for /f "tokens=1" %%i in (%listfile%) do (
echo delete PVD %%i
schtasks /delete /S %%i /tn PVD /f)
pause