"run as" possibility

G

Guest

Hi there,

I wrote an application which use WMI and get infos from Active Directory.
Now we wan't to implement a that the programm can run with "run as"
possibility. When we tried it was not possible to run the programm correctly.
With an administrative privileg there is no trouble.
How can I do that?

Many thanks
Timo
 
W

William DePalo [MVP VC++]

Timo said:
I wrote an application which use WMI and get infos from Active Directory.
Now we wan't to implement a that the programm can run with "run as"
possibility. When we tried it was not possible to run the programm
correctly.
With an administrative privileg there is no trouble.
How can I do that?

If you are using WMI from within a program, check the docs for
CreateProcessAsUser()

http://msdn.microsoft.com/library/d...ry/en-us/dllproc/base/createprocessasuser.asp

or CreateProcessWithLogonW()

http://msdn.microsoft.com/library/d...n-us/dllproc/base/createprocesswithlogonw.asp

which could launch the program that does the WMI stuff.

If you are using a scripting language, your script would have launch an
executable which would call one of the functions above to run the script.

Regards,
Will
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top