【发布时间】:2017-06-15 11:49:08
【问题描述】:
我想使用PrivilegesRequired=lowest 运行设置。如何设置和运行应用程序 (dxwebsetup.exe) 以使用我的管理员权限安装?
我的代码(Inno Setup - Avoid displaying filenames of sub-installers):
procedure CurStepChanged(CurStep: TSetupStep);
var
ProgressPage: TOutputProgressWizardPage;
ResultCode: Integer;
begin
if CurStep = ssInstall then
begin
if IsComponentSelected('DirectX') then
begin
ProgressPage := CreateOutputProgressPage('Installing prerequsities', '');
ProgressPage.SetText('Installing DirectX...', '');
ProgressPage.Show;
try
ExtractTemporaryFile('dxwebsetup.exe');
StartWaitingForDirectXWindow;
Exec(ExpandConstant('{src}\_Redist\dxwebsetup.exe'), '', '', SW_SHOW,
ewWaitUntilTerminated, ResultCode);
finally
StopWaitingForDirectXWindow;
ProgressPage.Hide;
end;
end;
end;
end;
【问题讨论】:
标签: inno-setup elevated-privileges