Announcement

Collapse
No announcement yet.

Process shutdown Notifcation

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Process shutdown Notifcation

    Hi,

    I got one Application runing on my Windows XP (Server-PC) but this is not runing as a service


    In task manger under Process i can see this application.exe and under application also i can see this application.

    This application start 6.0 AM and stop 6.0PM everyday, but i want to setup notification to see this working everyday?

    How do i setup, please help. OS is
    AusNetIT Solutions

    Web Design | Web Hosting | SEO | IT Support

  • #2
    Re: Process shutdown Notifcation

    Sorry, Not too sure what your asking for?

    Are you saying that you want an email every hour or something telling you if the process is till running or if it has stopped? Or do you just want a mail at 6am saying if it's started and another at 6pm saying it's stopped?

    Michael
    Michael Armstrong
    www.m80arm.co.uk
    MCITP: EA, MCTS, MCSE 2003, MCSA 2003: Messaging, CCA, VCP 3.5, 4, 5, VCAP5-DCD, VCAP5-DCA, ITIL, MCP, PGP Certified Technician

    ** Remember to give credit where credit is due and leave reputation points sigpic where appropriate **

    Comment


    • #3
      Re: Process shutdown Notifcation

      Hi,

      " do you just want a mail at 6am saying if it's started and another at 6pm saying it's stopped?"

      YES, Because this process is not running as a Service so when the system reboot or the target map drive location disconnect no one knows it's running or not. So thats why i need a notification when it's start or stop.
      AusNetIT Solutions

      Web Design | Web Hosting | SEO | IT Support

      Comment


      • #4
        Re: Process shutdown Notifcation

        You could configure two scheduled tasks (one at 6am and one at 6pm) to run a batch file or VBS script that uses Psservice:

        http://www.microsoft.com/technet/sys...psservice.mspx

        Checks the service name and then outputs the responce into a mail or text document. I'm sure there have been discussions on how to send mails via VBS / batch files before.

        Hope this helps

        Michael
        Michael Armstrong
        www.m80arm.co.uk
        MCITP: EA, MCTS, MCSE 2003, MCSA 2003: Messaging, CCA, VCP 3.5, 4, 5, VCAP5-DCD, VCAP5-DCA, ITIL, MCP, PGP Certified Technician

        ** Remember to give credit where credit is due and leave reputation points sigpic where appropriate **

        Comment


        • #5
          Re: Process shutdown Notifcation

          Hi

          Thanks, But this process is not running as a Service So i can't use this psservice ???
          AusNetIT Solutions

          Web Design | Web Hosting | SEO | IT Support

          Comment


          • #6
            Re: Process shutdown Notifcation

            Originally posted by COSY View Post
            Hi
            Thanks, But this process is not running as a Service So i can't use this psservice ???
            Ah sorry, misread your initial post.

            Take a look at pslist:

            http://www.microsoft.com/technet/sys...es/pslist.mspx

            Not too sure if you can search by process name but it's a start.

            Michael
            Michael Armstrong
            www.m80arm.co.uk
            MCITP: EA, MCTS, MCSE 2003, MCSA 2003: Messaging, CCA, VCP 3.5, 4, 5, VCAP5-DCD, VCAP5-DCA, ITIL, MCP, PGP Certified Technician

            ** Remember to give credit where credit is due and leave reputation points sigpic where appropriate **

            Comment


            • #7
              Re: Process shutdown Notifcation

              Checking for a process on a remote computer:

              Save this code as a *.vbs file on your computer.
              And schedule this vbscript on your computer (runas a domain admin)
              Code:
              strProcName = "application.exe"
              strComputer = "computername"
              
              ' check for the process:
              Set objWMIService = GetObject("winmgmts:" _
               & "{impersonationLevel=impersonate,authenticationLevel=Pkt}!\\" _
               & strComputer & "\root\cimv2")
              Set results = objWMIService.ExecQuery _
                  (" Select * from Win32_Process where Name ='" & strProcName & "'")
              IsRunning = False
              for each obj in results
                IsRunning = True
                exit For
              next
              
              'results
              If IsRunning then
               msgbox now() & " Process " & strProcName & " is Active on " & strComputer
               'send mail: http://www.paulsadowski.com/WSH/cdo.htm
               
              ElseIf Not IsRunning Then
               msgbox now() & " Process " & strProcName & " not found on " & strComputer
               'send mail: http://www.paulsadowski.com/WSH/cdo.htm
              
              End If
              Set objMessage = Nothing
              Set objWMIService = Nothing
              \Rems
              Last edited by Rems; 14th August 2007, 11:34. Reason: edit msgbox

              This posting is provided "AS IS" with no warranties, and confers no rights.

              __________________

              ** Remember to give credit where credit's due **
              and leave Reputation Points for meaningful posts

              Comment


              • #8
                Re: Process shutdown Notifcation

                Hi Rem,

                Thanks, I'll test and let you know.

                Cosy
                AusNetIT Solutions

                Web Design | Web Hosting | SEO | IT Support

                Comment


                • #9
                  Re: Process shutdown Notifcation

                  Hi,

                  It's keep runing but no Email or msg box? I'm running from Windows Xp?



                  & "{impersonationLevel=impersonate,authenticationLev el=Pkt}!\\" _
                  & strComputer & "\root\cimv2")

                  Not sure this?
                  AusNetIT Solutions

                  Web Design | Web Hosting | SEO | IT Support

                  Comment

                  Working...
                  X