Windows.NETアプリにInnoSetupを使用しています。次のコードを使用してWindowsでアプリを起動するかどうかをユーザーに尋ねています。
[Tasks]
Name: "TaskEntry"; Description: "Start with Windows?"; GroupDescription: "Startup";
[code]
function NextButtonClick(CurPageID: Integer): Boolean;
begin
Result := True;
if CurPageID = wpSelectTasks then
begin
if WizardForm.TasksList.Checked[3] then
MsgBox('Startup has been checked.', mbInformation, MB_OK)
else
MsgBox('Startup has not been checked.', mbInformation, MB_OK);
end;
end;
procedure CurPageChanged(CurPageID: Integer);
begin
if CurPageID = wpSelectTasks then
WizardForm.TasksList.Checked[3] := False;
end;
メッセージボックスの代わりにレジストリキーを追加するにはどうすればよいですか?
私はそれを無条件に行うことができることを知っています:
[Registry]
Root: HKCU; Subkey: "Software\Microsoft\Windows\CurrentVersion\Run"; ValueType: string; \
ValueName: "key"; ValueData: "{app}\{#MyAppExeName}"; Flags: uninsdeletevalue