Wix Installer Going to Wrong Path on Command Line with Admin Privilege

后端 未结 2 1108
庸人自扰
庸人自扰 2021-01-21 12:06

I built a simple installer in Wix which will place a couple of data files in a specific folder in a preexisting product installation so that the user doesn\'t need to know anyth

2条回答
  •  北荒
    北荒 (楼主)
    2021-01-21 12:21

    There are two types of environment variables: user environment variables (set for each user) and system environment variables (set for everyone).

    By default, a child process inherits the environment variables of its parent process. Programs started by the command processor inherit the command processor's environment variables.

    https://msdn.microsoft.com/en-us/library/windows/desktop/ms682653(v=vs.85).aspx

    Probably, you can check machine users and if product is installed for all users point to system environment variable in Local Machine.

提交回复
热议问题