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
švýcarsko česko hokej online, Boyd, rakousko hokej vstupenky
Обращение в частную наркологическую клинику проводится анонимно. Информация о пациенте, диагнозе, проводимых процедурах и факте обращения защищена политикой конфиденциальности. Сотрудники соблюдают требования к обработке персональных данных и медицинской тайне. Получить первичную консультацию можно круглосуточно: консультант ответит на вопрос, расскажет, какие методы лечения применяются в конкретной ситуации, объяснит цены и поможет выбрать между помощью на дому, амбулаторным лечением и госпитализацией в стационар.
Изучить вопрос подробнее – [url=https://narkologicheskaya-klinika-moskva15.ru/]narkologicheskaya-klinika-v-moskve[/url]
Наркологическая клиника «РеМед Карелия» — это круглосуточная медицинская помощь, построенная на принципе клинической точности: каждая процедура имеет цель, проверяемые маркеры и назначенное окно переоценки. Мы используем современные методы детоксикации и постабстинентной стабилизации, не перегружая терапию «на всякий случай» и не полагаясь на универсальные «сильные капельницы». Вместо этого — модульные схемы, корректировка одного параметра за раз и обязательная оценка результата. Такой подход снижает фармаконагрузку, ускоряет восстановление сна и аппетита и делает лечение предсказуемым для пациента и его семьи. Анонимность встроена в процессы: немаркированные входы, гражданская форма персонала, нейтральные формулировки в документах, «тихие» уведомления и разграниченный доступ к карте наблюдения.
Углубиться в тему – http://narkologicheskaya-klinika-v-petrozavodske15.ru/chastnaya-narkologicheskaya-klinika-petrozavodsk/
foro de apuestas al mundial (Trudi)
deportivas
plataformas para casas de apuestas de españa deportivas
combinada 4 5 diferentes tipos de apuestas deportivas (Veta)
app apuestas tenis copa davis (inspiri.es)
scommessa Quote scommesse partite coppa italia mondiali
casas Nueva casa de apuestas en colombia
sin licencia
paginas casas De apuestas bonos De Bienvenida apuestas con paypal
sitios de apuestas peru chile (Brigette)
tarjetas en Apuestas deportivas legales – https://mining-geologist.com, deportivas
kombiwette spiel abgesagt
Feel free to visit my web site: Basketball Wett strategien
juegos casa de apuestas Legales en españa; http://Dev.exchange360.es/top-10-errores-De-novato-Al-apostar-en-Tenis/, apuestas gratis
мелбет зарегистрироваться киргизия [url=https://coronavirus-online.ru/how-to-play-slots-safely/]мелбет зарегистрироваться киргизия[/url]
centri toto Papa scommesse
valencia madrid bonos gratis sin deposito apuestas
ofertas en casas de Apuestas de apuestas bono sin deposito
lottomatica scommesse live italia spagna
que quiere decir stake en apuestas barcelona real sociedad –
Matthew –
jugador sevilla Cuotas Apuestas Champions deportivas
Scommesse e pronostici sportivi kings league
gol gol miglior online scommesse italia (Nellie)
Apuestas Quien Ganara El Mundial beisbol
celta barcelona apuestas (https://www.peluqueriabarberia.com/) mexico polonia