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
best sports betting strategy (Chase) trebles
vegas online sportsbook
Here is my web-site – bookmakers with fast payout
Здорова, народ Близкий человек уже несколько дней в запое Жена в истерике В больницу тащить страшно Короче, только это реально спасло — нарколог услуги цены адекватные Через пару часов человек пришёл в себя В общем, вся инфа по ссылке — кодирование алкоголизма вызов на дом [url=https://lechenie.narkologicheskaya-pomoshh-v-kazani016.ru]кодирование алкоголизма вызов на дом[/url] Не ждите пока станет хуже Перешлите тем кто в такой же ситуации
kdy se hraje mistrovství světa v hokeji
Also visit my blog post … Licence sázkové kanceláře (http://www.peceni-vlasim.8u.cz)
Assalomu alaykum, to’rt-besh oydan buyon shu yerda tikaman, shuning uchun tajribamni yozib qo’yay dedim. Ochig’i, avvaliga unchalik ishonmagandim — oldin ikkita platformada pul yechishda muammo bo’lgan. 888starz hozircha meni ortiqcha asabga tegmadi.
Slotlar soni rostdan ham ko’pchilikni hayratda qoldiradi — aniq sanamadim, ammo chamasi 7000 dan oshadi. Ko’pincha Pragmaticning tanish o’yinlarini aylantiraman: Sweet Bonanza bilan Gates of Olympus. Playn GOdan Book of Dead klassikasi ham bor, Yggdrasilning eskirmagan slotlari ham yetarli. Bir narsa g’ashimga tegadi — katalog filtri anchagina noqulay, kerakli o’yinni topguncha ancha varaqlaysan.
Jonli dilerlar bo’limi menga ko’proq yoqadi. Evolutionning jonli stollari ishlaydi, tirik krupyelar bilan blackjack, ruletka, Crazy Time kabi shou-o’yinlar esa kechalari to’lib ketadi. Aloqam shahar sharoitida yaxshi, shuning uchun freeze sezmadim, ammo mobil internetda ba’zan sifat pasayadi. Yangi ro’yxatdan o’tganlarga birinchi depozitga 100% bonus va 200 ta bepul aylanish beriladi, aylantirish sharti 40x ga teng — ochig’i bu yengil shart emas, shu bois men bonusni ko’pincha rad etaman. Deposit qilmasdan promo ham chiqib turadi, joriy takliflarni [url=https://vafris.is]888starz uz[/url] orqali tekshirib ko’ring.
Registratsiya ikki daqiqada bo’ldi, minimal depozit juda past — o’zim 10 000 so’m chamasida sinab ko’rgandim. Pul kiritish-chiqarishda karta, Skrill, Neteller va Bitcoin va boshqa kripto bor. USDT bilan yechish menda 20-30 daqiqa oldi, kartaga esa bir sutkacha kutdim. Verifikatsiya talab qilingan edi, albatta — pasport surati jo’natdim, tez ko’rib chiqishdi.
Telefonda ishlash qulay, Android-ga ilova saytdan yuklanadi, brauzer versiyasi ham yomon emas. Qo’llab-quvvatlash onlayn chatda ruschada 10 daqiqada javob berdi, o’zbek tilida bo’lsa har safar chiqmadi — aynan shu tomoni ozgina cho’ktiradi. Ruxsatnomasi Kyurasao, ya’ni bizda hammasi o’z mas’uliyatingizda — buni yodda tuting. O’zim har oy qancha o’ynashimni oldindan belgilab olaman va undan chiqmaslikka harakat qilaman.