Author Topic: problem with error 213: processlist=tlistproc0  (Read 248 times)

Garry

  • Newbie
  • *
  • Posts: 3
problem with error 213: processlist=tlistproc0
« on: May 02, 2022, 02:44:47 pm »
This is part of my scripts that fail with error code:213

I assume it is the wwprc44i.dll causing the problem.

Note the copy below has all the lines commented out to make the rest of the script run ok.

It's just a thing I put in wbt scripts to run winbatch at high priority.

Here's the part of the scripts that cause the error:

;;;SET WINBATCH TO HIGH PRIORITY
;AddExtender("WWPRC44I.DLL")
;Processlist=tListProc()
;lookfor="Winbatch"
;ptr=StrIndexNC(processlist,lookfor,0,@FWDSCAN)
;If ptr==0
;   Message(lookfor,"Not found")
;   Exit
;EndIf
;ptr=StrIndex(processlist,"|",ptr,@FWDSCAN)
;ptr2=StrIndex(processlist,@TAB,ptr,@FWDSCAN)
;If ptr2==0;if last item in list
;   pid=StrSub(processlist,ptr+1,-1)
;Else
;   pid=StrSub(processlist,ptr+1,ptr2-ptr-1)
;EndIf
;;;Message(lookfor,pid)
;ret = tSetPriority(pid,128);set to high priority

How can I fix this problem?

td

  • Tech Support
  • *****
  • Posts: 4184
    • WinBatch
Re: problem with error 213: processlist=tlistproc0
« Reply #1 on: May 02, 2022, 03:10:04 pm »
The problem could have one of three possible causes:
1. The calling process (WinBatch) does not have read access to the HKEY_Local_Machine\Software\Microsoft\Windows NT\CurrentVersion\perflib\009 virtual registry key.
2. Performance counting might be disabled on the machine executing the script.
3. Performance counters are corrupt.

Three is the most common problem and can often be fixed by executing the "lodctr /R" command from an elevated command prompt.

You can check for disabled performance counters by looking for the HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\PerfProc\Performance["Disable Performance Counters"] value.

Permission issues can be settled by executing the script from an account with the proper permissions like an admin account if necessary.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

Garry

  • Newbie
  • *
  • Posts: 3
Re: problem with error 213: processlist=tlistproc0
« Reply #2 on: May 04, 2022, 03:04:57 pm »
Since I didn't see anything in the registry called "Disable Performance Counters" I tried the lodctr /R command as an administrator and it worked.

I only re-enable the section of code in one of my winbatch scripts and it works now so I'll have to try the other scripts containing the same code.

Usually just rebooting would solve the problem but I guess this time the counters were completely gone.

The lodctr /R command said it rebuilt the counter from a recovery file/system.

td

  • Tech Support
  • *****
  • Posts: 4184
    • WinBatch
Re: problem with error 213: processlist=tlistproc0
« Reply #3 on: May 05, 2022, 07:22:34 am »
As mentioned previously corrupt performance counters are the most common cause of your problem. The corruption is usually the result of a buggy performance counter extension installed by some 3rd party application or a WMI application fiddling with the registry according to our friends at MSFT.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade