Windows服务安装需要询问用户名和密码 [英] Windows Service Installation Need to ask for username and password

查看:511
本文介绍了Windows服务安装需要询问用户名和密码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好.
我正试图让我的服务安装程序要求用户名和密码.
我应该在Service Process Installer上将Account属性设置为"User",但是仍然无法实现.

当我使用命令提示符"installutil"安装它时,它可以工作.有人有这个问题吗?我想念什么?我已经在网络上关注了很多教程,但仍然无法使它起作用.

Hi everybody.
I''m trying to make my service installer ask for username and password.
I''m supposed to ser Account property to "User" on the Service Process Installer, however it still doesn''t make it.

When I install it with command prompt "installutil", it works. Has somebody had this problem? What am I missing? I have followed a lot of tutorials on the web, and still can''t make it work

推荐答案

我自己找到了解决方案.

要使安装程序要求用户名和密码来注册服务,您必须执行以下操作:

-右键单击安装程序项目,查看自定义操作".
-在安装"文件夹中,必须添加服务"主要输出,与文件系统"选项中的相同.

我只是在文件系统上添加了此服务的主要输出.这样,所有文件都被正确复制到目标文件夹中,但是之后您需要注册该服务.这样,它就可以了.

我希望有一天能帮助别人. ;)
I found the solution by myself.

To make the installer ask for username and password for registering the service, you must do the following:

- Right click on the installer project, view, Custom Actions.
- On Install folder, you must add the Service primary output, the same as in File System option.

I was only adding this service primary output on file system. this way, all the files were being correctly copied on the destination folder, but after that you need to register the service. this way, it works.

I hope to help somebody, someday. ;)


本文说明了

以智能方式安装Windows服务,而不是使用Windows Installer MSI软件包 [
This article explains that

Install a Windows Service in a smart way instead of using the Windows Installer MSI package[^]


这篇关于Windows服务安装需要询问用户名和密码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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