[英]Windows service installer for different user account (other than local system)
Set objService = objWMIService.Get("Win32_BaseService")
objService.Create("usb2", "usb test", "c:\usb2.exe",
OWN_PROCESS, NORMAL_ERROR_CONTROL, "Automatic", NOT_INTERACTIVE, null
This always creates Windows service installation pointing to 这总是创建Windows服务安装指向
localsystem
本地系统
user(due to the null), I want to point to something other than localsystem, different user account & password. 用户(由于为空),我想指向除本地系统以外的其他内容,不同的用户帐户和密码。 How do I point to a different user account when I create installer for Windows services?
为Windows服务创建安装程序时,如何指向其他用户帐户?
I'm assuming you are authoring an MSI using InstallShield based on your tags. 我假设您正在根据标签使用InstallShield编写MSI。 You shouldn't have to write any code.
您不必编写任何代码。 You can define your service using the ServiceInstall table.
您可以使用ServiceInstall表定义服务。 Create a component with your EXE as the keyfile and then go down under advanced, services and right click to add a new service.
使用EXE作为密钥文件创建一个组件,然后在“高级服务”下单击鼠标右键,然后添加新服务。 Fill out all the attributes and you should be good to go.
填写所有属性,您应该一切顺利。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.