Get an environment variable into a WIX property

后端 未结 4 940
粉色の甜心
粉色の甜心 2020-12-06 05:26

Is there a way to get an environment variable in WIX into a property?

I\'m trying to get the USERPROFILE with:

Property Id=\"UserFolder\         


        
4条回答
  •  臣服心动
    2020-12-06 05:32

    Alternative is to use SetProperty element - it will effectively create type 51 custom Action. It is simpler than using Custom Action as you don't need to separately specify the schedule for it - everything is done in one element. In my example below, I set the property only if its empty, i.e. was not passed from the command line.

    Example:

    
        
    
    

提交回复
热议问题