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

1,031 Comments

  1. Современное общество и бизнес не могут обойтись без юридических
    услуг. Как компании, так и частные лица обращаются к юристам
    для решения множества правовых вопросов.

    В данной статье мы рассмотрим основные виды юридических услуг и
    их значимость.

    Основные виды юридических
    услуг

    Подготовка и анализ контрактов
    Обслуживание сделок, связанных с продажей и приобретением активов
    Защита интересов клиентов в арбитражных судах
    Взыскание задолженности и защита прав клиента
    Консультации по вопросам корпоративного права

    Преимущества доверения юридических вопросов профессионалам

    Работа с юридической фирмой способствует снижению рисков, связанных с правовыми вопросами.

    Юристы имеют богатый опыт в различных областях права, что позволяет им успешно вести дела клиентов.
    Также юридические фирмы обычно предоставляют ряд
    следующих преимуществ:

    Индивидуальный подход к каждому клиенту
    Доступ к актуальной информации и практикам в области
    права
    Быстрая адаптация к изменениям в правовой среде

    Рекомендации по выбору юридической
    компании

    Подбор юридической фирмы
    – это ключевой момент для эффективного
    решения правовых вопросов. Обратите внимание на следующие аспекты:

    Мнения клиентов о предоставленных юридических услугах
    Профессиональный опыт юристов в специальных областях
    Положительные результаты юридической практики в судебных делах
    Прозрачность условий сотрудничества и стоимость услуг

    Актуальность юридических услуг
    в современных реалиях

    В связи с ростом бизнеса и увеличением конфликтов, юридические
    услуги становятся особенно актуальными.
    В условиях постоянных изменений в
    законодательстве предприятия
    и физические лица требуют надежной юридической помощи.
    Следует помнить, что качественная юридическая
    проверка может избежать многих проблем и сэкономить время.

    Контакты юристов

    Если у вас возникли вопросы или вы нуждаетесь в правовой помощи, не стесняйтесь
    обращаться к специалистам. Юридические фирмы предлагают разнообразные услуги
    и готовы помочь в любых вопросах.
    Не забывайте исследовать репутацию и опыт компании, прежде чем принимать решение.
    Оптимальный выбор юриста обеспечит вам успех в судебных делах и бизнесе. юрист по страховым спорам от кпц ваш юрист Итоговое слово
    В итоге, подбор юридических
    услуг является важным аспектом успешного управления бизнесом и решением личных дел Как бы то
    ни было, требуется ли вам юридическое сопровождение в суде,
    консультация по корпоративному законодательству или помощь в составлении контрактов,
    необходимо доверять профессионалам, обладающим нужной квалификацией и опытом.

    Преимущества обращения к юристам

    Глубокая экспертиза в различных областях права
    Персонализированный подход к каждому заказчику
    Способность представлять интересы клиента в суде и арбитражных органах
    Снижение рисков правовых ошибок и споров
    Помощь в ведении трудных переговоров и сделок

    Службы юридической поддержки способны значительно упростить жизнь как частным лицам, так и компаниям Профессиональные юристы помогут решить
    вопросы, связанные с задолженностями, взысканием долгов, а также предоставят помощь в разрешении споров, что особенно актуально в условиях растущей
    конкурентной среды

    Роль отзывов и репутации
    Выбирая юридическую компанию,
    важно учитывать мнения клиентов и репутацию данной фирмы
    Чем больше успешных дел и положительных откликов, тем выше вероятность того, что
    ваши интересы будут защищены на должном уровне

    В наше время, когда правовые нормы постоянно меняются, наличие надежного юридического партнера становится
    неоценимым Затраты на юридические услуги способны существенно повысить как защиту бизнеса, так и его рентабельность.

    Если у вас возникли вопросы или нужна
    помощь, не стесняйтесь звонить за консультацией Верные юридические решения – это гарантия вашего успеха и охраны интересов на продолжительный период.

    Мы надеемся, что эта информация была вам интересна.

    Следите за обновлениями на нашем сайте, чтобы оставаться в
    курсе всех изменений в области юридических услуг и новых
    практик

  2. My partner and I stumbled over here coming from a different page and thought I might as
    well check things out. I like what I see so i am just following
    you. Look forward to going over your web page again.

  3. I like the helpful information you supply on your articles.
    I will bookmark your weblog and check again here frequently.
    I am moderately certain I’ll learn lots of new stuff proper right
    here! Best of luck for the next!

  4. You are so awesome! I don’t believe I’ve truly read anything like that before.
    So nice to find another person with some original thoughts on this subject matter.

    Seriously.. many thanks for starting this up.
    This website is something that’s needed on the internet, someone with some originality!

  5. Great work! This is the type of information that are meant to be shared across the web.

    Disgrace on Google for no longer positioning this put up higher!

    Come on over and discuss with my web site .
    Thank you =)

  6. This is very interesting, You are a very skilled blogger.
    I’ve joined your rss feed and look forward to seeking
    more of your fantastic post. Also, I’ve shared your web
    site in my social networks!

  7. I really like your blog.. very nice colors & theme.

    Did you create this website yourself or did you hire someone to
    do it for you? Plz answer back as I’m looking to design my own blog and would like to find out where u got this
    from. cheers

  8. Its like you learn my thoughts! You seem to know a lot approximately this, such as you wrote the ebook in it or something.
    I think that you could do with some p.c.
    to pressure the message home a little bit, however instead of that, that is excellent blog.

    A great read. I’ll definitely be back.

  9. Thanks , I’ve recently been searching for information approximately this subject for ages and yours is the greatest I’ve discovered so far.
    But, what about the conclusion? Are you certain in regards to the source?

  10. Does your site have a contact page? I’m having
    a tough time locating it but, I’d like to send you an e-mail.
    I’ve got some creative ideas for your blog you might be
    interested in hearing. Either way, great blog and I look forward to seeing it improve over time.

  11. I’ve been browsing online more than 2 hours today, yet I never found any
    interesting article like yours. It is pretty worth enough for me.
    In my opinion, if all web owners and bloggers made good content as you did, the net will be much
    more useful than ever before.

  12. Hey I know this is off topic but I was wondering if you knew of any widgets I could add to my blog that automatically tweet my newest twitter updates.
    I’ve been looking for a plug-in like this for quite some time and was
    hoping maybe you would have some experience with
    something like this. Please let me know if you run into anything.
    I truly enjoy reading your blog and I look
    forward to your new updates.

  13. In Singapore’ѕ sүstem, secondary school math tuition іѕ
    important to encourage math-relatеd career aspirations.

    Ϲan lor, witһ toр math rankings, Singapore students gօt bright futures sia!

    Moms and dads, improve loops with Singapore math tuition’s integration. Secondary math
    tuition assesses continuously. Τhrough secondary 1 math tuition, percentiles enhance early.

    The scent oof success in secondary 2 math tuition encourages.

    Secondary 2 math tuition ᥙses aromatherapy for calm. Sensory secondary 2 math tuition improves recall.
    Secondary 2 math tuition innovates atmospheres.

    Secondary 3 math exams, оne ʏear before O-Levels, emphasize excellence fߋr continual momentum.
    Нigh marks maқe it poѕsible fߋr versatile knowing paths.
    Tһey cultivate inclusivity іn group studies.

    Ꭲhe significance of secondary 4 exams influences thгough
    reviews іn Singapore. Secondary 4 math tuition shares legacies.
    Τhis inspiration drives Ο-Level aspiration. Secondary 4 math
    tuition сontinues quality.

    Mathematics ɡoes pаѕt exaam halls; іt’ѕ a fundamental competency іn thе
    AI boom, powering telemedicine diagnostics.

    Foster love fօr math ɑnd learn tо apply itѕ principles
    іn everyday real-life scenarios tⲟ excel.

    Practicing these papers frm assorted schools іn Singapore is essential fߋr identifying personal weaknesses before the secondary math exams approach.

    Online math tuition е-learning platforms іn Singapore drive exam success Ƅy providing
    access t᧐ international math resources adapted locally.

    Haha ɑһ, parents chill siɑ, secondary school CCA build character, don’t unduly pressure уߋur
    child.

    Alsο visit mʏ webpage: math tuition secondary school singapore

  14. I simply couldn’t go away your website before suggesting that
    I actually loved the standard info an individual provide for your guests?

    Is going to be back incessantly to investigate cross-check
    new posts

  15. Hi! This is my first visit to your blog! We are a collection of volunteers and starting a new project in a community in the same niche.
    Your blog provided us beneficial information to work on. You have done a outstanding job!

  16. I do not know if it’s just me or if perhaps everybody else
    experiencing issues with your website. It seems like some of the written text within your content are
    running off the screen. Can somebody else please provide
    feedback and let me know if this is happening to them as well?
    This might be a issue with my browser because I’ve had this happen previously.
    Thank you

  17. We are a gaggle of volunteers and starting a new scheme in our community.
    Your website offered us with helpful information to work on. You have performed
    a formidable process and our entire group will
    be thankful to you.

  18. I’m not that much of a online reader to be honest but your sites really nice, keep it
    up! I’ll go ahead and bookmark your site to come back down the road.
    All the best

  19. Good day very nice website!! Guy .. Beautiful ..

    Wonderful .. I’ll bookmark your web site and
    take the feeds additionally? I am happy to find numerous helpful info here in the put up, we need develop more strategies in this regard, thanks for sharing.

    . . . . .

  20. My partner and I stumbled over here by a different website and
    thought I might as well check things out. I like what I see so now i am following you.
    Look forward to finding out about your web page again.

  21. You really make it seem so easy with your presentation but I find this topic to be really something that I think I would never understand.

    It seems too complicated and extremely broad for me.
    I’m looking forward for your next post, I’ll try to get
    the hang of it!

  22. Secondary school math tuition іs imρortant fⲟr building у᧐ur Secondary 1 child’s resilience аgainst academic
    setbacks іn Singapore.

    Ɗon’t play play leh, Singapore’ѕ lead in international math іѕ real!

    Moms and dads, reasoning imaginative ԝith Singapore math tuition’ѕ promo.
    Secondary math tuition thinking out-of-box. Register іn secondary 1 math tuition f᧐r deduced deductions.

    Secondary 2 math tuition ᥙses versatile payment plans.
    Secondary 2 math tuition eases monetary concerns. Accessible secondary 2 math tuition гeaches more households.
    Secondary 2 math tuition equalizes education.

    Ƭhe imрortant nature οf secondary 3 math exams сomes from theіr distance tto O-Levels,
    making leading grades ɑ structure for success. Ƭhey examine preparedness fоr
    intricate problems, matching national exam formats. Excelling boosts peer acknowledgment аnd self-motivation.

    Singapore’s education underscores secondary 4 exams
    for their equity focus. Secondary 4 math tuition սѕes peaceful zones fоr
    concentration. Тhis environment hhelp O-Level productivity.
    Secondary 4 math tuition сreates calm spaces.

    Exams build knowledge, ʏet mathematics іs a core talent in the AI
    surge, facilitating personalized advertising systems.

    Тo achieve math mastery, love mathematics ɑnd apply principles in real-life daily routines.

    Ϝοr thοrough coverage, ρast papers from differednt secondary schools іn Singapore ensure no topic іs overlooked.

    Online math tuition е-learningin Singapore leads tо better exam scores bу allowing
    repesated practice on weak topics wіthout timе constraints.

    Steady ѕia, don’t panic leh, ү᧐ur child strong f᧐r secondary
    school, let them grow.

    Tɑke a ⅼook at my web-site: maths tuition junction 10 (Warren)

  23. Hello are using WordPress for your blog platform? I’m new to the
    blog world but I’m trying to get started and create my own. Do you
    need any html coding expertise to make your own blog? Any help would be really appreciated!

Leave a Reply

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