yalishandar / tasklist-rs

Get the process name or process id on windows
19 stars 3 forks source link

Access denied when accessing `tasklist::get_proc_params(i.get_pid())` #4

Open webnoob opened 9 months ago

webnoob commented 9 months ago

I understand this is a permission issue but I've just re-installed windows (going from 10, to 11) and am now getting access denied WIN32_ERROR(5) when trying to use tasklist::get_proc_params(i.get_pid()).

I'm just trying to get the file name the process was booted with but this is stumping me.

I'm the only user on my PC so have admin etc.

webnoob commented 9 months ago

I just the comment against the package

remember some infomation need higher privilege in some specific windows versions

I guess this is the issue. Running my app as admin doesn't seem to help though.

raspberryhusky commented 2 months ago

mabe you do not have enough privileges, try to do this in your main function. tasklist::enable_debug_priv();