Skip to content

Verify if a process is executing and notificate via e-mail on Windows

Hello,

A few days ago my friend need a Visual Basic Script to verify if a process is running and if it is send an e-mail. He asked me for help to code it, and I helped him.

Visual Basic Script to verify if a process is running and notify via e-mail.

Verify if a process is running with Visual Basic Script and shows a window if it is.
[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]

Send an e-mail using Visual Basic Script
[code lang=”vb”]
Const username = “USERNAME”
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]

This two scripts are changed to work together to do what we want and have a config section.

Best Regards,
Matheus

References:
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

Published inwindows

9,733 Comments

  1. usa casino free spins 2021, new online casino united states 2021 and betway poker
    australia, or top casino in united states for real money

    Also visit my homepage; Site

  2. 888starz apk [url=http://www.vetsintez.com]888starz[/url]

    888starz operates under an official license guaranteeing security and fair play for all users.

    The official site offers more than three hundred live tables to play with real dealers all day.

    Betting lines are available for international and local leagues, including events in Uzbekistan.

    888starz offers new players in Uzbekistan a welcome offer reaching 1500 euros and 150 free spins.

    The official site provides continuous support all day in multiple languages across several channels.

  3. Everything from slots to live tables is available on the official True Fortune site.

    True Fortune regularly adds new titles and jackpot games to the lobby.

    Every wager earns loyalty points that can be exchanged for bonus credit.

    Fast, transparent withdrawals mean winnings reach players without long delays.

    Certified RNG technology ensures every spin and hand is completely random.

    Help is always at hand thanks to round-the-clock live chat support.

    true fortune casino free spins no deposit [url=http://true-fortune-casino18.com/free-spins/]true fortune casino free spins no deposit[/url]

  4. Herkes dinlesin Mobil bahis uygulaması hayat kurtarıyor Bazıları sürekli güncelleme istiyor Çok hızlı ve kullanışlı — 1xbet giriş indir kolay Çekim işlemleri saniyeler içinde Neyse, kendiniz indirin — xbet indir [url=https://1xbet-indir-qwr.com]xbet indir[/url] Sakın sahte uygulamalara kanma Bahis yapan herkese gönder

  5. The official True Fortune casino has built a strong reputation with players across the United Kingdom.

    A dedicated live casino streams real-dealer roulette, blackjack and baccarat around the clock.

    Frequent players climb a VIP ladder that unlocks better rewards and faster withdrawals.

    Withdrawals are handled quickly, with e-wallet payouts often completed the same day.

    Independent audits confirm the games are fair and payouts are genuine.

    Help is always at hand thanks to round-the-clock live chat support.

    true fortune casino sister sites no deposit bonus [url=http://true-fortune-casino27.com/no-deposit-bonus/]true fortune casino sister sites no deposit bonus[/url]

  6. Timely math tuition іn primary уears seals learning gaps before they widen, clears
    uρ persistent misconceptions, аnd effortlessly bridges students fⲟr thе morе advanced mathematics curriculum
    іn secondary school.

    In Singapore’ѕ rigorous secondary education landscape, math
    tuition Ьecomes indispensable f᧐r students tο confidently conquer challenging topics ⅼike algebraic manipulation,
    geometry, trigonometry, ɑnd statistics tһat act аs critical building blocks
    for O-Level achievement.

    JC math tuition ⲣrovides rigorous guidance and targeted drilling required tօ ѕuccessfully bridge tһе substantial increase іn complexity
    from O-Level Additional Math tο the theoretically demanding Н2 Mathematics syllabus.

    Ӏn Singapore’s fast-paced ɑnd highly competitive education sʏstem, online math tuition һas emerged
    as a preferred choice for primary students, offering adaptable lesson tіmes and tailored individual support
    to heⅼp yoᥙng learners thorougһly understand foundational PSLE topics
    ѕuch as model drawing fгom home withoᥙt rigid centre schedules.

    Collective discussions іn OMT classes build enjoyment arօund math ideas, inspiring Singapore trainees
    tο develop affection ɑnd stand out in exams.

    Enroll toԁay in OMT’ѕ standalone е-learning programs and see yoսr grades skyrocket tһrough endless access tⲟ
    һigh-quality, syllabus-aligned material.

    Аs mathematics underpins Singapore’ѕ credibility fօr quality іn global
    criteria like PISA, math tuition іѕ essential tօ
    opening a kid’s poѕsible and protecting academic benefits іn thiѕ core subject.

    primary school school math tuition іs vital fоr PSLE preparation as іt assists trainees master the foundational concepts lіke
    portions ɑnd decimals, ԝhich are heavily checked in the exam.

    Secondary math tuition overcomes tһе restrictions of hսge class dimensions, providing concentrated attention tһat
    boosts understanding fоr O Level prep ѡork.

    Tuition in junior college math gears սp pupils ѡith analytical techniques
    аnd possibility versions neⅽessary fоr translating data-driven inquiries іn A Level documents.

    Ƭhe distinctiveness оf OMT originates fгom its proprietary mathematics educational program tһat expands MOE web content
    wіth project-based discovering f᧐r functional application.

    OMT’ѕ on-line tuition іs kiasu-proof leh, providing ʏou that аdded edge to outshine in O-Level mathematics examinations.

    Singapore’ѕ focus оn alternative educatiuon ɑnd learning is
    complemented Ƅy math tuition that builds abstract
    tһought for long-lasting examination benefits.

    Feel free tߋ visit my web site … math tutor

  7. Millet dinleyin Bazı apk dosyaları güvenilir değil Telefonum bozuluyordu neredeyse Sonunda doğru apk dosyasını buldum — 1xbet apk yükle kolay Çekim işlemleri saniyeler içinde Neyse, kaybetmeyin diye tıkla — 1xbet android uygulama [url=https://1xbet-apk-rft.com]1xbet android uygulama[/url] Tek adres 1xbet apk Bahis yapan herkese gönder

  8. 888starz operates under an official license guaranteeing security and fair play for all users.

    The 888starz casino features more than 5000 games from top providers like Pragmatic Play, NetEnt and Microgaming.

    Betting markets include top leagues such as the Premier League, La Liga and major local tournaments.

    888starz highlights the latest bonuses and promotions available to players in Egypt.

    888starz offers various deposit options from cards to digital wallets and more than 30 cryptocurrencies.

    888starz apk [url=https://www.fysiozuid.nl]888starz apk[/url]

  9. 888starz apk [url=http://www.vetsintez.com/]888starz apk[/url]

    The apk file is lightweight, making it suitable for a wide range of Android devices.

    After downloading the file, simply tap it and wait for the installation to complete automatically.

    The Android version of the 888starz app stands out for its speed and comfortable design.

    It is always recommended to download the apk from the official source to avoid modified or unsafe versions.

    Installing the app on iPhone takes only a few simple, quick steps.

  10. new no deposit uk casino 2021, no deposit bonus codes online pokies canada and spin palace mobile casino australia, or vegas usa casino

    Look into my homepage; site (Karissa)

  11. True Fortune casino has become a go-to online casino for many players in the United Kingdom.

    A dedicated live casino streams real-dealer roulette, blackjack and baccarat around the clock.

    A welcome offer with matched bonus funds and free spins awaits new players in the United Kingdom.

    Minimum deposits are low, making it easy to get started.

    True Fortune promotes responsible gaming with limits, time-outs and support links.

    True Fortune works seamlessly on smartphones and tablets straight from the browser.

    no deposit true fortune casino [url=http://www.true-fortune-casino27.com/no-deposit-bonus/]no deposit true fortune casino[/url]

  12. The official True Fortune website brings hundreds of games together on a single, easy-to-use platform.

    The lobby showcases jackpot slots and the latest releases right at the top.

    Ongoing offers such as weekly cashback and reload deals keep the balance topped up.

    true fortune casino $50 free chip code [url=https://true-fortune-casino23.com/free-chips/]true fortune casino $50 free chip code[/url]

    Verified players enjoy speedy payouts through their preferred method.

    Independent audits confirm the games are fair and payouts are genuine.

    Help is always at hand thanks to round-the-clock live chat support.

  13. In the United Kingdom, True Fortune casino stands out as a trusted online gambling destination.

    The game library includes thousands of titles, from classic fruit machines to modern video slots.

    A loyalty programme rewards active players with points that convert into real bonuses.

    Minimum deposits are low, making it easy to get started.

    Responsible gambling tools let players set deposit limits, take breaks or self-exclude.

    Clear rules and a well-organised help centre keep everything straightforward.

    true fortune casino no deposit bonus codes 2025 [url=http://true-fortune-casino19.com/no-deposit-bonus/]true fortune casino no deposit bonus codes 2025[/url]

  14. True Fortune casino has become a go-to online casino for many players in the United Kingdom.

    Fans of live gaming can join real-dealer tables running 24 hours a day.

    First-time players receive a welcome bonus plus free spins after signing up.

    Minimum deposits are low, making it easy to get started.

    The site offers deposit limits, reality checks and self-exclusion for safer play.

    The support team responds quickly via chat and email at any hour.

    true fortune 25 chip [url=https://www.true-fortune-casino27.com/free-chips/]true fortune 25 chip[/url]

  15. The official website ensures a safe, licensed environment that protects player data and funds.

    More than 300 live casino tables with real dealers are available around the clock.

    Strong odds and live betting come with instant updates on results and statistics.

    The official site offers regular bonuses such as 50% cashback and various insurance deals.

    Registration on the official site takes just minutes via phone, email or one click.

    888starz [url=https://www.fysiozuid.nl]888starz[/url]

  16. The casino welcomes players from the United Kingdom with a localised experience and responsive support.

    True Fortune offers an extensive range of slots covering every theme and volatility level.

    Players enjoy recurring promotions including cashback and free spins on selected slots.

    true fortune casino home [url=https://www.true-fortune-casino23.com]true fortune casino home[/url]

    The casino aims to process cashouts fast, especially for verified accounts.

    Responsible gambling tools let players set deposit limits, take breaks or self-exclude.

    A detailed FAQ and clear terms make it easy for players in the United Kingdom to find answers fast.

  17. $1 minimum deposit mobile casino canada, biggest casino queen website;
    Serena, in ontario united kingdom
    and download poker stars uk mac, or neteller casinos uk

  18. best online usa casinos, in casino in usa and 21 dukes
    casino review, or las vegas usa casino 770 bonus code 25€ (Brianne) $100

  19. Designed with players in the United Kingdom in mind, the site keeps registration and play simple.

    True Fortune offers an extensive range of slots covering every theme and volatility level.

    Players enjoy recurring promotions including cashback and free spins on selected slots.

    Topping up an account is instant with no fees on most payment methods.

    Independent audits confirm the games are fair and payouts are genuine.

    Customer support is available around the clock via live chat and email in English.

    true fortune no deposit codes [url=https://true-fortune-casino16.com/no-deposit-bonus/]true fortune no deposit codes[/url]

  20. Everything from slots to live tables is available on the official True Fortune site.
    Progressive jackpots and top-rated new releases are highlighted in the casino lobby.
    The VIP scheme gives loyal users cashback boosts, gifts and a personal manager.
    true fortune casino no deposit promo codes for existing players [url=https://true-fortune-casino15.com/bonus-codes-for-existing-players/]true fortune casino no deposit promo codes for existing players[/url]
    Adding funds takes just a moment and play begins straight away.
    The casino is licensed and applies strong security to keep accounts and funds safe.
    A detailed FAQ and clear terms make it easy for players in the United Kingdom to find answers fast.

  21. Беттеры отзовитесь А поддержка молчит как рыба Нервов потратил — мама не горюй Короче, нашел наконец толковую контору — mostbet с быстрыми выплатами Вывод денег за 5 минут В общем, вся инфа вот здесь — букмекерские конторы кыргызстана [url=https://mostbet-mpl.com.kg]букмекерские конторы кыргызстана[/url] Не ведитесь на лохотроны Перешлите тому кто тоже ищет нормальную контору

  22. In the United Kingdom, True Fortune casino stands out as a trusted online gambling destination.

    The True Fortune casino features thousands of slots from leading providers like Pragmatic Play, NetEnt and Play’n GO.

    Regular promotions include reload bonuses, cashback and free spin drops throughout the week.

    Fast, transparent withdrawals mean winnings reach players without long delays.

    True Fortune promotes responsible gaming with limits, time-outs and support links.

    Help is always at hand thanks to round-the-clock live chat support.

    true fortune casino [url=true-fortune-casino16.com]true fortune casino[/url]

  23. The site combines a huge game library with a clean, modern interface.

    Fans of live gaming can join real-dealer tables running 24 hours a day.

    First-time players receive a welcome bonus plus free spins after signing up.

    Deposits are processed instantly so players can start playing within minutes.

    A valid licence and secure infrastructure make True Fortune a safe place to play.

    Clear rules and a well-organised help centre keep everything straightforward.

    true fortune casino bonus codes [url=true-fortune-casino16.com/bonus]true fortune casino bonus codes[/url]

Leave a Reply

Your email address will not be published. Required fields are marked *