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
cascading gokkasten online 5 gratis spins nederland
True Fortune casino has become a go-to online casino for many players in the United Kingdom.
Live blackjack, roulette and game shows are available at any time of day.
The promotions page lists reload bonuses, tournaments and cashback offers.
Adding funds takes just a moment and play begins straight away.
Player information is protected with encryption and strict data-handling standards.
Players can enjoy the full game library on mobile without installing an app.
truefortune casino bonus code [url=http://www.true-fortune-casino16.com/bonus]truefortune casino bonus code[/url]
онлайн школа для детей 8 класс [url=https://reckey.ru/stati/shkola-v-internete]онлайн школа для детей 8 класс[/url]
The official True Fortune casino has built a strong reputation with players across the United Kingdom.
Live blackjack, roulette and game shows are available at any time of day.
First-time players receive a welcome bonus plus free spins after signing up.
True Fortune supports popular payment methods including Visa, Mastercard and e-wallets like Skrill and Neteller.
All games run on certified random number generators for provably fair results.
A detailed FAQ and clear terms make it easy for players in the United Kingdom to find answers fast.
true fortune free 250 chip no deposit for existing players [url=http://www.true-fortune-casino27.com/bonus-codes-for-existing-players/]true fortune free 250 chip no deposit for existing players[/url]
11 классов сайт [url=https://reckey.ru/stati/shkola-v-internete]11 классов сайт[/url]
asiatische basketball über Unter wetten tore
wettquoten heute
Also visit my webpage Basketball wetten spread
mma odds sammenligning
Here is my webpage :: bookmaker (https://www.Gussas.de/warum-du-Darts-wetten-ausprobieren-solltest/)
The casino welcomes players from the United Kingdom with a localised experience and responsive support.
The live casino section brings authentic tables with professional dealers straight to any device.
Ongoing offers such as weekly cashback and reload deals keep the balance topped up.
Fast, transparent withdrawals mean winnings reach players without long delays.
Independent audits confirm the games are fair and payouts are genuine.
A detailed FAQ and clear terms make it easy for players in the United Kingdom to find answers fast.
true fortune casino [url=https://true-fortune-casino19.com/]true fortune casino[/url]
juegos de horaire Casino gujan mestras gratis sin registro ni descarga
wettprognosen
Here is my blog basketball spieler wetten –
Alyssa,
Designed with players in the United Kingdom in mind, the site keeps registration and play simple.
Live blackjack, roulette and game shows are available at any time of day.
Players enjoy recurring promotions including cashback and free spins on selected slots.
Fast, transparent withdrawals mean winnings reach players without long delays.
Certified RNG technology ensures every spin and hand is completely random.
True Fortune works seamlessly on smartphones and tablets straight from the browser.
true fortune free $250 chip no deposit [url=https://true-fortune-casino27.com/free-chips]true fortune free $250 chip no deposit[/url]
sázky na dostihy
Feel free to visit my homepage – přIhlášEní sazka
The site combines a huge game library with a clean, modern interface.
Progressive jackpots and top-rated new releases are highlighted in the casino lobby.
A loyalty programme rewards active players with points that convert into real bonuses.
The casino accepts a range of payment options familiar to players in the United Kingdom.
true fortune free spins [url=https://true-fortune-casino25.com/free-spins/]true fortune free spins[/url]
Responsible gambling tools let players set deposit limits, take breaks or self-exclude.
Customer support is available around the clock via live chat and email in English.
fotbal plzeň evropská liga
My web-site – dostihy a sázky junior dráčik
(Bernie)
casino zahraniční online casino bonus bez vkladu Praha
tarjeta roja en Marca Apuestas Codigo Promocional