Quantcast
Channel: Support Portal
Viewing all articles
Browse latest Browse all 1298

Re : Skype and Java Updating best practices

$
0
0
Hey drumpat01,

Sure I can. I am not a scripting expert or anything, but maybe you can use it as a jumping off point.
  1. @ECHO OFF
  2. REM sleep 15

  3. tasklist | find "Greenshot" > NUL 2>&1 && set terminateproc=0 || set terminateproc=1 
  4. REM echo %terminateproc%
  5. if %terminateproc% == 0 (
  6. taskkill /F /T /IM Greenshot*
  7. )

So basically what this does is it lists all the processes currently on the system and 'looks' for a process that contains "Greenshot". You would replace "Greenshot" with the name of your process. Then if the find is "successful" then "terminateproc" is set to 0. This means that we need to kill the process. If the "Greenshot" process is not found, then "terminateproc" is set to 1 and we do nothing at all.

In the "if" statement, we just check if "terminateproc" is set to 0 and if it is then the taskkill command is run.

You can remove the "REM" beside the echo to see if your "terminateproc" is getting set properly.

Hopefully this helps.

Cheers

Viewing all articles
Browse latest Browse all 1298

Trending Articles