作为[用户]而不是[系统]运行的服务 [英] Service running as [user] rather than [system]

查看:55
本文介绍了作为[用户]而不是[系统]运行的服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我有一项服务需要访问当前的用户注册表,时间为

时间。

但是服务只能作为SYSTEM而不是当前用户。


如何更改?或者至少得到服务以当前用户启动

应用程序而不是SYSTEM


非常感谢


Sims

解决方案

您始终可以作为特定用户启动服务。只需转到服务,

选择您的服务并获取属性,在那里您可以看到LogOn选项卡,

并选择登录为此帐户选项,并给出用户名passwd。


" Sims" < SI ********* @ hotmail.com>在消息中写道

news:u0 ************** @ tk2msftngp13.phx.gbl ...


我有一项服务需要从时间
到时间访问当前用户注册表。
但是服务只能用作SYSTEM而不是当前用户。

我怎么能改变它?或者至少得到服务以启动一个
应用程序作为当前用户而不是系统

非常感谢

模拟人生


您始终可以作为特定用户启动服务。只需转到服务,
选择您的服务并获取属性,您可以在那里看到LogOn
选项卡,然后选择登录为此帐户。选项,并给出用户名,
passwd。




谢谢,


但我怎么能这样做以编程方式?

当我安装服务时,我没有看到选项将其安装为这个

帐户而非。

我可以手动完成,但我想让安装程序自行完成。


Sims


2月7日星期六2004 09:49:32 UTC,模拟人生 < SI ********* @ hotmail.com>写道:

您始终可以作为特定用户启动服务。只需转到服务,
选择您的服务并获取属性,您可以在那里看到LogOn


标签,

并选择登录为此帐户。选项,并提供用户名,


passwd。



谢谢,

但是如何我可以通过编程方式执行此操作吗?
当我安装服务时,我没有看到将其安装为此
帐户的选项。
我可以手动完成但是我可以希望安装程序能够自行完成。

模拟人生



模拟人生,


重新检查CreateService调用。有两个字段是指向帐户用户ID和密码的指针

。如果这些字段是作为NULL传入的
,则使用SYSTEM帐户。这就是为特定用户设置
的方法。如果需要,您也可以稍后更改。


另一种方法是更改​​SID以访问特定的

用户。我还没想到这一切,所以我不能指你到一个

来源。当你的服务需要同时在几个不同的账户下工作时,可以使用这个。


祝你好运,


David


Hi,

I have a service that need to access the current user registry from time to
time.
But a service only works as a SYSTEM and not as the current user.

How can i change that? Or at the very least get the service to launch an
application as the current user and not the SYSTEM

Many thanks

Sims

解决方案

You can always start a service as a particular user. Just goto services,
select your service and take the properties, there you can see a LogOn tab,
and choose Log on as "This account" option, and give the user name, passwd.

"Sims" <si*********@hotmail.com> wrote in message
news:u0**************@tk2msftngp13.phx.gbl...

Hi,

I have a service that need to access the current user registry from time to time.
But a service only works as a SYSTEM and not as the current user.

How can i change that? Or at the very least get the service to launch an
application as the current user and not the SYSTEM

Many thanks

Sims



You can always start a service as a particular user. Just goto services,
select your service and take the properties, there you can see a LogOn tab, and choose Log on as "This account" option, and give the user name, passwd.



Thanks,

But how can i do that programmatically?
When i install the service i don''t see an option to install it as ''This
account'' rather.
I can do it manually but i want the install procedure to do it itself.

Sims


On Sat, 7 Feb 2004 09:49:32 UTC, "Sims" <si*********@hotmail.com> wrote:

You can always start a service as a particular user. Just goto services,
select your service and take the properties, there you can see a LogOn


tab,

and choose Log on as "This account" option, and give the user name,


passwd.



Thanks,

But how can i do that programmatically?
When i install the service i don''t see an option to install it as ''This
account'' rather.
I can do it manually but i want the install procedure to do it itself.

Sims


Sims,

Recheck the CreateService call. There are two fields that are pointers
to the Account UserID and Password to run under. If these fields are
passed in as NULL, the SYSTEM Account is used. That is how you can
set up for a specific user. You can also change this later if need be.

An alternate method is to change the SID to get access of a specific
user. I''ve not figured all that out yet so I can''t point you to a
source. That would be used when your service needs to work under
several different accounts at the same time.

Good luck,

David


这篇关于作为[用户]而不是[系统]运行的服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆