从服务运行MSIEXEC(本地系统帐户) [英] Running msiexec from a service (Local System account)

查看:131
本文介绍了从服务运行MSIEXEC(本地系统帐户)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在为我们的软件的更新系统。本更新程序在后台作为服务运行,而当有可用的更新,下载并安装它。我们需要的服务安装,因为 MSI 需要提升运行更新,但我们的一些客户将成为受限制的用户。



微星是一个维克斯 MSI和做的时候主要升级运行。问题是,该更新似乎没有从服务运行时工作。我可以看到MSIEXEC运行,并成功返回,但似乎不会更改系统。同样的命令,按预期我的用户帐户的作品中运行时。



有一些需要注意从本地系统服务运行MSIEXEC?



我们只做:

 字符串参数=/我/宁静/ LV * X+ pathToLogFile; 
System.Diagnostics.Process.Start(msiexec.exe的参数);


解决方案

如果你的服务是一个Windows服务然后执行以下操作步骤:




  1. 在服务控制台中服务的开放性


  2. 进入的登录的标签


  3. 设置具有权限来更新系统(你或专门设立的一个账户为此)


  4. 重新启动该服务




在这种情况下,服务将具有相应权限运行,并可以做更新。


We are working on an update system for our software. The updater should run in the background as a service, and when an update is available, download and install it. We need the service to install the update since the MSI requires elevation to run, but some of our clients will be restricted users.

The MSI is a WiX MSI and does a major upgrade when run. The problem is, the update does not seem to work when run from our service. I can see msiexec run, and it returns successfully, but it seems to make no changes to the system. The same command, when run from my user account works as expected.

Is there some caveat to running msiexec from a Local System service?

We are simply doing:

string arguments = "/i /quiet /lv*x " + pathToLogFile;   
System.Diagnostics.Process.Start("msiexec.exe", arguments);

解决方案

If your service is a Windows service then do the following steps:

  1. Open properties of your service in Services console.

  2. Go to the Log On tab

  3. Set an account that has rights to update the system (yours or specially created for this purpose)

  4. Restart the service

In this case, the service will be run with proper rights and can do updates.

这篇关于从服务运行MSIEXEC(本地系统帐户)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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