Question : How to identify a Task (not process) on Applications tab in Task Manager and kill the assosiated process.

I have an uninstall script that removes an application using PSEXEC. The problem is that an application error pops up during the install that points back to one of the msiexec.exe process. I need to be able to identify the task and end it along with the associated processes without having to click on the app error. I can end processes but since there are more than one msiexec.exe processes I can't just kill it by process name.
I can't fix the app error as it is a issue with the application but if I can kill the process the uninstall will complete.

Answer : How to identify a Task (not process) on Applications tab in Task Manager and kill the assosiated process.

Assuming you need to do it to numerous sites, I would probably stick the script on all the sites and edit the script to run the path of the proper uninstall executable.

Or from your end, make a batch file to copy the script before executing it with psexec.

For example:

:comp1
net use y: /d /y
ping -n 2 comp1 | find /i "TTL" >NUL
if errorlevel 1 goto comp2
echo connecting to comp1
net use y: \\comp1\c$ /user:admin password (A user with administrator priv., but may not be necessary if network is clean)
xcopy "script.vbs" "y:\folder" /y
psexec -accepteula \\comp1 cmd.exe /c "cscript c:\folder\script.vbs"
net use y: /d /y
Echo comp1 complete

:comp2
net use y: /d /y
ping -n 2 comp2 | find /i "TTL" >NUL
if errorlevel 1 goto END
echo connecting to comp2
net use y: \\comp2\c$ /user:admin password
xcopy "script.vbs" "y:\folder" /y
psexec -accepteula \\comp2 cmd.exe /c "cscript c:\folder\script.vbs"
net use y: /d /y
Echo comp2 complete

:End
Random Solutions  
 
programming4us programming4us