Jump to content

windows script assistance


Recommended Posts

Guest rogv24@yahoo.com
Posted

I need to set up a script in windows XP to see if a process is

running. If its running an email should be sent

I am using MS Outlook. I have never coded a script in Windows. The

script should be a scheduled job.

 

thanks

  • Replies 5
  • Created
  • Last Reply

Popular Days

Guest Pegasus \(MVP\)
Posted

Re: windows script assistance

 

 

<rogv24@yahoo.com> wrote in message

news:1186505086.899866.229650@d55g2000hsg.googlegroups.com...

>I need to set up a script in windows XP to see if a process is

> running. If its running an email should be sent

> I am using MS Outlook. I have never coded a script in Windows. The

> script should be a scheduled job.

>

> thanks

 

You could use the Task Scheduler to run this batch file:

@echo off

set Sender=rogv24@yahoo.com

set Receiver=rogv24@yahoo.com

set Host=mail.YourISP.com

set Process=MyProcess

set Subject=%date% %time%: %Process" is running

 

tasklist | find /i "%Process%" || goto :eof

c:\tools\blat.exe "c:\boot.ini" -f %Sender% -to %Receiver% -server

%Host% -subject "%Subject%"

 

You can download blat.exe from several sites. If you

have never done this sort of thing before then you will

probably need some assistance from someone who is

familiar with your setup and especially with the SMTP

server operated by your ISP.

Guest Mark F.
Posted

Re: windows script assistance

 

 

<rogv24@yahoo.com> wrote in message

news:1186505086.899866.229650@d55g2000hsg.googlegroups.com...

>I need to set up a script in windows XP to see if a process is

> running. If its running an email should be sent

> I am using MS Outlook. I have never coded a script in Windows. The

> script should be a scheduled job.

>

> thanks

>

 

This is more a programming topic than a Windows XP topic. Before you fiddle

around with any system processes, I recommend that you do some serious

reading on the subject.

 

http://msdn2.microsoft.com/en-us/library/ms950396.aspx

http://www.microsoft.com/technet/scriptcenter/default.mspx

 

Also, if you decide to download a script, open it in notepad and read it

carefully before you run it! Newbie scripters can have their machines

trashed by malicious or poorly written code.

 

Mark

Guest rogv24@yahoo.com
Posted

Re: windows script assistance

 

On Aug 7, 1:03 pm, "Pegasus \(MVP\)" <I....@fly.com> wrote:

> <rog...@yahoo.com> wrote in message

>

> news:1186505086.899866.229650@d55g2000hsg.googlegroups.com...

>

> >I need to set up a script in windows XP to see if a process is

> > running. If its running an email should be sent

> > I am using MS Outlook. I have never coded a script in Windows. The

> > script should be a scheduled job.

>

> > thanks

>

> You could use the Task Scheduler to run this batch file:

> @echo off

> set Sender=rog...@yahoo.com

> set Receiver=rog...@yahoo.com

> set Host=mail.YourISP.com

> set Process=MyProcess

> set Subject=%date% %time%: %Process" is running

>

> tasklist | find /i "%Process%" || goto :eof

> c:\tools\blat.exe "c:\boot.ini" -f %Sender% -to %Receiver% -server

> %Host% -subject "%Subject%"

>

> You can download blat.exe from several sites. If you

> have never done this sort of thing before then you will

> probably need some assistance from someone who is

> familiar with your setup and especially with the SMTP

> server operated by your ISP.

 

Thanks for the info.

Is there a safe way to test this. Why would the system be in risk if

only I am checking if a process is running?

The bat file would be called mytest.bat. Then I would just click the

bat file to execute? so windows doesn't have its own software to send

emails I would need to use blat.exe?

Guest Pegasus \(MVP\)
Posted

Re: windows script assistance

 

 

<rogv24@yahoo.com> wrote in message

news:1186513603.496485.52940@l70g2000hse.googlegroups.com...

> On Aug 7, 1:03 pm, "Pegasus \(MVP\)" <I....@fly.com> wrote:

>> <rog...@yahoo.com> wrote in message

>>

>> news:1186505086.899866.229650@d55g2000hsg.googlegroups.com...

>>

>> >I need to set up a script in windows XP to see if a process is

>> > running. If its running an email should be sent

>> > I am using MS Outlook. I have never coded a script in Windows. The

>> > script should be a scheduled job.

>>

>> > thanks

>>

>> You could use the Task Scheduler to run this batch file:

>> @echo off

>> set Sender=rog...@yahoo.com

>> set Receiver=rog...@yahoo.com

>> set Host=mail.YourISP.com

>> set Process=MyProcess

>> set Subject=%date% %time%: %Process" is running

>>

>> tasklist | find /i "%Process%" || goto :eof

>> c:\tools\blat.exe "c:\boot.ini" -f %Sender% -to %Receiver% -server

>> %Host% -subject "%Subject%"

>>

>> You can download blat.exe from several sites. If you

>> have never done this sort of thing before then you will

>> probably need some assistance from someone who is

>> familiar with your setup and especially with the SMTP

>> server operated by your ISP.

>

> Thanks for the info.

> Is there a safe way to test this. Why would the system be in risk if

> only I am checking if a process is running?

> The bat file would be called mytest.bat. Then I would just click the

> bat file to execute? so windows doesn't have its own software to send

> emails I would need to use blat.exe?

>

 

It was Mark who warned you about certain risks, not I.

The code I suggested presents no threat at all to your

system and it is not malicious either. You must, of course,

customise it to reflect the settings at your site.

 

Blat.exe is a popular command line mailer. If you can

find a way to do the same with native Windows tools

then please post it here - after you get it going!

Guest marcus.tettmar@gmail.com
Posted

Re: windows script assistance

 

On Aug 7, 5:44 pm, rog...@yahoo.com wrote:

> I need to set up a script inwindowsXP to see if a process is

> running. If its running an email should be sent

> I am using MS Outlook. I have never coded a script inWindows. The

> script should be a scheduled job.

 

You might want to check out Macro Scheduler which can do this:

http://www.mjtnet.com/macro_scheduler.htm


×
×
  • Create New...