在Inno设置中,
[Setup]
PrivilegesRequired=admin
Run Code Online (Sandbox Code Playgroud)
仍然无法以管理员身份运行安装程序,但我需要在Inno Setup的最后一步启动我的程序.
如何设置我的安装程序可以作为管理员运行?
对于Inno Setup,我想在Windows启动时为MyAPP Auto Start创建一个复选框Task.我的代码如下:
并且,如何编写下面的代码 - DO_Set_AutoStart_WhenWindowsStart()^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[Tasks]
Name: "StartMenuEntry" ; Description: "Start my app when Windows starts" ; GroupDescription: "Windows Startup"; MinVersion: 4,4;
[code]
//Do Additional Task - Auto Start when Windows Start
function NextButtonClick(CurPageID: Integer): Boolean;
var
Index: Integer;
begin
Result := True;
if CurPageID = wpSelectTasks then
begin
Index := WizardForm.TasksList.Items.IndexOf('Start my app when Windows starts');
if Index <> -1 then
begin
if WizardForm.TasksList.Checked[Index] then
MsgBox('First task has been checked.', mbInformation, MB_OK)
DO_Set_AutoStart_WhenWindowsStart();
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
else
MsgBox('First task …Run Code Online (Sandbox Code Playgroud) 我想编写一个while带有超时的循环,如下所示...如何在Inno Setup中编写这个?
InitialTime = SystemCurrentTime ();
Timeout = 2000; //(ms)
while (!condition) {
if (SystemCurrentTime () - InitialTime > Timeout) {
// Timed out
break;
}
}
Run Code Online (Sandbox Code Playgroud)
谢谢!
inno-setup ×4