Home All Groups Group Topic Archive Search About

Can I run a service with a user profile

Author
14 Aug 2006 6:57 AM
Scewbedew
I have created a service that is running under the SYSTEM account. Using an
IPC channel, a (non-administrative) user can call the service, requesting a
program installation.

The reason for having the service is to run the program installation with
elevated rights, so I don't want the service to impersonate the user. But
what I *do* want is the service to use the user profile (HKCU, correct My
Documents path and so on).

Is this possible?

Author
15 Aug 2006 12:56 PM
Nicole Calinoiu
Why are you attempting to affect a given user's settings at install time?
What will happen if your application is run under another user account?  In
order to avoid such problems, it's generally a better idea to write
user-specific data at run time rather than install time.

That said, you can work around the profile issue by working against the
user's subkey under HKEY_USERS rather than attempting to work against HKCU.


Show quoteHide quote
"Scewbedew" <Scewbe***@discussions.microsoft.com> wrote in message
news:DBE13482-823A-4FD8-BCFE-4BD4EA47F224@microsoft.com...
>I have created a service that is running under the SYSTEM account. Using an
> IPC channel, a (non-administrative) user can call the service, requesting
> a
> program installation.
>
> The reason for having the service is to run the program installation with
> elevated rights, so I don't want the service to impersonate the user. But
> what I *do* want is the service to use the user profile (HKCU, correct My
> Documents path and so on).
>
> Is this possible?