|
442 | 442 | <CustomAction Id="SetFixLocalDir" Property="FixLocalDir" Value=""[SystemFolder]icacls.exe" "[LOCAL]." /inheritance:r" Execute="immediate" />
|
443 | 443 | <CustomAction Id="FixLocalDir" BinaryKey="WixCA" DllEntry="WixQuietExec" Execute="deferred" Return="check" Impersonate="no"/>
|
444 | 444 |
|
| 445 | + <CustomAction Id="SetCheckRunningAsAdmin" Property="WixQuietExecCmdLine" Value=""[SystemFolder]net.exe" file" Execute="immediate" /> |
| 446 | + <CustomAction Id="CheckRunningAsAdmin" BinaryKey="WixCA" DllEntry="WixQuietExec" Execute="immediate" Return="check" Impersonate="yes" /> |
| 447 | + <CustomAction Id="FatalError" Error="25000" /> |
| 448 | + |
445 | 449 | <InstallExecuteSequence>
|
| 450 | + <Custom Action="SetCheckRunningAsAdmin" Before="CheckRunningAsAdmin"><![CDATA[Installed AND (NOT REMOVE~="ALL")]]></Custom> |
| 451 | + <Custom Action="CheckRunningAsAdmin" After="LaunchConditions"><![CDATA[Installed AND (NOT REMOVE~="ALL")]]></Custom> |
| 452 | + |
446 | 453 | <!-- InstallExecuteSequence is used to define Custom Actions that fire after the UI is finished and the install is starting to execute -->
|
447 | 454 | <Custom Action="CA_SetARPInstallLoc" Before="RegisterProduct" />
|
448 | 455 | <Custom Action="SetDefaultLogFile" After="CostFinalize"><![CDATA[NOT LOGFILE]]></Custom>
|
|
506 | 513 | </InstallExecuteSequence>
|
507 | 514 |
|
508 | 515 | <InstallUISequence>
|
| 516 | + <Custom Action="SetCheckRunningAsAdmin" Before="CheckRunningAsAdmin"><![CDATA[Installed AND (NOT REMOVE~="ALL")]]></Custom> |
| 517 | + <Custom Action="CheckRunningAsAdmin" After="LaunchConditions"><![CDATA[Installed AND (NOT REMOVE~="ALL")]]></Custom> |
| 518 | + |
509 | 519 | <!-- InstallUISequence is used to define a dialog or Custom Action that fires in the UI sequence of events during the install -->
|
510 | 520 | <Custom Action="CA_GetARPInstallLoc" Before="CostInitialize"><![CDATA[UPGRADINGPRODUCTCODE AND UPGRADEDIR]]></Custom>
|
511 | 521 | <!-- Better set ProgressDlg to be after MigrateFeatureStates so we can safely insert SetProperties before ExecuteAction -->
|
|
523 | 533 | <UIRef Id='WixUI_Common' />
|
524 | 534 |
|
525 | 535 | <UI Id="WixUI_MyInstallDlg">
|
| 536 | + <Error Id="25000">Only administrators can modify [AgentName] installation</Error> |
| 537 | + |
526 | 538 | <TextStyle Id="WixUI_Font_Normal" FaceName="Tahoma" Size="8" />
|
527 | 539 | <TextStyle Id="WixUI_Font_Bigger" FaceName="Tahoma" Size="12" />
|
528 | 540 | <TextStyle Id="WixUI_Font_Title" FaceName="Tahoma" Size="9" Bold="yes" />
|
|
0 commit comments