Don't like ads? PRO users don't see any ads ;-)
Guest

Routine.bat Anti Virus

By: a guest on Jun 9th, 2012  |  syntax: DOS  |  size: 19.75 KB  |  hits: 38  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. @echo off
  2. Setlocal EnableDelayedExpansion
  3. title Routine tests for killing viruses
  4. pushd "%userprofile%\Desktop"
  5.  
  6. REM **********************************************************
  7. REM * Scans some registry keys and other directories on the  *
  8. REM * system and saves their content into "Routine.log" on   *
  9. REM * the desktop.                                           *
  10. REM * This file can be analyzed after the scan or sent to an *
  11. REM * expert.                                                *
  12. REM **********************************************************
  13.  
  14.  
  15.  
  16. REM Change the following value to "0" to skip installed programs.
  17. REM --- This setting keeps your privacy, but it is less safe and
  18. REM     is not recommended.
  19. set ScanPrograms=1
  20. mode con cols=200 lines=200
  21. Echo          `...`   `.....`         `....`                                                            
  22. Echo         `/NNN/   yNNNNms.       /dNNNNy.                                                          
  23. Echo        `/NMN/  `hNMNNMmo      -dMNNMMd-                                                          
  24. Echo        `/NMN/  `hNMhyNMd:    `hMNsyNMd-                                                          
  25. Echo        `/NMN/  `hNMy/sMMd.  `yNMy:oNMd-                                                          
  26. Echo        `/NMN/  `hNMy--hMNy` +NMd:`oNMd-                                                          
  27. Echo        `/NMN/  `hNMy-`/mMN+-NMN/``oNMd-                                                          
  28. Echo        `/NMN/  `hNMy- .oMMNdMNo` `oNMd-                                                          
  29. Echo        `/NMN/  `hNMy-  .yMMMMy.  `oNMd-                                                          
  30. Echo        `/NMN/  `yNMs.   -mMMm-   `oNNh.                                                          
  31. Echo         `...`   `..`     ...`     `...
  32. Echo         `----.     `.--.        `.--`                  
  33. Echo                                                   .oNMMMh.    -yNMd:      `omMd/                  
  34. Echo                                                  `/mMmmMMo`    :dMNh`     :dMNs`                  
  35. Echo                                                  -hMm//NMN/`   `+NMN+    `sNMy-                  
  36. Echo                                                 .oNNs``sMMd-    .yMMd.   /mMd/                    
  37. Echo                                                `+mMh-  -mMMs.    :mMMo  .hMNo`                    
  38. Echo                                                :dMMmhhhhNMMN/`   `+MMN-`sNMy-                    
  39. Echo                                               .yMMNmmmmmmNMMh:    .yMMh+mMd:                      
  40. Echo                                               oNMd:      -dMMy-    -NMMMMN+`                      
  41. Echo                                              -hNmo`       smNm+    `+NNNNy.                      
  42. Echo                                              `...`        `...`     `....`
  43. Echo  Protect for viruss.    Save some time.
  44. Echo.
  45. Echo.
  46. echo Press any key to start the scan...
  47. pause >nul
  48.  
  49.  
  50.  
  51. echo Identifying OS...
  52. echo Routine inspection for %username% from %computername% 1>Routine.log
  53.  
  54. :: Checks if reg.exe exists
  55. FOR /F "delims=" %%A IN ("reg.exe") DO if not exist "%%~$PATH:A" set SkipRegistry=1
  56. if "%SkipRegistry%" == "1" goto :AlternativeOSIdentification
  57.  
  58. :: Identifies operating system
  59.         :: reg.exe only exists since Windows XP. If it does, the OS will be saved into a variable.
  60.         :: eula.txt exists in Windows XP Professional.
  61.         if exist "%SystemRoot%\system32\eula.txt" set /p OpSys=<%SystemRoot%\system32\eula.txt
  62.         FOR /F "tokens=1,2,*" %%A IN ('"reg query "HKLM\Software\Microsoft\Windows NT\CurrentVersion" | findstr "CurrentVersion CurrentBuildNumber CSDVersion ProductName" | findstr /V "HKEY""') DO (
  63.                 if not exist "%SystemRoot%\system32\eula.txt" ^
  64.                 if "%%A" == "ProductName"        set OpSys=%%C
  65.                 if "%%A" == "CurrentVersion"     set OpSys=!OpSys![%% class="re2">C
  66.                 if "%%A" == "CurrentBuildNumber" set OpSys=!OpSys! %% class="re2">C]
  67.                 if "%%A" == "CSDVersion"         set OpSys=!OpSys! %% class="re2">C
  68.         )
  69.         :: Only saves "XP" or "Vista" or "7"
  70.         echo !OpSys! | findstr "XP"    >nul 2>nul && set System=XP
  71.         echo !OpSys! | findstr "Vista" >nul 2>nul && set System=Vista
  72.         echo !OpSys! | findstr "7"     >nul 2>nul && set System=7
  73.         echo Operating system: !OpSys! 1>>Routine.log
  74. echo.
  75. echo.
  76. goto :AfterOSIdentification
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83. :AlternativeOSIdentification
  84.         :: Checks if the "systeminfo" exists
  85.         :: --- If not, the identification of the Operating System is skipped.
  86.         ::     This way, a few functions that can be advantageous might not work.
  87.         systeminfo /? >nul 2>nul || set NoSystemInfo=1
  88.  
  89.  
  90.  
  91.  
  92.         :: Identify Operating System
  93.         if "%NoSystemInfo%" == "1" goto :AfterOSIdentification
  94.         FOR /F "tokens=2 delims=:" %%A IN ('systeminfo 2^>nul^|find "Microsoft Windows "') DO FOR /F "tokens=3 delims= " %%B IN ("%%A") DO set System=%%B
  95.         if "%System%" == "2000" set System=XP
  96.         if "%System%" == "NT" set System=XP
  97.  
  98.  
  99.         :SkipOSIdentification
  100.         if not defined System set System=Vista
  101.  
  102.         echo.
  103.         echo.
  104.  
  105.  
  106.  
  107.         :: Identifies Operating System and its version for later analysis
  108.         :: --- In case of having found sth., it writes the information into "Routine.log"
  109.         :: --- "setlocal enabledelayedexpansion" creates an inner room for more detailed
  110.         ::     variables. Now they can be used inside of parantheses, too.
  111.         :: --- "endlocal" closes this room. All set variables in this room are reset.
  112.         setlocal enabledelayedexpansion
  113.                 set Counter=0
  114.                 FOR /F "skip=1 tokens=1,* delims=: " %%A IN ('systeminfo 2^>nul') DO (
  115.                         set /a Counter=!Counter! + 1
  116.                         if "!Counter!" == "2" set Name=%%B
  117.                         if "!Counter!" == "3" set Name=!Name! %% class="re2">B
  118.                 )
  119.                 echo Operating system: !Name! 1>>Routine.log
  120.         endlocal
  121. :: End of AlternativeOSIdentification
  122.  
  123.  
  124.  
  125. :AfterOSIdentification
  126. :: Scanning currently running processes
  127. echo ===========================================================>>Routine.log
  128. echo Searching processes...
  129. echo Running processes>>Routine.log
  130. echo ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯>>Routine.log
  131. :: Checks if the TASKLIST-command exists
  132. FOR /F "delims=" %%A IN ("tasklist.exe") DO if exist "%%~$PATH:A" tasklist /NH|sort>>Routine.log
  133. find ".exe" "Routine.log" >nul 2>nul || echo No process list available.>>Routine.log
  134. echo.>>Routine.log
  135. echo.>>Routine.log
  136. echo ===========================================================>>Routine.log
  137.  
  138.  
  139.  
  140. :: Listing services
  141. :: --- Safe services and system-critical services from Microsoft are left out (see the many IF-commands)
  142. setlocal EnableDelayedExpansion
  143.         set Counter=1
  144.  
  145.         echo Searching running services...
  146.         echo Running services>>Routine.log
  147.         echo ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯>>Routine.log
  148.        
  149.         pushd "%temp%"
  150.         sc query type= service>Routine_Services.tmp
  151.         FOR /F "tokens=1,2 delims=:" %%A IN (Routine_Services.tmp) DO (
  152.                 set Service=%%B
  153.                 set Service=!Service:~1,-1!!Service:~-1,1!
  154.                 if "%%A" == "SERVICE_NAME" if not "!Service!" == "AntiVirSchedulerService" if not "!Service!" == "AntiVirService" if not "!Service!" == "AudioSrv" if not "!Service!" == "AVM WLAN Connection Service" if not "!Service!" == "BITS" if not "!Service!" == "CiSvc" if not "!Service!" == "ClipSrv" if not "!Service!" == "CryptSvc" if not "!Service!" == "DcomLaunch" if not "!Service!" == "Dhcp" if not "!Service!" == "dmserver" if not "!Service!" == "Dnscache" if not "!Service!" == "Eventlog" if not "!Service!" == "EventSystem" if not "!Service!" == "FastUserSwitchingCompatibility" if not "!Service!" == "HidServ" if not "!Service!" == "HTTPFilter" if not "!Service!" == "LmHosts" if not "!Service!" == "Netman" if not "!Service!" == "Nla" if not "!Service!" == "PlugPlay" if not "!Service!" == "ProtectedStorage" if not "!Service!" == "RpcSs" if not "!Service!" == "SamSs" if not "!Service!" == "Schedule" if not "!Service!" == "SENS" if not "!Service!" == "ShellHWDetection" if not "!Service!" == "Spooler" if not "!Service!" == "srservice" if not "!Service!" == "SSDPSRV" if not "!Service!" == "STacSV" if not "!Service!" == "stisvc" if not "!Service!" == "TermService" if not "!Service!" == "Themes" if not "!Service!" == "TrkWks" if not "!Service!" == "UMWdf" if not "!Service!" == "vsmon" if not "!Service!" == "W32Time" if not "!Service!" == "WebClient" if not "!Service!" == "winmgmt" (
  155.                         set Service!Counter!=%% class="re2">B
  156.                         set CopyServiceName=1
  157.                 )
  158.                 if "%%A" == "DISPLAY_NAME" if "!CopyServiceName!" == "1" (
  159.                         set Display!Counter!=%% class="re2">B
  160.                         set CopyServiceName=0
  161.                         set /a Counter=!Counter! + 1
  162.                 )
  163.         )
  164.  
  165.         :: Temporary file is removed and the batchfile returns back to desktop
  166.         del /F Routine_Services.tmp >nul 2>nul
  167.         popd
  168.  
  169.         set /a Counter=!Counter! - 1
  170.  
  171.         :: Improving overview in Routine.log
  172.         :: %%L = Line
  173.         :: %%P = Path to the executable file
  174.         :: %%S = Space (add)
  175.         FOR /L %%L IN (1,1,!Counter!) DO (
  176.                 set Service%%L=!Service%% class="re2">L:~1!
  177.                 FOR /F "tokens=1* delims=:" %%O IN ('SC qc "!Service%% class="re2">L!" ^| find "BINARY_PATH_NAME"') DO set Filepath%%L=%%P
  178.                 set Filepath%%L=!Filepath%% class="re2">L:~1!
  179.                 FOR /L %%S IN (0,1,14) DO if "!Service%% class="re2">L:~%%S,1!" == "" set Service%%L=!Service%% class="re2">L!
  180.                 FOR /L %%S IN (0,1,39) DO if "!Display%% class="re2">L:~%%S,1!" == "" set Display%%L=!Display%% class="re2">L!
  181.         )
  182.         :: Adds the services to Routine.log in format "Service name : Display name of the service"
  183.         FOR /L %%L IN (1,1,!Counter!) DO echo !Service%% class="re2">L! : !REG3XP0!>!Display%% class="re2">L! ---^> "!Filepath%% class="re2">L!">>Routine.log
  184.         echo.>>Routine.log
  185.         echo.>>Routine.log
  186.         echo ===========================================================>>Routine.log
  187. endlocal
  188.  
  189.  
  190. echo --------
  191.  
  192.  
  193. :: Start of scanning registry startup keys
  194. :: --- "HKLM" means "Hkey_Local_Machine". It stands for all users on the computer.
  195. :: --- "HKCU" means "Hkey_Current_User". it stands for the current user.
  196. ::     --- Both of them have got an own, seperated startup key
  197.  
  198. :: Checks if the REG-command exists
  199. if "%SkipRegistry%" == "1" goto :SkipRegistry
  200.  
  201. echo Searching Internet Explorer start page...
  202. echo IE start page>>Routine.log
  203. echo ¯¯¯¯¯¯¯¯¯¯¯¯¯>>Routine.log
  204. FOR /F "tokens=3*" %%A IN ('reg query "HKLM\Software\Microsoft\Internet Explorer\Main" /v "Start Page" 2^>nul ^| findstr /C:"Start Page"') DO echo %%B 1>>Routine.log
  205. echo.>>Routine.log
  206. echo.>>Routine.log
  207. echo ===========================================================>>Routine.log
  208.  
  209. echo Searching HKLM-Startup...
  210. echo HKLM\Run>>Routine.log
  211. echo ¯¯¯¯¯¯¯¯>>Routine.log
  212. FOR /F "skip=3 delims=" %%A IN ('reg query "HKLM\Software\Microsoft\Windows\CurrentVersion\Run" 2^>nul') DO echo %%A>>Routine.log
  213. echo.>>Routine.log
  214. echo.>>Routine.log
  215. echo ===========================================================>>Routine.log
  216. echo HKLM\RunOnce>>Routine.log
  217. echo ¯¯¯¯¯¯¯¯¯¯¯¯>>Routine.log
  218. echo Searching HKLM-Startup-Once...
  219. FOR /F "skip=3 delims=" %%A IN ('reg query "HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnce" 2^>nul') DO echo %%A>>Routine.log
  220. echo.>>Routine.log
  221. echo.>>Routine.log
  222. echo ===========================================================>>Routine.log
  223. echo HKCU\Run>>Routine.log
  224. echo ¯¯¯¯¯¯¯¯>>Routine.log
  225. echo Searching HKCU-Startup...
  226. FOR /F "skip=3 delims=" %%A IN ('reg query "HKCU\Software\Microsoft\Windows\CurrentVersion\Run" 2^>nul') DO echo %%A>>Routine.log
  227. echo.>>Routine.log
  228. echo.>>Routine.log
  229. echo ===========================================================>>Routine.log
  230. echo HKCU\RunOnce>>Routine.log
  231. echo ¯¯¯¯¯¯¯¯¯¯¯¯>>Routine.log
  232. echo Searching HKCU-Startup-Once...
  233. FOR /F "skip=3 delims=" %%A IN ('reg query "HKCU\Software\Microsoft\Windows\CurrentVersion\RunOnce" 2^>nul') DO echo %%A>>Routine.log
  234. echo.>>Routine.log
  235. echo.>>Routine.log
  236. echo ===========================================================>>Routine.log
  237. echo Windows Shell>>Routine.log
  238. echo ¯¯¯¯¯¯¯¯¯¯¯¯¯>>Routine.log
  239. echo Searching Windows Shell...
  240. FOR /F "tokens=2*" %%A IN ('reg query "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" /v Shell 2^>nul ^| findstr /C:"Shell"') DO echo %%B 1>>Routine.log
  241. echo.>>Routine.log
  242. echo.>>Routine.log
  243. echo ===========================================================>>Routine.log
  244.  
  245.  
  246.  
  247.  
  248. echo --------
  249.  
  250. :: Check for programs that are prevented from running by redirecting them onto another program
  251. :: echo "ProgramToPrevent" ---> "ProgramInstead">>Routine.log
  252. echo Image File Execution Options>>Routine.log
  253. echo ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯>>Routine.log
  254. echo.>>Routine.log
  255. echo Searching Programstart-Redirections...
  256. FOR /F "delims=" %%A IN ('reg query "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options" ^| findstr /I /V "dll"') DO FOR /F "skip=4 tokens=2*" %%B IN ('reg query "%%A" /v Debugger 2^>nul') DO if not "%%~nxA" == "Your Image File Name Here" if not "%%~nxA" == "Your Image File Name Here without a path" echo "%%~nxA" ---^> "%%C">>Routine.log
  257.  
  258. echo.>>Routine.log
  259. echo.>>Routine.log
  260. echo ===========================================================>>Routine.log
  261.  
  262.  
  263. :SkipRegistry
  264. if "%SkipRegistry%" == "1" echo THE REGISTRY HAS BEEN SKIPPED DUE TO LACK OF COMMANDS.>>Routine.log
  265. echo.>>Routine.log
  266. echo.>>Routine.log
  267. echo ===========================================================>>Routine.log
  268.  
  269.  
  270. :: End of scanning the registry
  271. echo --------
  272. :: Start of scanning startup folders
  273.  
  274.  
  275. :: Parts of the path that are written with "~1" are shortnames. These names consist
  276. :: of eight letters at last. They are used for the START-command and in case you are
  277. :: not quite sure about a folder's name.
  278. :: --- More about shortnames in the Batch-dictionary.
  279. :: The FOR-commands copy the targets of the shortcuts.
  280.  
  281. echo User\Startup>>Routine.log
  282. echo ¯¯¯¯¯¯¯¯¯¯¯¯>>Routine.log
  283. echo.>>Routine.log
  284. echo Searching startup directory in start menu of the current user...
  285. if "%System%" == "XP" set StartupKey=%userprofile%\Startm~1\Progra~1\Startup
  286. if "%System%" == "Vista" set StartupKey=%userprofile%\AppData\Roaming\Microsoft\Windows\Startm~1\Progra~1\Startup
  287. if "%System%" == "7" set StartupKey=%appdata%\Microsoft\Windows\Start Menu\Progra~1\Startup
  288. FOR /F "delims=" %%A IN ('dir /A /B /S "!StartupKey!"') DO (
  289.         echo %%A>>Routine.log 2>nul
  290.         if "%%~xA" == ".lnk" FOR /F "skip=3 delims=" %%L IN ('find ":\" "%%A"') DO echo ---^> %%L>>Routine.log
  291. )
  292. echo.>>Routine.log
  293. echo.>>Routine.log
  294. echo ===========================================================>>Routine.log
  295.  
  296. echo All Users\Startup>>Routine.log
  297. echo ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯>>Routine.log
  298. echo.>>Routine.log
  299. echo Searching startup directory in start menu of all users...
  300. if "%System%" == "XP" set StartupKey=%allusersprofile%\Startm~1\Progra~1\Startup
  301. if "%System%" == "Vista" set StartupKey=%ProgramData%\Microsoft\Windows\Startm~1\Progra~1\Startup
  302. if "%System%" == "7" set StartupKey=%ProgramData%\Microsoft\Windows\Start Menu\Progra~1\Startup
  303. FOR /F "delims=" %%A IN ('dir /A /B /S "!StartupKey!"') DO (
  304.         echo %%A>>Routine.log 2>nul
  305.         if "%%~xA" == ".lnk" FOR /F "skip=3 delims=" %%L IN ('find ":\" "%%A"') DO echo ---^> %%L>>Routine.log
  306. )
  307. echo.>>Routine.log
  308. echo.>>Routine.log
  309. echo ===========================================================>>Routine.log
  310.  
  311. if "%System%" == "XP" (
  312.         (echo Systemprofile\Startup>>Routine.log)
  313.         (echo ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯>>Routine.log)
  314.         echo Searching startup directory in the systemprofile...
  315.         set StartupKey=%SystemRoot%\system32\config\systemprofile\Startm~1\Progra~1\Startup
  316. FOR /F "delims=" %%A IN ('dir /A /B /S "!StartupKey!"') DO (
  317.         echo %%A>>Routine.log 2>nul
  318.         if "%%~xA" == ".lnk" FOR /F "skip=3 delims=" %%L IN ('find ":\" "%%A"') DO echo ---^> %%L>>Routine.log
  319. )
  320.         (echo.>>Routine.log)
  321.         (echo.>>Routine.log)
  322.         (echo ===========================================================>>Routine.log)
  323. ) ELSE (
  324.         (echo No systemprofile existing.>>Routine.log)
  325.         (echo ===========================================================>>Routine.log)
  326. )
  327. if exist "%SystemDrive%\Autoexec.bat" (
  328.         (echo Autoexec.bat>>Routine.log)
  329.         (echo ¯¯¯¯¯¯¯¯¯¯¯¯>>Routine.log)
  330.         echo Searching "%SystemDrive%\Autoexec.bat"...
  331.         type "%SystemDrive%\Autoexec.bat">>Routine.log
  332.         (echo.>>Routine.log)
  333.         (echo.>>Routine.log)
  334.         (echo ===========================================================>>Routine.log)
  335. ) ELSE (
  336.         (echo No Autoexec.bat existing.>>Routine.log)
  337.         (echo ===========================================================>>Routine.log)
  338. )
  339. echo.>>Routine.log
  340. echo.>>Routine.log
  341. echo ===========================================================>>Routine.log
  342.  
  343.  
  344. :: End of scanning startup folders
  345. echo --------
  346.  
  347.  
  348. :: Scanning the system drive for main folders and files
  349.  
  350. echo Systempartition\Main>>Routine.log
  351. echo ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯>>Routine.log
  352. echo Searching system drive for main folder and files...
  353. FOR /F "delims=" %%A IN ('dir /A /B /OGN "%SystemDrive%\"') DO echo %SystemDrive%\%%A>>Routine.log
  354. echo.>>Routine.log
  355. echo.>>Routine.log
  356. echo ===========================================================>>Routine.log
  357.  
  358.  
  359.  
  360.  
  361. :: Scanning temporary directories
  362.  
  363. echo TempDir>>Routine.log
  364. echo ¯¯¯¯¯¯¯>>Routine.log
  365. echo Searching temporary directories...
  366. dir /A /B /S "%temp%\*.exe" "%temp%\*.bat" "%temp%\*.cmd" "%temp%\*.nt" "%temp%\*.vbs">>Routine.log 2>nul
  367. echo.>>Routine.log
  368. echo.>>Routine.log
  369. echo ===========================================================>>Routine.log
  370.  
  371. echo SystemTempDir>>Routine.log
  372. echo ¯¯¯¯¯¯¯¯¯¯¯¯¯>>Routine.log
  373. echo Searching temporary Windows-directory for executables...
  374. dir /A /B /S "%SystemRoot%\Temp\*.exe" "%SystemRoot%\Temp\*.bat" "%SystemRoot%\Temp\*.cmd" "%SystemRoot%\Temp\*.nt" "%SystemRoot%\Temp\*.vbs">>Routine.log 2>nul
  375. echo.>>Routine.log
  376. echo.>>Routine.log
  377. echo ===========================================================>>Routine.log
  378. echo.>>Routine.log
  379. echo.>>Routine.log
  380. echo ===========================================================>>Routine.log
  381.  
  382.  
  383.  
  384. echo --------
  385.  
  386.  
  387. :: Scanning network settings
  388.  
  389. echo Hosts>>Routine.log
  390. echo ¯¯¯¯¯>>Routine.log
  391. echo Searching network settings in the Hosts-file...
  392. if exist "%SystemRoot%\system64" type "%SystemRoot%\system64\drivers\etc\hosts" | findstr /V "#">>Routine.log
  393. if exist "%SystemRoot%\system32" type "%SystemRoot%\system32\drivers\etc\hosts" | findstr /V "#">>Routine.log
  394. echo.>>Routine.log
  395. echo.>>Routine.log
  396. echo ===========================================================>>Routine.log
  397.  
  398.  
  399. echo Scheduled tasks>>Routine.log
  400. echo ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯>>Routine.log
  401. echo Searching scheduled tasks...
  402. dir /A /B /OGN /S "%SystemRoot%\tasks">>Routine.log 2>nul
  403. echo.>>Routine.log
  404. echo.>>Routine.log
  405. echo ===========================================================>>Routine.log
  406. echo.>>Routine.log
  407. echo.>>Routine.log
  408. echo ===========================================================>>Routine.log
  409.  
  410.  
  411. echo --------
  412.  
  413.  
  414. :: Scanning installed software for viruses
  415.  
  416. if "%ScanPrograms%" == "0" goto :SkipPrograms
  417.  
  418. echo %ProgramFiles%>>Routine.log
  419. echo ¯¯¯¯¯¯¯¯¯¯¯¯¯>>Routine.log
  420. echo.>>Routine.log
  421. echo Searching installed programs...
  422. FOR /F "delims=" %%A IN ('dir /A /B /OGN "%ProgramFiles%"') DO echo %ProgramFiles%\%%A>>Routine.log
  423. if "%System%" == "7" FOR /F "delims=" %%A IN ('dir /A /B /OGN "%ProgramFiles(x86)%"') DO echo %ProgramFiles(x86)%\%%A>>Routine.log
  424. echo.>>Routine.log
  425. echo.>>Routine.log
  426. echo ===========================================================>>Routine.log
  427.  
  428. echo ApplicationData>>Routine.log
  429. echo ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯>>Routine.log
  430. echo.>>Routine.log
  431. echo Searching application data...
  432. FOR /F "delims=" %%A IN ('dir /A /B /OGN "%AppData%"') DO echo %AppData%\%%A>>Routine.log
  433. :SkipPrograms
  434. if "%ScanPrograms%" == "0" echo THE PROGRAMS HAVE BEEN SKIPPED DUE TO THE USER.>>Routine.log
  435. echo.>>Routine.log
  436. echo.>>Routine.log
  437. echo ===========================================================>>Routine.log
  438.  
  439.  
  440.  
  441.  
  442. echo.
  443. echo.
  444. echo --------
  445. echo --------
  446. echo --------
  447. echo Scan finished.
  448. pause
  449. start Routine.log
  450. start https://sites.google.com/site/imantivirusllc/routineav/upload
  451. exit /b