Okay.
I was playing with VBscript... Saved my .vbs and recieved a virus warning.
Be careful with this one!
It is reported as: 'Medium Severity' by Microsoft Security Essentials. Lol.
I'm trying to send keystrokes via a for loop from a text file.
Code: Select all
@ECHO OFF
FOR /F "delims=" %%A IN (message.txt) DO Call :Viral %%A
:viral
(
echo Set Text = Wscript.CreateObject^("WScript.Shell"^)
echo Do
echo Wscript.Sleep 1000
echo Text.Sendkeys "%~1"
echo Loop
)>"Virus.vbs"
Start Notepad.exe
Virus.vbs
Pause
I would like each line from message.txt, sent in turn to the Sendkeys api (Notepad window)
NOTE: Wscript.Sleep 1000 = 1 second interval
Increase this delay or have another batch file watch for instances of wscript.exe (Beforehand) e.g
Code: Select all
@echo off
:top
cls
wmic process where name="wscript.exe" delete
timeout /t 10
goto top
I should probably recommend that you close any important windows & save your work.
Thanks.