Win32 Service related Q

Win32 Service related Q

Post by Suchrithaa » Wed, 11 Feb 2004 22:58:48


Hi all,

Is it possible to create a service that should run only on User's A/c?
Also, from the CreateService() documentation in MSDN it seems the service
runs always in System A/c. Is it true always?

I am facing a specific problem when I launch a .html help from a service.
The .html file has a link to access web and since it was launched on behalf
of System A/c there is no way that you can protect this user who is
launching this help file from a company's internet policy. I just want to
protect the user browsing the web through this link in help file in this
scenario.

Thanks for your help in advance,
Suchrithaa
 
 
 

Win32 Service related Q

Post by U21lYWdvb » Thu, 12 Feb 2004 03:46:07

There are several different ways to do what you want
When you install the service, you can specify a user account in which the service will have it's context (when running)

You can also run as one of the other accounts, see: http://www.yqcomputer.com/

You can also use ImpersonateLoggedOnUser API to impersonate the logged on user

Hope this helps some..

-- Sme

 
 
 

Win32 Service related Q

Post by Suchrithaa » Fri, 13 Feb 2004 16:33:47

Thanks for your help. But I am facing a new issue, ie I have got struct at
getting the password for the logged on user.

I have tried to achieve this using NetUserGetInfo() and as per doc the the
member
var usri3_password of _USER_INFO_3 structure returns NULL. So, is it not
possible at all to get the password for the logged on user? I need this
information urgently to pass this as an argument to LogOnUser() API. Your
quick help towards this issue is very much appreciable.

Regards
Suchrithaa




service will have it's context (when running).
http://www.yqcomputer.com/
for more details.
user.