我在Inno Setup中有以下代码.
但是如何将这个类似的函数应用于.msi文件呢?
msiexec /I "\package\file.msi" /qb
?怎么样?
procedure AfterMyProgInstall(S: String);
var
ErrorCode: Integer;
begin
{MsgBox('Please wait the libraries are getting installed, ' +
'without the libraries it wont work.', mbInformation, MB_OK);}
ExtractTemporaryFile(S);
{SW_SHOW, SW_SHOWNORMAL, SW_SHOWMAXIMIZED, SW_SHOWMINIMIZED, SW_SHOWMINNOACTIVE, SW_HIDE}
ShellExec('', ExpandConstant('{app}\package\' + S), '', '', SW_SHOWNORMAL,
ewWaitUntilTerminated, ErrorCode);
end;
Run Code Online (Sandbox Code Playgroud)
kob*_*bik 22
试试这个:
ShellExec('', 'msiexec.exe',
ExpandConstant('/I "{tmp}\package\file.msi" /qb'),
'', SW_SHOWNORMAL, ewWaitUntilTerminated, ErrorCode);
Run Code Online (Sandbox Code Playgroud)
要么:
[Files]
Source: file.msi; DestDir: {tmp}; Flags: deleteafterinstall;
[Run]
Filename: "msiexec.exe"; Parameters: "/i ""{tmp}\file.msi"" /qb"; WorkingDir: {tmp};
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
15507 次 |
最近记录: |