Olá,
Recentemente meu primo precisou um Visual Basic Script que verifica se um processo está executando e caso esteja envie um e-mail. Ele me pediu ajuda para criar este script e eu resolvi ajudar.
Visual Basic Script para verificação de processo em execução e notificação via E-mail.
Verificar se um processo está em execução com Visual Basic Script e mostrar uma janela se estiver.
[code lang=”vb”]
set service = GetObject (“winmgmts:”)
for each Process in Service.InstancesOf (“Win32_Process”)
If Process.Name = processName then
wscript.echo “Notepad running”
wscript.quit
End If
next
[/code]
Enviar e-mail utilizando Visual Basic Script:
[code lang=”vb”]
Const username = “SENHA”
Const password = “PASSWORD”
Const smtpServer = “smtp.gmail.com”
Const port = 465
Const secure = True
Const userFrom = “FROM”
Const userTo = “TO”
Const emailSubject = “Subject”
Const emailText = “Text”
‘== CODE ==
Const cdoSendUsingPickup = 1 ‘Send message using the local SMTP service pickup directory.
Const cdoSendUsingPort = 2 ‘Send the message using the network (SMTP over the network).
Const cdoAnonymous = 0 ‘Do not authenticate
Const cdoBasic = 1 ‘basic (clear-text) authentication
Const cdoNTLM = 2 ‘NTLM
Set objMessage = CreateObject(“CDO.Message”)
objMessage.Subject = emailSubject
objMessage.From = userFrom
objMessage.To = userTo
objMessage.TextBody = emailText
‘==This section provides the configuration information for the remote SMTP server.
objMessage.Configuration.Fields.Item _
(“http://schemas.microsoft.com/cdo/configuration/sendusing”) = 2
‘Name or IP of Remote SMTP Servesr
objMessage.Configuration.Fields.Item _
(“http://schemas.microsoft.com/cdo/configuration/smtpserver”) = smtpServer
‘Type of authentication, NONE, Basic (Base64 encoded), NTLM
objMessage.Configuration.Fields.Item _
(“http://schemas.microsoft.com/cdo/configuration/smtpauthenticate”) = cdoBasic
‘Your UserID on the SMTP server
objMessage.Configuration.Fields.Item _
(“http://schemas.microsoft.com/cdo/configuration/sendusername”) = username
‘Your password on the SMTP server
objMessage.Configuration.Fields.Item _
(“http://schemas.microsoft.com/cdo/configuration/sendpassword”) = password
‘Server port (typically 25)
objMessage.Configuration.Fields.Item _
(“http://schemas.microsoft.com/cdo/configuration/smtpserverport”) = port
‘Use SSL for the connection (False or True)
objMessage.Configuration.Fields.Item _
(“http://schemas.microsoft.com/cdo/configuration/smtpusessl”) = secure
‘Connection Timeout in seconds (the maximum time CDO will try to establish a connection to the SMTP server)
objMessage.Configuration.Fields.Item _
(“http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout”) = 60
objMessage.Configuration.Fields.Update
objMessage.Send
[/code]
Estes dois scripts foram mesclados para realizar o que precisávamos.
Abraços,
Matheus
Referencias:
http://wiki.imacros.net/send-email.vbs
http://www.techimo.com/forum/applications-operating-systems/117464-need-vbulletin-script-check-see-if-process-running.html
casino mit telefon bezahlen
Feel free to visit my web page poker online um geld spielen
top biggest win on online casino pokies and casinos
australian deals, free spin casinos united kingdom and is playing poker for money
illegal usa, or casino in montreal united states
Эта статья освещает различные аспекты освобождения от зависимости и пути к выздоровлению. Мы обсуждаем важность осознания своей проблемы и обращения за помощью. Читатели получат практические советы о том, как преодолевать трудности и строить новую жизнь без зависимости.
Жми сюда — получишь ответ – [url=https://goagetaway.com/page/lechenie-alkogolizma-chto-eto-takoe-i-kogda-ono-neobhodimo]Частная наркологическая клиника[/url]
free spins no deposit casinos nz, best casinos in south united states and
uk casino free bonus, or Gambling Group commission usa
75 casino cashlib ab 30 euro einzahlen freispiele
star888 apk [url=https://888-uz7.com/apk]https://888-uz7.com/apk/[/url]
online casino 150 euro mindesteinzahlung
My web blog :: spielhalle mit alten automaten (Mkms.co.nz)
joker online casino canada, legitimate online casino in canada and united kingdom online casino no deposit
bonus codes 2021, or united statesn casino guide coupons
Stop by my web-site gambling too much take away cards
goede wedden op ijshockey, Meridith, virtual 2026
welches online casino gewinnt man am meisten
Feel free to surf to my blog post … Casinos Mit 5 Euro
Einzahlung Und Bonus [https://Alvasnaplo.Hu]
barca madrid como funcionan los handicaps en apuestas (Larry)
sportwetten öSterreich bonus tipps kostenlos
método Sites De apostas Promocoes desportivas
spielautomaten revolut einzahlung
Visit my page – Casino SofortüBerweisung Mindesteinzahlung
The league standings are always accurate.
scandalo scommesse tutti i nomi
Look at my webpage: quote vincente campionato italiano
was sind kombiwetten
Check out my web site :: wettanbieter ohne lugas mit paysafecard
siti online scommesse nuovo papa
snai
foro casas de pagar apuestas con paypal; https://Es-Betting.com/,