Ir ao conteúdo

Verificar se um processo está execução e notificar via e-mail no Windows

Olá,

Recentemente meu primo precisou um Visual Basic Script que verifica se um processo está executando e caso esteja envie um e-mail. Ele me pediu ajuda para criar este script e eu resolvi ajudar.

Visual Basic Script para verificação de processo em execução e notificação via E-mail.

Verificar se um processo está em execução com Visual Basic Script e mostrar uma janela se estiver.
[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]

Enviar e-mail utilizando Visual Basic Script:
[code lang=”vb”]
Const username = “SENHA”
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]

Estes dois scripts foram mesclados para realizar o que precisávamos.

Abraços,
Matheus

Referencias:
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

Publicado emwindows

8.464 Comentários

  1. يعني أنا لسه تقريبًا نص سنة بشتغل على الموقع ده وقلت أكتب تجربتي بدل ما الناس تسأل في الخاص. أول حاجة إن المكتبة كبير بشكل مش طبيعي — أكتر من 6000 لعبة تقريبًا، ومش كلها زبالة زي بعض المواقع. براجماتيك موجودة بقوة وكمان NetEnt وYggdrasil.

    أنا شخصيًا بقعد أطحن في سويت بونانزا، وواحد صاحبي مش بيسيب Book of Dead. آخر حاجة لعبتها كان حاجات Microgaming وعجبتني صراحة. إنما اللي بيضايقني إن البحث جوه التطبيق بيهنج أحيانًا لما تفتح كل الأقسام.

    الـlive هو اللي مخليني فاضل — Evolution مشغلاه، كروبيهات حقيقيين والصورة نضيفة حتى لما النت بيبوظ شوية. Crazy Time تحديدًا بتاخد وقت طويل، وفيه طاولات عربي وده مريح. على فكرة في البونص هو 100% لحد 1500 جنيه بالإضافة لـ شوية فري سبينز مش كلها مرة واحدة، والـwagering 35x وده مش سيء مقارنة بغيرهم. ممكن تراجع آخر العروض والأكواد على [url=https://888starz-apk12.com]888bet download[/url] قبل ما تسجل لأن الأرقام بتتبدل كل فترة.

    التسجيل أخد مني دقيقتين، والحد الأدنى للإيداع صغير — من 1 دولار تقريبًا. طرق الشحن بيدعم فيزا وماستركارد، Skrill وNeteller، وبيتكوين وUSDT وأنا بفضلها صراحة. السحبة اللي فاتت جالي في نفس اليوم بالـكريبتو، لكن بالتحويل البنكي أخد يومين تلاتة.

    على الموبايل مفيش مشاكل — تثبيت الـapk بيتم من موقعهم مباشرة زي كل مواقع المراهنات. 888starz تحديث بيجيلك إشعار والحمد لله. الدعم بيرد بسرعة بس ساعات بيردوا بإنجليزي الأول. الرخصة كوراساو ومعروف إنه مش صارم زي مالطا، يعني خليك واعي وحط ليمت لنفسك.

  2. OK — have been messing about with this thing for something like four months now and I keep coming back, so figured I’d chuck my thoughts in since a lad on another thread asked me the other day. Am in the UK, generally bet football and racing, small stakes, just so you know where I’m coming from.

    The reason I started using it was genuinely pretty stupid — I could never figure out what an e/w payout actually came to with 1/5 odds a place. I’d just guess and moan when the payout landed. Now stick my stake in before every slip, even the boring singles.

    The single bet calculator is the bit I use most — type in your stake, the odds and you get the return straight away, fractional or decimal, doesn’t matter. There’s also the bigger stuff — acca and treble maths, lucky 15 and lucky 63, yankees, and that’s where I’d always got it wrong. If you want a look, it lives at [url=https://single-calculator.com]ew single calculator[/url] and there’s no login wall, which I appreciated.

    One thing that really made a difference were the nerdier bits. The probability converter and it makes obvious what margin’s baked in, and a kelly criterion tool — I run quarter kelly as the full version is a quick route to a dead bankroll. The dutching one is handy too when I’m covering two or three runners.

    Couple of gripes. The layout feels very functional, let’s say — zero polish, which honestly I don’t mind but some will. On mobile it’s fine but the lucky 63 breakdown are a squeeze. Also there’s no proper app, it’s a website and that’s it — doesn’t bother me but you asked.

    So yeah. Doesn’t cost anything, not plastered in adverts, works. If you honestly does the maths on paper, try it — saves me plenty of dumb bets I’d have regretted.

  3. Right — been using this thing for about six months now and it’s basically bookmarked at this point, so thought I’d chuck my thoughts in since a mate asked me the other day. I’m in the UK, mostly do football and horses, nothing mad, just so you know where I’m coming from.

    What got me on it was actually a bit daft — I could never work out what an ew return actually was when the place terms changed. I used to just guess and then be surprised. Now I punch the numbers in before every slip, even a straight one-selection punt.

    Their single bet calculator is the one I use most — you drop in your stake, the odds and you get profit and total return straight away, fractions or decimals. There’s also the bigger stuff — acca and treble maths, lucky 15s, a yankee, and that’s where most people I know lose track. If you fancy a poke about, it lives at [url=https://single-calculator.com/bet-calculator/odds-converter]bet odds converter[/url] and there’s no login wall, which I appreciated.

    What actually shifted things for me were the nerdier extras. There’s an probability thing that shows how much the bookie’s taking, and there’s the kelly calculator — I use half kelly since full stakes are far too aggressive. The dutch tool is handy too if I’m covering two or three runners.

    Couple of gripes. The design looks pretty plain — no flash, looks like it was built by someone who cares more about maths than colours. On my phone it’s fine although the lucky 63 breakdown are a squeeze. And nothing on the app store, just the site — doesn’t bother me but you asked.

    Anyway. Costs nowt, not plastered in adverts, does the job. If you even now does the maths on paper, try it — it’s saved me a fair few arguments with the bookie.

  4. OK — have been messing about with this thing for about six months now and I keep coming back, so thought I’d write something up since a lad on another thread asked me the other day. Am UK based, generally do football and horses, nothing mad, for context.

    The reason I started using it was actually a bit daft — I couldn’t ever figure out what an e/w payout would be with 1/5 odds a place. I used to just eyeball it and moan when the payout landed. Now stick my stake in before I place anything, even the boring singles.

    The single bet calculator tool is the one I open most — type in stake and odds and it spits out returns instantly, fractions or decimals. Same tool covers the multiples — trebles maths, lucky 15 and lucky 63, yankees, honestly that’s where most people I know mess it up. Have a go yourself, it’s over at [url=https://single-calculator.com/bet-calculator/dutch]betting dutching calculator[/url] and there’s no login wall, which I appreciated.

    What actually changed how I bet were the more serious tools. They’ve got an probability calculator and it makes obvious the overround, plus a kelly criterion calculator — I stick to fractional kelly since full stakes are terrifying. The dutch tool gets used a fair bit if I’m spreading across selections.

    It’s not perfect mind. Its interface is a bit basic — not much flash, it’s clearly function over form. On mobile it’s usable but the acca grid make you pinch and zoom. And no app, it’s browser only — slight shame but worth saying.

    Right, that’s me. Doesn’t cost anything, no ads shoved in your face, does the job. If anyone still does the maths on paper, have a look — saved me plenty of dumb bets I’d have regretted.

  5. Llevo como cinco meses en 888starz y la verdad tenia dudas al principio, porque aqui en Espana uno se cansa de sitios que se caen cada dos por tres. El registro me llevo tres minutos, correo y contrasena y ya esta, y el deposito minimo ronda los 1-2 euros, asi puedes tantear sin jugarte el sueldo.

    De tragaperras hay una barbaridad — andan por 8.000 titulos entre Pragmatic Play, NetEnt, Play’n GO, Betsoft y Yggdrasil. Mis habituales son Gates of Olympus y Sweet Bonanza, eso si de vez en cuando pruebo cosas de Big Time Gaming. La pega es que encontrar un juego concreto es un lio cuando tienes 8.000 cosas delante.

    La parte de crupier real corre a cargo de Evolution y se nota la diferencia: blackjack con gente real, Crazy Time para el que le guste el show. El bono de bienvenida ronda el 100% hasta 300€ mas 150 tiradas, el wagering esta en x35, que no es regalado pero tampoco un robo. Tambien hay algun free spin sin deposito, puedes mirar lo que hay vigente desde [url=https://888starz-es8.com/promotions]888starz promo[/url] porque cambian cada mes.

    El tema de sacar pasta va bastante fino. Cobre hace poco via e-wallet y lo tuve en 40 minutos. Con tarjeta se va a dos o tres dias, nada nuevo. Tienen Neteller, Bitcoin que es lo mas rapido con diferencia.

    En el telefono funciona bien, la app de Android existe si bien la version web hace el mismo apano. El chat de ayuda te contesta en castellano, no fue instantaneo pero tampoco eterno con una duda de documentacion. Operan con licencia de Curazao, no esta regulado por la DGOJ espanola y eso cada uno que lo valore. A mi de momento me ha respondido, y sin volverse loco con los bonos.

  6. Vengo jugando casi medio ano en 888starz y la verdad tenia dudas al principio, porque en Espana acabas quemado de casinos que prometen mucho. Abrir la cuenta fue cosa de tres minutos, los datos basicos y fuera, y el deposito minimo ronda los 1-2 euros, cosa que agradezco para tantear.

    En cuanto a maquinas tienen un catalogo enorme — hablamos de unos 10.000 titulos entre Pragmatic Play, NetEnt, Play’n GO, Betsoft y Yggdrasil. Yo tiro mucho de Sweet Bonanza y Book of Dead, si bien de vez en cuando pruebo alguna de Microgaming. Lo que me raya es que el filtro por proveedor a veces se atasca cuando hay tantisimo.

    El casino en directo esta llevada por Evolution y eso se nota: blackjack con gente real, los game shows tipo Crazy Time si te va el rollo espectaculo. El paquete de bienvenida es de un 100% con 150 tiradas, el wagering esta en x35, nada raro comparado con otros. Va rotando bonos sin deposito de vez en cuando, conviene revisar los terminos actualizados directamente en [url=https://888starz-es10.com/payments]888starz withdrawal[/url] porque cambian cada mes.

    Las retiradas es lo que mas me ha sorprendido. Retire el otro dia por Skrill y me llego en menos de una hora. Por Visa o Mastercard tarda mas, como en todos lados. Tienen Neteller, Bitcoin si no te asusta el tema.

    En el telefono funciona bien, hay APK para Android aunque la web movil me va igual de bien. El soporte te contesta en castellano, no fue instantaneo pero tampoco eterno la vez que tuve un lio con la verificacion. Licencia de Curazao, no esta regulado por la DGOJ espanola y eso cada uno que lo valore. Por ahora no me ha fallado, pero ojo con el rollover de las promos.

  7. Ya llevo unos cuantos meses con 888starz y para que mentir tenia dudas al principio, ya que por aqui te cansas de paginas que venden humo. El registro me llevo tres minutos, correo y contrasena y ya esta, y el deposito minimo es de 1-2 euros, cosa que agradezco para tantear.

    De slots hay una barbaridad — creo que pasan de 8.000 slots entre Pragmatic Play, NetEnt, Play’n GO, Betsoft y Yggdrasil. Yo tiro mucho de Sweet Bonanza y Book of Dead, si bien he tocado tambien alguna de Microgaming. Lo que me raya es que el buscador va un poco lento cuando hay tantisimo.

    La zona en vivo corre a cargo de Evolution y se nota la diferencia: mesas con crupier en espanol, Crazy Time para el que le guste el show. El paquete de bienvenida es de un 100% hasta 300€ con 150 tiradas, el wagering esta en x40, que es lo normal del mercado. Tambien hay alguna promo sin deposito, yo miraria lo que hay vigente directamente en [url=https://888starz-es10.com/app]888starz app download latest version[/url] antes de meter dinero.

    El tema de sacar pasta me ha ido mejor de lo que pensaba. Saque hace poco por Skrill y me llego en menos de una hora. Con Visa se va a dos o tres dias, como en todos lados. Aceptan tambien Neteller, Bitcoin si no te asusta el tema.

    En el telefono va suave, la app de Android existe si bien la version web hace el mismo apano. La atencion al cliente esta en espanol, me atendieron rapido cuando pregunte por el KYC. La licencia es de Curazao, no esta regulado por la DGOJ espanola y hay que saberlo antes de entrar. A mi de momento me ha respondido, aunque las promos hay que leerlas con lupa.

Deixe um comentário

O seu endereço de e-mail não será publicado. Campos obrigatórios são marcados com *