Wednesday, 22 November 2017

how to build a inno setup installer run as administrator



[Setup]
PrivilegesRequired=admin


how to create a desktop short cut

[Icons]
Name: {commondesktop}\{#MyAppName}; Filename: {app}\setup.exe; WorkingDir: {app}; IconFilename: {app}\images\setup.ico; Comment: "software";


how to build a installer which installed in program files in both 64 and 32 bit machines

[Setup]
DefaultDirName={code:GetProgramFiles}\{#MyAppName}

[code]
function GetProgramFiles(Param: string): string;
begin
  if IsWin64 then Result := ExpandConstant('{pf64}')
    else Result := ExpandConstant('{pf32}')
end;