Modify the code below, the new modification should allow the code to mail the word…
- User
Modify the code below, the new modification should allow the code to mail the word “RUN!” utilizing microsoft outlook or google email to do so. (The code must be non malicious, and most not send versions of itself through email.) (this is merely a demonstration to show an example of what .vbs can do, such as sending emails without having to manually write them.)
Dim counter, pad counter = 0 strMessage = “RUN!!!”
'Open 10 notepads with “RUN!!!” in them Do Until counter = 10 Set pad = CreateObject(“WScript.Shell”) pad.Run(“notepad”) WScript.Sleep 1000 'wait for the notepad to open pad.SendKeys strMessage counter = counter + 1 Loop
'Set background color to dark red Set oShell = CreateObject(“WScript.Shell”) oShell.RegWrite “HKCU\Control Panel\Colors\Background”, “64 00 00”
'Beep continuously until the script is terminated from the Task Manager Do While True For i = 1 To 5 'Beep 5 times Beep WScript.Sleep 1000 Next If CheckTaskManager() = False Then Exit Do End If Loop
'Reset background color to default oShell.RegDelete “HKCU\Control Panel\Colors\Background”
Function Beep() dim objShell Set objShell = Wscript.CreateObject(“Wscript.Shell”) objShell.Run “CMD /C ““Echo vbTab & Chr(7)”””, 0, True End Function
Function CheckTaskManager() Set wmi = GetObject(“winmgmts:” & “{impersonationLevel=impersonate}!.\root\cimv2”) Set ProcessList = wmi.ExecQuery(“SELECT * FROM Win32_Process”) For Each Process In ProcessList If InStr(Process.Name, “wscript.exe”) And InStr(Process.CommandLine, WScript.ScriptFullName) Then CheckTaskManager = True Exit Function End If Next CheckTaskManager = False End Function
- Assistant