Skip to content

Instantly share code, notes, and snippets.

@rasmuskl
Created January 17, 2012 09:32
Show Gist options
  • Save rasmuskl/1625861 to your computer and use it in GitHub Desktop.
Save rasmuskl/1625861 to your computer and use it in GitHub Desktop.
Set up ADPlus monitor for specific user process
@echo OFF
set PID="No"
for /F "tokens=1-2" %%A in ('tasklist /FI "USERNAME eq stpem" /FI "IMAGENAME eq PROASK.Client.Shell.exe" /NH') do (
echo Found process: %%A - PID: %%B
set PID="%%B"
)
IF %PID% == "No" GOTO :EOF
echo Starting monitor on PID: %PID%
adplus.vbs -quiet -crash -p %PID% -NoDumpOnFirst -o D:\temp
:EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment