Ir ao conteúdo

Verificar se um processo está execução e notificar via e-mail no Windows

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

Publicado emwindows

2.860 Comentários

  1. Fantastic post however I was wanting to know if you could write a litte more on this topic?
    I’d be very thankful if you could elaborate a little bit more.

    Bless you!

  2. I’m amazed, I must say. Rarely do I encounter a blog that’s
    both educative and engaging, and without a doubt, you have hit the nail on the head.
    The problem is something that too few people are speaking intelligently about.

    I’m very happy that I found this in my hunt
    for something concerning this.

  3. australian online 918kiss casino download apk (Viola) bonus codes 2021, casino united kingdom chance and what
    is the most trusted online casino in united states, or
    united statesn online casino minimum deposit $10

  4. Whoa! This blog looks exactly like my old one!

    It’s on a totally different subject but it has pretty much
    the same page layout and design. Excellent choice of colors!

  5. It’s awesome to pay a visit this web page and reading the views
    of all mates about this article, while I am also eager of getting know-how.

  6. I’ve got to be honest, but the moment I started helping a friend inside a major sports organization, everything I thought I knew about modern sports completely collapsed.

    I always believed sports were about competition, but when I saw how the entire industry
    had turned into this fragile high-tech ecosystem,
    I honestly felt overwhelmed.

    What hit me hardest was realizing that cybercriminals weren’t going after “IT servers” anymore.
    They were attacking everything — live match stats. One breach, and millions
    could be lost instantly.

    And the scariest part?
    I saw it with my own eyes.

    One day, during a routine check, someone mentioned how a manipulated data
    feed caused chaos in betting markets. That was the moment I understood how thin the line really is between order and total digital disaster.

    But the real shock came when I looked deeper into betting platforms.

    I swear, I always thought they were just websites.
    But no.
    They are high-precision financial machines. One tiny manipulation can shift odds globally or make entire markets react like they’re on fire.

    When I learned how seriously regulated environments handle security
    — especially the kind you see described in official breakdowns — it opened my eyes.
    If anyone wants to understand how this level of protection actually
    works, they can always look it up directly from the source.
    The full explanations are there, and they’re honestly
    worth reading.

    Inside the clubs, it was even more surreal. I saw databases
    full of injury histories — things that could ruin a season if leaked.

    And yet the biggest weakness wasn’t the firewalls.

    It was the people.
    One emotional click, one careless moment, and the whole system can fall apart.
    I watched entire staff units go through security training because phishing had become a daily threat.

    Compliance teams were everywhere too — checking access, reviewing logs, forcing documentation. I used to think compliance was boring, but now I understand that without
    it, the entire digital side of sports would melt into chaos.

    And the future… that’s another story.
    AI detection, automated response systems, cloud architectures — it
    felt like watching the digital version of an arms race.
    But the truth I walked away with was simple:

    Cybersecurity isn’t some extra cost. It’s the only thing
    holding this whole world together.

    And honestly, after everything I saw, I can say the system I was
    reviewing really did an exceptional job. They handled their mission far better than I expected.

    If anyone wants to dig deeper or understand how these structures
    really work, I’d definitely suggest getting more information directly from the source.

    It’s all publicly explained — and believe me, once you read it, you’ll never look at sports or betting
    the same way again.

  7. I think the admin of this web site is really working hard in favor of his
    web page, as here every data is quality based information.

  8. I’ll never forget this, but the first time I got involved with a professional club’s digital operations, everything I thought I knew about modern sports completely collapsed.

    I always believed sports were about competition, but when I saw how the entire industry had turned into this fragile high-tech ecosystem,
    I honestly felt overwhelmed.

    What hit me hardest was realizing that cybercriminals weren’t going after “IT servers”
    anymore. They were attacking everything — contract files.
    One breach, and millions could be lost instantly.

    And the scariest part?
    I saw it with my own eyes.

    One day, during a routine check, someone mentioned how a manipulated
    data feed caused chaos in betting markets. That was the moment I understood how thin the
    line really is between order and total digital disaster.

    But the real shock came when I looked deeper into betting platforms.

    I swear, I always thought they were just websites.

    But no.
    They are insane real-time data engines. One tiny manipulation can shift odds globally or make entire markets react like they’re on fire.

    When I learned how seriously regulated environments handle security — especially the kind you see described
    in official breakdowns — it opened my eyes. If anyone wants to understand how this level of protection actually works, they can always look it up directly from
    the source. The full explanations are there, and they’re honestly worth reading.

    Inside the clubs, it was even more surreal. I saw databases full of
    sponsorship deals — things that could ruin a season if
    leaked.

    And yet the biggest weakness wasn’t the firewalls.
    It was the people.
    One emotional click, one careless moment, and the whole system can fall apart.
    I watched entire staff units go through security training
    because phishing had become a daily threat.

    Compliance teams were everywhere too — checking access,
    reviewing logs, forcing documentation. I used to think compliance was boring, but now I understand that without it,
    the entire digital side of sports would melt into chaos.

    And the future… that’s another story.
    AI detection, automated response systems,
    cloud architectures — it felt like watching the digital version of an arms race.
    But the truth I walked away with was simple:

    Cybersecurity isn’t some extra cost. It’s the only thing holding this
    whole world together.

    And honestly, after everything I saw, I can say the system I was reviewing really did an exceptional job.
    They handled their mission far better than I expected.

    If anyone wants to dig deeper or understand how these structures really work,
    I’d definitely suggest getting more information directly from the source.
    It’s all publicly explained — and believe me, once
    you read it, you’ll never look at sports or betting the same way
    again.

  9. I’ll never forget this, but the day I stepped into the backend of
    the sports world, everything I thought I knew about modern sports completely collapsed.

    I always believed sports were about competition, but when I saw how the entire
    industry had turned into this massive digital economy, I
    honestly felt overwhelmed.

    What hit me hardest was realizing that cybercriminals weren’t going after “IT servers” anymore.
    They were attacking everything — medical reports.
    One breach, and millions could be lost instantly.

    And the scariest part?
    I saw it with my own eyes.

    One day, during a routine check, someone mentioned how a manipulated data feed caused chaos in betting markets.
    That was the moment I understood how thin the line really
    is between order and total digital disaster.

    But the real shock came when I looked deeper into betting platforms.

    I swear, I always thought they were just websites.

    But no.
    They are high-precision financial machines. One tiny manipulation can shift odds globally or make entire markets react like they’re on fire.

    When I learned how seriously regulated environments handle security —
    especially the kind you see described in official breakdowns —
    it opened my eyes. If anyone wants to understand how this level of protection actually works, they
    can always look it up directly from the source. The full explanations are there, and they’re honestly worth reading.

    Inside the clubs, it was even more surreal. I saw databases full of tactical plans — things
    that could ruin a season if leaked.

    And yet the biggest weakness wasn’t the firewalls.
    It was the people.
    One emotional click, one careless moment, and the whole system can fall apart.
    I watched entire staff units go through security training because phishing had
    become a daily threat.

    Compliance teams were everywhere too — checking
    access, reviewing logs, forcing documentation. I used
    to think compliance was boring, but now I understand that without it,
    the entire digital side of sports would melt into chaos.

    And the future… that’s another story.
    AI detection, automated response systems, cloud architectures — it felt
    like watching the digital version of an arms race.
    But the truth I walked away with was simple:

    Cybersecurity isn’t some extra cost. It’s the only thing holding
    this whole world together.

    And honestly, after everything I saw, I can say the system I was reviewing really did an exceptional job.
    They handled their mission far better than I expected.

    If anyone wants to dig deeper or understand how these structures really work,
    I’d definitely suggest getting more information directly from the source.
    It’s all publicly explained — and believe me, once you read it, you’ll never look at sports or betting the same way again.

  10. If some one wishes to be updated with hottest technologies then he must be pay a visit this web page and be up to date everyday.

  11. Great site you’ve got here.. It’s difficult to find good quality writing like yours
    these days. I seriously appreciate people like you! Take care!!

  12. Thank you for the good writeup. It in truth was a enjoyment account it.
    Glance complex to far added agreeable from you!
    However, how can we be in contact?

  13. Superb site you have here but I was curious if you knew of any forums that cover the same topics discussed in this article?

    I’d really love to be a part of community where I can get advice from other experienced
    individuals that share the same interest. If you have any suggestions, please let
    me know. Many thanks!

  14. Thanks for another fantastic article. The place else could anybody get that kind of information in such a perfect manner of writing?
    I have a presentation subsequent week, and I’m on the look for such info.

  15. Spot on with this write-up, I really think this web site needs a
    lot more attention. I’ll probably be back again to read
    through more, thanks for the info!

  16. I have been surfing online more than 3 hours today, yet I never found any interesting article like yours.
    It is pretty worth enough for me. Personally, if all web owners and
    bloggers made good content as you did, the net will be much more useful than ever before.

  17. magnificent issues altogether, you simply gained a new reader.
    What would you recommend in regards to your put up that you made some days in the past?
    Any sure?

  18. Hey there I am so excited I found your weblog, I really
    found you by error, while I was researching on Digg for something else,
    Regardless I am here now and would just like to say kudos for
    a remarkable post and a all round entertaining blog
    (I also love the theme/design), I don’t have time to read through it
    all at the moment but I have book-marked it and also included your RSS feeds,
    so when I have time I will be back to read much more, Please do keep up the fantastic
    jo.

  19. I pay a visit every day some sites and websites to read posts,
    except this website presents feature based writing.

  20. Heya i am for the primary time here. I found this board and I in finding It truly helpful &
    it helped me out a lot. I’m hoping to present one thing back and help others such
    as you helped me.

  21. I read this post completely about the difference of newest and previous
    technologies, it’s amazing article.

  22. Hey there exceptional blog! Does running a blog such as this take a
    massive amount work? I have no knowledge of computer programming but I had been hoping to start my own blog soon. Anyways,
    if you have any ideas or techniques for new blog owners
    please share. I understand this is off subject however I just
    had to ask. Thank you!

  23. Hi every one, here every person is sharing these know-how,
    so it’s fastidious to read this webpage, and I
    used to pay a quick visit this website every day.

  24. Williamlah Williamlah

    Специалисты клиники контролируют состояние пациентов 24/7: фиксируют динамику показателей, корректируют дозы препаратов и обеспечивают безопасность на всех этапах лечения. Такой формат позволяет избежать осложнений, связанных с самостоятельным выходом из запоя или несанкционированным приёмом медикаментов. Врачи клиники помогают пациентам пройти через этапы очищения, стабилизации и восстановления организма максимально комфортно.
    Ознакомиться с деталями – http://narkologicheskaya-klinika-v-khabarovske0.ru/narkolog-khabarovsk-anonimno/https://narkologicheskaya-klinika-v-khabarovske0.ru

  25. Специалисты клиники контролируют состояние пациентов 24/7: фиксируют динамику показателей, корректируют дозы препаратов и обеспечивают безопасность на всех этапах лечения. Такой формат позволяет избежать осложнений, связанных с самостоятельным выходом из запоя или несанкционированным приёмом медикаментов. Врачи клиники помогают пациентам пройти через этапы очищения, стабилизации и восстановления организма максимально комфортно.
    Углубиться в тему – [url=https://narkologicheskaya-klinika-v-khabarovske0.ru/]narkologicheskaya-klinika-v-khabarovske0.ru/[/url]

  26. That is a great tip particularly to those fresh to the blogosphere.

    Short but very precise info… Thank you for sharing this
    one. A must read post!

  27. I’m amazed, I have to admit. Rarely do I come across a blog that’s equally educative and interesting, and let me tell you, you have hit the nail on the head.
    The problem is an issue that not enough folks are speaking intelligently
    about. I am very happy I came across this in my hunt for
    something relating to this.

  28. Wonderful work! That is the kind of info that are supposed
    to be shared around the net. Shame on the seek engines for not positioning this submit upper!

    Come on over and discuss with my site . Thanks =)

  29. Hey very cool blog!! Guy .. Excellent .. Superb .. I will bookmark your web
    site and take the feeds additionally? I’m happy to search out a lot of useful info here within the post, we’d like
    work out extra strategies on this regard, thank you
    for sharing. . . . . .

  30. Thomasstiny Thomasstiny

    Если вам интересен провайдер провайдер PG Soft и вы хотите разбираться в его играх не “вслепую”, а с пониманием механик – загляните в наш Telegram. Мы регулярно выкладываем подборки слотов PG Soft, рассказываем, чем отличаются популярные тайтлы, на что смотреть по волатильности/бонускам, какие фичи встречаются чаще всего и где реально можно поймать самые сочные раунды. Формат простой: короткие обзоры, заметки по обновлениям и идеи, что стоит попробовать в первую очередь.

  31. I have read so many articles or reviews regarding the blogger lovers but this article is in fact a fastidious article, keep it up.

Deixe um comentário

O seu endereço de e-mail não será publicado. Campos obrigatórios são marcados com *