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
1xbet tr [url=https://nupel.net/]1xbet tr[/url] .
Стоимость капельницы от похмелья в Самаре зависит не только от прайса клиники, но и от состава инфузионной терапии, срочности выезда, времени суток и общего состояния пациента, включая возможные последствия алкоголизма. Базовые программы обычно включают осмотр специалиста, постановку капельницы и стандартный набор растворов для снятия интоксикации. Если состояние тяжелее, может потребоваться кодирование или лечение в стационаре, что увеличивает цену из-за расширенного состава препаратов и более длительного наблюдения.
Разобраться лучше – [url=https://kapelnicza-ot-pokhmelya-samara-7.ru/]капельница от похмелья на дом[/url]
One final thing to consider is whether to play live dealer roulette or one of the video options that uses an RNG. This is ultimately a matter of personal preference; I like live dealer roulette, because it feels like an authentic casino experience, but hardcore gamblers might prefer the speed with which video roulette operates. Completion: Earn 50,000 chips There’s more to MrQ than reel spinning. Dive into blackjack, roulette, and baccarat with no downloads or delays; simply fast table play played your way. Want to find your favourites faster? Our mobile-first game lobby helps you bookmark and revisit top titles with ease. Super Stake Roulette is Stakelogic’s first multiplier roulette game and is also innovative. One final thing to consider is whether to play live dealer roulette or one of the video options that uses an RNG. This is ultimately a matter of personal preference; I like live dealer roulette, because it feels like an authentic casino experience, but hardcore gamblers might prefer the speed with which video roulette operates.
https://sigformcares.org/how-to-delete-your-account-at-grand-mondial-casino-2/
Cons: No sports betting; No mobile app. Ipopituitarismo: un approccio moderno alla modulazione degli androgeni It has over 1,500 slot machines and around 500 tables with sky-high limits that only high rollers can afford, with other words however many end. Big Time Gaming is the master of big-time wins, there is no requirement to download or create an account on our site. Bahraini citizens can now access various foreign casinos online and enjoy thousands of casino games wherever they might be, you can apply for the EcoCard supported by MasterCard. No, 7bet online casino does not currently offer a dedicated mobile app. Big Bass Bonanza Slot To claim our welcome bonus, first you need to sign up for a Mecca Games account. Tap the “Join” button on the top right corner of this page and you’ll need to provide us with some personal information. Once you’ve signed up and logged into your account, you’ll need to make a minimum payment of at least £10 into your account. Once you do, you’ll get the £40 bonus and 50 free spins on Big Bass Bonanza.
перепланировка квартиры в москве [url=https://pereplanirovka-kvartir16.ru/]pereplanirovka-kvartir16.ru[/url] .
Наркологический стационар в Санкт-Петербурге предоставляет пациентам комплексное лечение зависимости от психоактивных веществ. Проблемы, связанные с алкоголизмом, наркоманией и другими формами зависимости, требуют индивидуального подхода и профессиональной помощи. Комплексное лечение в таких учреждениях позволяет не только пройти детоксикацию, но и получить полноценную реабилитацию, что дает пациентам шанс на долгосрочную ремиссию и улучшение качества жизни. В некоторых случаях, при запое или необходимости выезда на дом, может быть предложен центр, где решаются все вопросы, связанные с лечением зависимости и восстановлением пациента.
Углубиться в тему – [url=https://narkologicheskij-staczionar-sankt-peterburg-1.ru/]лечение в наркологическом стационаре[/url]
Как поясняет нарколог Дмитрий Кузнецов: “Реабилитация алкоголиков должна быть многогранной. Только при сочетании медицинских и психологических методов, а также поддержке со стороны специалистов на всех этапах лечения, можно добиться устойчивого результата. Психологическая работа с пациентом помогает ему не только преодолеть зависимость, но и восстановить нормальное функционирование в обществе.” Также стоит отметить, что в некоторых случаях помощь может быть предоставлена бесплатно, и пациент может получить доступ к данным о возможных вариантах бесплатной реабилитации, что значительно облегчает процесс выздоровления.
Получить больше информации – [url=https://reabilitacziya-alkogolikov-moskva-1.ru/]клиника реабилитации алкоголиков[/url]
Многие семьи слишком долго откладывают обращение к услугам нарколога, надеясь, что человек «отойдет сам», выспится, восстановится за день-два или просто даст очередное обещание больше не повторять употребление. На практике такие ожидания часто только отнимают время. Если зависимость уже начала формироваться, самочувствие после алкоголя становится тяжелее, а промежутки между срывами сокращаются, это говорит о том, что проблема вышла за пределы бытовой и требует профессиональной оценки.
Выяснить больше – http://narkologicheskaya-pomoshh-voronezh.ru/