开发者

how to install a package using a windows system account with WiX?

Usually, when you install an MSI package on windows, it is installed using the currently logged on user account. but I want to install it to a specific user account. For now, I want to install my MSI package using the system account.

Is it possible? How to do t开发者_C百科hat?


Not that I would recommend it, but there is an old trick you can use to do this under the SYSTEM account...

First, you'll need to craft the installation command-line to install silently/without user input.** Something like msiexec.exe /i MyProgram.msi /qb- should work.

Second, you'll need to create a Scheduled Task (XP) or Task Schedule job (Vista/Win7) to execute the command, and have it run as the SYSTEM user. Set it for a time a few minutes in the future, et voila!

(** Okay, technically you could just run msiexec /i MyProgram.msi and configure the task to allow interaction with the local user, but this only works on Win2k and XP.)


Alternately, you could use the great little SysInternals utility PSEXEC with the -s option to execute the process as the local SYSTEM user...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜