4 Replies Latest reply on Apr 10, 2012 10:04 AM by Bill Robinson

    NSH command to check for a Windows Process

      Hi all,


      I'm trying to write an NSH script that performs an action depending on whether a Process is running on a Windows server in our environment. From what I understand from the NSH documentation, the 'blquery' command can only be used to check for a Service.


      nexec -e tasklist /FI "imagename eq processname.exe" returns the processname if it is running, however I've no idea how to build this into an if, then, else statement based on the output (I'm new to scripting if you hadn't already guessed ).


      Please can anyone advise of an easy way of accomplishing this?


      Thank you