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.852 Comentários

  1. dfnsypkjj dfnsypkjj

    The Big Bass series has seen more than a dozen releases since its inception, starting with the original Big Bass Bonanza in December 2020. Following its success, Pragmatic Play expanded the series to include variations like Big Bass Bonanza Megaways and Christmas-themed slots such as Big Bass Christmas Bash, showcasing the series’ adaptability and appeal. Every fourth Wild symbol that players collect will retrigger the Free Spins feature, up to three times. We perform checks on reviews If you’re hesitant to dive straight into real-money play, the bigger bass bonanza demo allows players to explore the game without financial risk. This demo version perfectly mirrors the real game but uses virtual credits, giving players the opportunity to: Released by the Pragmatic Play slot provider in December 2020, Big Bass Bonanza quickly hooked the attention of slot fans with its cheerful fishing theme, vibrant visuals, and exciting bonus features. Played on a classic 5×3 grid with 10 fixed paylines and having a medium volatility slot with an RTP of 96.71%, it offers a balanced mix of frequent wins and big catch potential that is ideal for both newcomers and seasoned players.
    https://www.bruzziboatservice.com/ricky-casino-app-review-safe-haven-for-aussie-players/
    Operating a scatter pays win system means Gates of Olympus Super Scatter creates a winning combination when 8 or more matching symbols land anywhere on the grid. Players may wager 20 c to $ €240 per spin, buy free spins or super free spins, and activate an ante bet, where the default RTP when regular betting comes in at 96.5%. The ante bet puts 50% onto the stake when activated to double the chance of triggering the free spins feature. Yes, Gates of Olympus and hundreds of other Pragmatic Play games are now available on MrQ with no downloads needed. Conquer the golden gates on your mobile or tablet device today. Connect with us Gates of Olympus is yet another game by Pragmatic play (they sure know how to make them). This game is filled with excitement and heart stopping moments with huge wins, from the get go you are greeted by Zeus staring at you with his menacing eyes. But do not fear as we will make him fill our pockets with riches.

  2. I pay a visit everyday some sites and blogs to
    read articles, however this website presents quality based
    writing.

  3. Wonderful items from you, man. I have understand your stuff
    previous to and you’re just too fantastic. I really like what
    you have obtained here, really like what you’re stating and the way
    during which you are saying it. You’re making it enjoyable and you continue to take care of to stay it sensible.

    I cant wait to read much more from you. That is actually a tremendous web site.

  4. Fastidious answers in return of this issue with real arguments and telling everything
    on the topic of that.

  5. เนื้อหานี้ อ่านแล้วได้ความรู้เพิ่ม ค่ะ
    ดิฉัน ได้อ่านบทความที่เกี่ยวข้องกับ ข้อมูลเพิ่มเติม
    ซึ่งอยู่ที่ betflik new
    เผื่อใครสนใจ
    มีตัวอย่างประกอบชัดเจน
    ขอบคุณที่แชร์ คอนเทนต์ดีๆ นี้
    และหวังว่าจะมีข้อมูลใหม่ๆ มาแบ่งปันอีก

  6. My partner and I absolutely love your blog and find almost all of your post’s to be just what I’m looking for.
    can you offer guest writers to write content for you? I wouldn’t mind
    producing a post or elaborating on some of the subjects
    you write regarding here. Again, awesome weblog!

  7. No matter if some one searches for his required thing,
    so he/she needs to be available that in detail, so that thing is maintained over here.

  8. Hello There. I found your blog using msn. This is a very well written article.
    I’ll make sure to bookmark it and return to read
    more of your useful information. Thanks for the post. I will definitely comeback.

  9. I just couldn’t go away your site before suggesting that
    I really enjoyed the standard info a person provide on your visitors?
    Is gonna be again often to inspect new posts

  10. I constantly spent my half an hour to read this webpage’s posts everyday
    along with a mug of coffee.

  11. I’ve got to be honest, 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 teams were about winning games, 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 — 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
    ransomware attack almost froze an entire club. 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.

  12. Admiring the time and energy you put into your blog and in depth information you
    present. It’s great to come across a blog every once in a while that isn’t the same out of date rehashed information. Great read!
    I’ve bookmarked your site and I’m adding your RSS feeds to my Google account.

  13. It’s really a nice and helpful piece of info.

    I am happy that you simply shared this useful info with us.
    Please stay us up to date like this. Thanks for sharing.

  14. At this time it seems like Drupal is the preferred blogging platform out there right now.
    (from what I’ve read) Is that what you are using on your blog?

  15. Hello, i believe that i saw you visited my website thus i got here to go back
    the desire?.I am attempting to find things to improve my site!I suppose its adequate to use
    some of your ideas!!

  16. คอนเทนต์นี้ มีประโยชน์มาก ครับ
    ดิฉัน เพิ่งเจอข้อมูลเกี่ยวกับ เนื้อหาในแนวเดียวกัน
    ดูต่อได้ที่ lava1688
    ลองแวะไปดู
    เพราะอธิบายไว้ละเอียด
    ขอบคุณที่แชร์ คอนเทนต์ดีๆ นี้
    และหวังว่าจะได้เห็นโพสต์แนวนี้อีก

  17. печать стикеров на заказ [url=https://pechat-nakleek-v-moskve.ru/]печать стикеров на заказ[/url] .

  18. Looking for a yacht? yacht holidays in Cyprus for unforgettable sea adventures. Charter luxury yachts, catamarans, or motorboats with or without crew. Explore crystal-clear waters, secluded bays, and iconic coastal locations in first-class comfort onboard.

  19. We stumbled over here coming from a different web address and thought I might check things out.
    I like what I see so now i am following you. Look forward to checking
    out your web page repeatedly.

Deixe um comentário

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