There has been a few tricks. One of them is to update the registry setting. Add the following key using your registry editor.
Windows Registry Editor Version 5.00
Other small trick is to use a performance counter. There is a counter called \Process\ID Process. That will identify the process id of the “w3wp#N”instance you’re looking at.
You can use on run: c:\Windows\system32\inetsrv\appcmd list wp to get the list of w3wp processes and their relevant process ids.
Hope it helps