Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using WMI, how can I determine whether a remote process is 32-bit or 64-bit?

I have a collection of win32_process objects queried from a remote machine using WMI. How do I determine whether each process is 32-bit or 64-bit?

like image 721
musaul Avatar asked Nov 15 '22 02:11

musaul


1 Answers

WMI doesn't have this functionality. The solution is to test each process's Handle using IsWow64Process via P/Invoke. This code should help you get the idea.

like image 79
Helen Avatar answered Dec 22 '22 00:12

Helen