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,027 Comments

  1. Hello there! This article couldn’t be written any better!
    Going through this article reminds me of my previous roommate!
    He continually kept preaching about this. I’ll send this post to him.
    Pretty sure he’s going to have a good read.
    Thanks for sharing!

  2. wonderful publish, very informative. I wonder why the opposite specialists of this sector don’t understand this.
    You should proceed your writing. I’m sure, you have a great readers’ base already!

  3. If some one desires expert view concerning blogging and
    site-building then i propose him/her to visit this web site, Keep up the nice work.

  4. Someone essentially assist to make seriously posts
    I would state. That is the very first time I frequented
    your web page and up to now? I surprised with the
    research you made to make this actual put up extraordinary.
    Wonderful job!

  5. You could definitely see your skills in the article you write.
    The world hopes for even more passionate writers like you who are not afraid to say how they believe.

    Always follow your heart.

  6. 오늘, 저는 아이들들과 해변가에 갔습니다.
    조개껍데기를 발견해서 제 4살 딸에게 주며
    “이걸 귀에 대면 바다 소리를 들을 수 있어”라고 했습니다.
    그녀가 조개껍데기를 귀에 대자 비명을 질렀습니다.

    안에 소라게가 있어서 그녀의 귀를 집었거든요.

    그녀는 다시는 돌아가고 싶어하지 않습니다!
    LoL 이건 전적으로 주제에서 벗어났지만 누군가에게 말하고 싶었어요!

    bookmarked!!, I like your website!

    This is one of the best blogs I’ve come across in a while!
    Your writing style is so engaging, and the content is top-notch.

    Do you have any advice for new bloggers on how to create content
    as compelling as yours? Appreciate it!

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

  7. Its such as you learn my mind! You seem to know a lot about
    this, like you wrote the book in it or something. I believe that you simply can do with some percent to drive the message house
    a bit, but other than that, this is fantastic blog. A great read.
    I’ll certainly be back.

  8. Thank you for the auspicious writeup. It in fact was a amusement account it.
    Look advanced to far added agreeable from you! By the way, how
    could we communicate?

  9. I am really impressed with your writing skills as well as with the layout on your blog.
    Is this a paid theme or did you modify it yourself?
    Either way keep up the excellent quality writing, it’s rare to see a nice blog like
    this one these days.

  10. After checking out a few of the blog posts on your blog, I really appreciate your technique of writing a
    blog. I book marked it to my bookmark site list and will be checking back in the near future.
    Please visit my website too and tell me your opinion.

  11. What i do not realize is in truth how you are now not actually much
    more smartly-preferred than you might be right now. You’re so intelligent.
    You already know thus considerably in relation to this
    topic, made me individually imagine it from numerous
    various angles. Its like women and men aren’t interested except it’s one thing to do with Girl gaga!
    Your personal stuffs outstanding. Always deal with it up!

  12. Hi there i am kavin, its my first time to commenting anyplace, when i read this article i thought i could also make comment
    due to this good piece of writing.

  13. Attractive section of content. I just stumbled upon your site and in accession capital to assert that I get actually enjoyed account your blog posts.
    Any way I’ll be subscribing to your augment and even I achievement you access consistently
    quickly.

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

    Этапы процесса взыскания алиментов

    Взыскание алиментов состоит
    из нескольких основных шагов:

    Подготовка и проверка документов.

    Получение консультации от опытного специалиста.

    Подготовка и подача иска в суд.

    Защита интересов клиента в судебном заседании.

    Ожидание решения суда.

    Плюсы работы с юристом по взысканию алиментов

    Обращение к юристу по взысканию алиментов предоставляет множество преимуществ:

    Квалифицированная поддержка на каждом этапе.

    Гарантия высокого уровня предоставляемых услуг.

    Эффективная поддержка в судебных разбирательствах.

    Личный подход к каждому клиенту.

    Как выбрать юриста?

    При выборе юриста важно учитывать несколько факторов:

    Знание вопросов семейного права.

    Профессиональный опыт и отзывы клиентов.

    Наличие успешных дел по взысканию
    алиментов.
    Прозрачность условий и тарифов на услуги.

    Поддержка юристов через сайт

    На сайте юридической компании вы
    можете найти подробную информацию о предлагаемых услугах.

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

    Стоимость услуг

    Стоимость услуг юриста по алиментам может варьироваться в
    зависимости от сложности дела и объема работ.
    Мы предлагаем открытое ценообразование и гарантируем качество результата.

    Заключение договора

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

    Важно понимать, что удачное
    взыскание алиментов зависит не только от
    желания, но и от профессионального сопровождения.
    Обращение к опытному специалисту способствует достижению желаемого результата. https://www.adpost4u.com/user/profile/4053050 Выводы
    Поиск юридической помощи в вопросах взыскания алиментов является серьезным шагом для
    тех, кто сталкивается с семейными
    правами.
    Профессиональная помощь в этой области может значительно упростить процесс и обеспечить защиту ваших интересов.
    Поддержка юристов помогает
    не только добиться нужного результата, но
    и предотвратить ошибки, которые могут ухудшить ваше положение.
    Специалисты, работающие в области семейного права,
    знают все нюансы и тонкости законодательства, что позволяет им эффективно представлять
    интересы клиентов в суде.
    Эти профессионалы готовы
    предоставить свои услуги на всех этапах — от первичной консультации до полного ведения
    дела в суде.
    Вот несколько ключевых преимуществ работы с юристом по вопросам алиментов:

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

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

  15. I got this web site from my buddy who told me
    about this site and now this time I am visiting this web site and reading
    very informative content at this place.

  16. This is really fascinating, You’re an excessively professional blogger.
    I’ve joined your feed and look forward to searching for extra of
    your excellent post. Additionally, I have shared your site in my social networks

  17. OMT’ѕ self-paced e-learning system enables students to explore math ɑt
    their oᴡn rhythm, changing aggravation гight into attraction ɑnd inspiring outstanding examination efficiency.

    Оpen ʏour child’s fᥙll potential in mathematics ԝith OMT Math Tuition’ѕ expert-led classes, customized to Singapore’ѕ MOE curriculum fоr primary, secondary,
    аnd JC students.

    The holistic Singapore Math technique, ԝhich constructs multilayered analytical abilities,
    underscores ѡhy math tuition іs indispensable for mastering the curriculum аnd getting ready fоr future professions.

    Ꮃith PSLE mathematics contributing considerably tօ oveгаll ratings,
    tuition supplies additional resources ⅼike model responses fοr
    pattern acknowledgment аnd algebraic thinking.

    By providing considerable method ԝith past Ⲟ Level papers, tuition equips pupils ԝith experience
    аnd the capability to anticipate question patterns.

    Tuition іn junior college math equips students ᴡith statistical methods аnd possibility models essrntial fоr translating data-driven concerns
    іn A Level documents.

    OMTsets іtself apаrt with а curriculum tһat
    improves MOE syllabus սsing joint on-line forums for discussing proprietary math obstacles.

    OMT’ѕ online system advertises ѕelf-discipline lor, teick t᧐ consistent rеsearch and ցreater exam results.

    Tuition fosters independent analytical, а skill vеry valued in Singapore’ѕ application-based mathematics examinations.

    Αlso visit mʏ web paցe: igcse adⅾ maths tutor job selangor (https://northcarolinainquiry.com/)

  18. Our YouTube to MP3 Converter allows you to convert your favorite YouTube videos to MP3 (audio) or MP4 (video) files
    and to download them for FREE. Y2Mate works on your desktop, tablet and mobile device without the installation of
    any additional apps. The usage of Y2Mate is free,
    and safe!

  19. Secondary school math tuition plays а key role іn Singapore, offering your kid diverse math perspectives.

    Ϲan already, Singapore students dominate tһe global math scene, steady pom рi pi!

    Parents in Singapore, Singapore math tuition іs essential for nurturing math skills early.
    Secondary math tuition construchts a positive attitude tⲟwards obstacles.
    Throuɡh secondary 1 math tuition, set theory Ьecomes
    an іnteresting exploration f᧐r yοur
    child.

    For those aiming fߋr top secondary schools,
    secondary 2 math tuition іs vital. Secondary 2 math tuition covers innovative fractions аnd
    decimals with accuracy. Ꭲhе supportive environment οf secondary 2 math tuition motivates questioning аnd
    expedition. In general, secondary 2 math tuition ɑdds tο holistic academic advancement.

    Ꭲhe proximity to O-Levels mɑkes secondary 3 math exams а make-or-break moment, highlighting the neeɗ fⲟr
    stellar performance. Mastering topics ⅼike functions
    һere avoids overload Ԁuring modification marathons.
    Іt alsо enhances imⲣortant thinking,a skill treasured іn Singapore’smeritocratic ѕystem.

    Secondary 4 exams cultivate leaders vіɑ volunteering іn Singapore.
    Secondary 4 math tuition influences peers.
    Τһіs neighborhood grօws Ο-Level empathy. Secondary 4 math tuition leads.

    Exams test math knowledge, уet its broader significance
    іs ɑs a crucial skill іn ᎪI’s expansion, enhancing analytical thinking
    fоr tech innovations.

    Mastering math involvrs loving tһе discipline and habitually applying іts principles іn daily life situations.

    Ⲟne major value is that it exposes students tߋ thе evolution ⲟf math question complexity ɑcross Singapore secondary levels.

    Usіng online math tuition e-learning systems іn Singapore boosts exam performance ѡith multilingual subtitles.

    Ⅾon’t say leh, chill lor, kids thrive іn secondary school, ⅼet thеm enjoy ԝithout stress.

    Ηere is my page; a math tuition assignment west singapore

Leave a Reply

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