Invoking PID in Task Manager

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there a way to invoke the PID that exists in the Task Manager using batch
command?
or using Windows scripting that is to be included in the batch file.
 
To what end?

--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

:
| Is there a way to invoke the PID that exists in the Task Manager using
batch
| command?
| or using Windows scripting that is to be included in the batch file.
 
Is there a way to invoke the PID that exists in the Task Manager using batch
command?
or using Windows scripting that is to be included in the batch file.

ActivatePID YourPid

@echo Off
if {%1}=={} @echo Syntax: ActivatePID PID&goto :EOF
if exist "%TEMP%\ActivatePID.vbs" goto :doit
@echo dim objArguments, pid>"%TEMP%\ActivatePID.vbs"
@echo Set WshShell = CreateObject("WScript.Shell")>>"%TEMP%\ActivatePID.vbs"
@echo Set objArguments = Wscript.Arguments>>"%TEMP%\ActivatePID.vbs"
@echo pid = objArguments(0)>>"%TEMP%\ActivatePID.vbs"
@echo WshShell.AppActivate pid>>"%TEMP%\ActivatePID.vbs"
:doit
cscript //nologo "%TEMP%\ActivatePID.vbs" %1

Jerold Schulman
Windows Server MVP
JSI, Inc.
http://www.jsiinc.com
http://www.jsifaq.com
 
Jerold. is this the PID(Process ID ) in Task Manager? or
is this the Product ID.
What i actually wanted was when a certain process starts, can the Task
Manager or the System send a notification of the started process and its ID
to a variable that i declared using the batch file that i made.
 
Back
Top