Question Adjusttokenprivileges, Sedebugprivileges and process reading

StriderH2

New member
Joined
Oct 6, 2010
Messages
1
Programming Experience
Beginner
I have a program that adds process paths to a listbox.

In windows 7 I am trying to get the path of audiodg.exe.

I am using this code:
try
dim prc as process
for each prc in getprocesses()
prc.mainmodule.filename
next
catch
end try

But it returns access denied, discontinuing the for loop. When I look at the exception it shows the "openprocess(int32).." code needed to check the process, I want to rewrite that to allow vm_read or set debug privileges. Sorry but "sedebugprivileges" makes zero sense and I am trying to understand how to use the declarations, dlls etc.


*I understand this will not work normally and requires the adjusting of token privileges, but there is little to no examples/documentation covering exactly how to do this. I need a steady example explaining how these procedures are used to allow a protected process (audiodg.exe) to be read.


Am supposed to set debug privileges for my program or the process that I am trying to read?
 
Back
Top