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

675 Comentários

  1. Wow, that’s what I was searching for, what a material!
    present here at this webpage, thanks admin of this
    web page.

  2. This article is very helpful.
    I really enjoy how this post breaks down
    the topic in a simple way.

    It is sometimes difficult for readers to understand

    how online cricket streaming works,
    especially regarding
    quality, reliability, and safety.

    This post really helps clarify that,
    and I think it will be helpful for new users
    interested in understanding this better.

    Thanks for writing this guide,
    I will definitely read more articles
    on this blog.

  3. Link exchange is nothing else however it is just placing the other person’s web site link on your
    page at appropriate place and other person will also do same in favor of you.

  4. Hi, Neat post. There is an issue along with your website in web explorer, may test this?
    IE nonetheless is the marketplace leader and a large section of other folks will miss your wonderful writing because of this problem.

  5. Unquestionably believe that that you said. Your
    favorite reason appeared to be on the web the simplest thing to remember of.
    I say to you, I certainly get irked at the same time as other
    people consider issues that they plainly do not understand
    about. You controlled to hit the nail upon the top and outlined out the whole thing
    without having side-effects , folks could take a signal.
    Will probably be back to get more. Thanks

  6. I’ve been reading Paybis for a while now, especially after having a rough financial period, and I’m still not
    fully convinced whether it deserves all the attention it gets.
    Still, it’s clearly a noticeable name in the crypto space, particularly for people in Germany who are trying to rebuild their finances.
    From what I understand, Paybis presents itself as a globally
    operated cryptocurrency service that supports standard payment methods,
    something many platforms either limit or complicate.

    What initially caught my eye is how Paybis seems to link traditional German banking methods with the crypto world.

    Many exchanges focus only on crypto-to-crypto trades, while Paybis allows users to
    buy crypto using credit cards. I’m not saying the process is perfect, but it
    does seem aimed at users new to crypto rather than just advanced traders.

    Another aspect worth noting is the selection of supported assets.
    Paybis doesn’t restrict itself to Bitcoin and Ethereum
    only. Instead, it offers a wider range of digital assets,
    which might attract users who are exploring options. Still, things like liquidity are worth checking before making decisions.

    Security and compliance also come up often around Paybis.
    The platform highlights regulatory compliance, which can feel professional
    for users in Germany, though others might see it as restrictive.
    I’m still undecided, but it does suggest Paybis tries to operate as a regulated marketplace.

    When it comes to fees, reviews seem mixed. Some say Paybis is transparent
    about costs, while others note that pricing can vary by payment method.
    This isn’t unusual in the crypto industry, but it means users should compare alternatives before
    moving money.

    Overall, I wouldn’t call Paybis the best option, but it does seem like a platform worth a closer look,
    especially for someone in Germany trying to recover financially.
    I’m still forming my opinion, but it seems interesting enough to justify
    further research.

  7. Hello There. I found your weblog the use of msn. That is an extremely
    well written article. I will be sure to bookmark it and come
    back to learn extra of your helpful info. Thanks for the post.
    I will certainly return.

  8. Do you mind if I quote a couple of your posts as long as I provide credit and sources back to
    your blog? My blog is in the very same area of interest as yours and my users
    would certainly benefit from some of the information you present here.
    Please let me know if this ok with you. Regards!

  9. 환상적인 블로그입니다 하지만 여기서 다루는 토픽을 다루는 사용자
    토론 포럼을 아는지 알고 싶었습니다. 같은 관심사를 공유하는 다른 지식이 있는 사람들로부터 제안을 받을 수 있는 그룹의 일원이 되고
    싶습니다. 제안이 있다면 알려주세요.
    고맙습니다!

    What’s up, everything is going sound here and ofcourse every one is sharing information, that’s really excellent,
    keep up writing.

    Your blog is a treasure trove of practical information! I especially enjoyed this post—it’s clear you
    know your stuff. Have you thought about adding more visuals to enhance the reader experience?
    Keep it up!

    이 웹사이트는 정보의 보물창고네요! 이 포스트는 특히 유익하고 이해하기 쉬웠어요.
    2d에 대해 더 깊이 다룬 시리즈가 있으면 좋겠어요.
    멋진 콘텐츠 감사합니다!

  10. I’ve been checking out Paybis for a while now, especially after ending
    up broke, and I’m still not entirely sure whether it deserves all the attention it gets.
    Still, it’s certainly a noticeable name in the crypto
    space, particularly for people in Germany who are trying
    to get back on track. From what I understand, Paybis presents itself as a globally
    operated cryptocurrency service that supports regular bank transactions, something many platforms either limit or complicate.

    What initially caught my eye is how Paybis
    seems to link traditional German banking methods with the crypto world.
    Many exchanges focus only on crypto-to-crypto trades, while
    Paybis allows users to buy crypto using debit cards. I’m not saying
    the process is perfect, but it does seem aimed at beginners rather than just
    advanced traders.

    Another aspect worth noting is the selection of
    supported assets. Paybis doesn’t restrict itself to
    just the top coins. Instead, it offers a wider range of digital
    assets, which might attract users who are diversifying.
    Still, things like asset availability are worth checking before making decisions.

    Security and compliance also come up often around Paybis.

    The platform highlights identity verification,
    which can feel responsible for users in Germany, though others might see it as inconvenient.

    I’m still undecided, but it does suggest Paybis tries to operate as a regulated marketplace.

    When it comes to fees, reviews seem divided. Some say Paybis is transparent about costs,
    while others note that pricing can vary by
    payment method. This isn’t unusual in the
    crypto industry, but it means users should read the details before moving money.

    Overall, I wouldn’t call Paybis the best option, but it does seem like a platform worth exploring, especially for someone in Germany trying to recover
    financially. I’m still forming my opinion, but it seems relevant enough to justify further
    research.

  11. hello!,I really like your writing so a lot! proportion we keep in touch extra approximately your post
    on AOL? I require an expert in this area to resolve my problem.

    May be that’s you! Looking ahead to peer you.

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

  13. I have been browsing online more than 4 hours
    today, yet I never found any interesting article like yours.
    It’s pretty worth enough for me. Personally, if all webmasters and bloggers made good content as you did, the web will be much more useful than ever before.

  14. xptrorpeh xptrorpeh

    Where can I play Gates of Betano Olympus slots game for free? Find out more about our games To play demo Gates of Olympus for free right here at Temple of Games, just click the ‘Play for Free’ button at the top of this page. Then, you can enjoy Gates of Olympus for fun, without spending any money. The Gates of Olympus slot by Pragmatic Play has a default RTP of 96.5% in all game modes. It’s a fair return rate compared to the 96% industry average.  Art-Sheep is a highly respected, high-authority platform known for delivering original, quality content across a wide range of topics. With +13 years of experience and a loyal readership with an avarage of 1.5 million monthly views, our commitment to credible, engaging articles has earned us a trusted reputation among readers making us a go-to source for insightful, impactful content.
    https://www.gapbridgesoft.de/woo-casino-review-a-premier-choice-for-australian-online-gamblers/
    Multiplier symbols are present on all reels and can hit randomly during both spins and tumbles. Whenever one of these symbols lands, it takes a random multiplier value from 2x to 1,000x, with these values combined at the end of a tumble sequence and applied to the player’s win. Lord Mahavira College of Education offers smart classrooms, well-stocked library, modern labs, sports facilities, and a Wi-Fi-enabled campus. We like to roll out the red carpet for our new players. That’s why we’re offering a huge welcome package that covers your first three deposits, giving you up to $6,000 in bonus funds PLUS 100 Free Spins on some of the best slots around! Sydney Olympic Park is changing the parking conditions for parkland areas to improve the experience for visitors and to support the ongoing management of the parklands.

  15. 1 dollar minimum deposit casino uk, slot payback info united states and new zealandn poker casino online, or pay by
    phone bill ace revenue casino affiliate program (Soila) australia

  16. Post-PSLE, secondary school math tuition Ьecomes key
    in Singapore foг your kid to prepare for mid-yearexams ɑnd ƅeyond.

    Shiok sia, watching Singapore dominate tһe math rankings օn the wߋrld
    stage!

    Aѕ a parent, inclusive landscape ԝith Singapore math tuition’s welcome.
    Secondary math tuition all invites. Secondary 1 math tuition understanding percentile.

    Тһe multilingual technique іn secondary 2 math tuition һelp non-native speakers.

    Secondary 2 math tuition discusses іn numerous languages.
    Inclusive secondary 2 math tuition breaks barriers.
    Secondary 2 math tuition еnsures equal opportunities.

    Ԝith Օ-Levels approaching, secondary 3 math exams highlight quality.

    Τhese outcomes affect multicultural examples. Ӏt promotes adaptive efficiencies.

    Secondary 4 exams hold enormous ѵalue іn Singapore,
    serving ɑѕ the gateway to college and аffecting ⅼong-lasting trajectories.
    Secondary 4 math tuition addresses tһiѕ by using individualized guidance tⲟ master
    complex concepts ⅼike combination. With O-Levels choosing streaming choices, consistent tuition ϲan tuгn typical
    performers іnto higһ achievers. Moms ɑnd dads invest іn secondary 4
    math tuition t᧐ ensure thеir kids satisfy thе extensive national standards.

    Exams build skills, уet mathematics іs a key ability in the AI boom, facilitating natural disaster predictions.

    Ƭߋ excel at math, build а love fօr it ɑnd use mathematical principles іn real-wօrld daily routines.

    By practicing tһese, learners cɑn improve their algebraic manipulation speed
    fоr Singapore secondary math tests.

    Singapore pupils ѕee exam boosts ԝith online tuition е-learning offering black hole geometry visualizations.

    Ꮯan leh, Singapore dads relax lah, secondary school
    exciting phase, no undue pressure.

    Feel free tо surf tο my blog – kumon maths tuition new zealand

Deixe um comentário

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