|
99 | 99 | ================================================================ |
100 | 100 | --> |
101 | 101 |
|
102 | | - <!-- Deferred command-runners. ExeCommand="[CustomActionData]" pulls |
103 | | - the actual command line from the CustomActionData property, |
104 | | - which the SetProperty elements below populate at sequence |
105 | | - time (when [INSTALLFOLDER], [CUSTOMERID], etc. ARE expandable). --> |
| 102 | + <!-- ExeCommand uses [INSTALLFOLDER] (deferred-safe, MSI auto-passes |
| 103 | + it to deferred CAs) for the exe path, and [CustomActionData] for |
| 104 | + the args. WiX 4 strips a bare ExeCommand="[CustomActionData]" |
| 105 | + (treats it as an empty Target), so we MUST bake [INSTALLFOLDER] |
| 106 | + in literally — that keeps the column non-empty and lets MSI |
| 107 | + substitute both placeholders at deferred-execution time. --> |
106 | 108 |
|
107 | 109 | <CustomAction Id="RunConfigureInline" |
108 | 110 | Directory="INSTALLFOLDER" |
109 | | - ExeCommand="[CustomActionData]" |
| 111 | + ExeCommand='"[INSTALLFOLDER]stepsecurity-dev-machine-guard.exe" [CustomActionData]' |
110 | 112 | Execute="deferred" |
111 | 113 | Impersonate="no" |
112 | 114 | Return="check"/> |
113 | 115 |
|
114 | 116 | <CustomAction Id="RunConfigureFromFile" |
115 | 117 | Directory="INSTALLFOLDER" |
116 | | - ExeCommand="[CustomActionData]" |
| 118 | + ExeCommand='"[INSTALLFOLDER]stepsecurity-dev-machine-guard.exe" [CustomActionData]' |
117 | 119 | Execute="deferred" |
118 | 120 | Impersonate="no" |
119 | 121 | Return="check"/> |
120 | 122 |
|
121 | 123 | <CustomAction Id="RunInstallScheduledTask" |
122 | 124 | Directory="INSTALLFOLDER" |
123 | | - ExeCommand="[CustomActionData]" |
| 125 | + ExeCommand='"[INSTALLFOLDER]stepsecurity-dev-machine-guard.exe" [CustomActionData]' |
124 | 126 | Execute="deferred" |
125 | 127 | Impersonate="no" |
126 | 128 | Return="check"/> |
127 | 129 |
|
128 | 130 | <CustomAction Id="RunUninstallScheduledTask" |
129 | 131 | Directory="INSTALLFOLDER" |
130 | | - ExeCommand="[CustomActionData]" |
| 132 | + ExeCommand='"[INSTALLFOLDER]stepsecurity-dev-machine-guard.exe" [CustomActionData]' |
131 | 133 | Execute="deferred" |
132 | 134 | Impersonate="no" |
133 | 135 | Return="ignore"/> |
134 | 136 |
|
135 | | - <!-- SetProperty elements: WiX shorthand for an immediate Type 51 CA. |
136 | | - Each one sets a property whose name matches a deferred CA Id; |
137 | | - MSI auto-populates that CA's CustomActionData from this value |
138 | | - at execution time. Property tokens like [INSTALLFOLDER] and |
139 | | - [APIKEY] expand here (in the immediate phase) — so by the time |
140 | | - the deferred CA runs, the command line is fully resolved. --> |
| 137 | + <!-- SetProperty values now contain ONLY the args (not the exe path), |
| 138 | + which become [CustomActionData] for the matching deferred CA. --> |
141 | 139 |
|
142 | 140 | <SetProperty Id="RunConfigureInline" |
143 | | - Value='"[INSTALLFOLDER]stepsecurity-dev-machine-guard.exe" configure --non-interactive --customer-id "[CUSTOMERID]" --api-endpoint "[APIENDPOINT]" --api-key "[APIKEY]" --scan-frequency "[SCANFREQUENCY]"' |
| 141 | + Value='configure --non-interactive --customer-id "[CUSTOMERID]" --api-endpoint "[APIENDPOINT]" --api-key "[APIKEY]" --scan-frequency "[SCANFREQUENCY]"' |
144 | 142 | Sequence="execute" |
145 | 143 | Before="RunConfigureInline" |
146 | 144 | Condition="APIKEY AND NOT BOOTSTRAPFILE AND NOT Installed"/> |
147 | 145 |
|
148 | 146 | <SetProperty Id="RunConfigureFromFile" |
149 | | - Value='"[INSTALLFOLDER]stepsecurity-dev-machine-guard.exe" configure --non-interactive --from-file "[BOOTSTRAPFILE]"' |
| 147 | + Value='configure --non-interactive --from-file "[BOOTSTRAPFILE]"' |
150 | 148 | Sequence="execute" |
151 | 149 | Before="RunConfigureFromFile" |
152 | 150 | Condition="BOOTSTRAPFILE AND NOT Installed"/> |
153 | 151 |
|
154 | 152 | <SetProperty Id="RunInstallScheduledTask" |
155 | | - Value='"[INSTALLFOLDER]stepsecurity-dev-machine-guard.exe" install' |
| 153 | + Value='install' |
156 | 154 | Sequence="execute" |
157 | 155 | Before="RunInstallScheduledTask" |
158 | 156 | Condition="NOT Installed"/> |
159 | 157 |
|
160 | 158 | <SetProperty Id="RunUninstallScheduledTask" |
161 | | - Value='"[INSTALLFOLDER]stepsecurity-dev-machine-guard.exe" uninstall' |
| 159 | + Value='uninstall' |
162 | 160 | Sequence="execute" |
163 | 161 | Before="RunUninstallScheduledTask" |
164 | 162 | Condition="REMOVE="ALL""/> |
|
0 commit comments