0

I would like to put auto installing of redist and directx with my setup,so when setup ends installing a game,then it automaticaly installs other important programs,like those two.I am using inno.Someone knows how to?

1 Answers1

0
    [Setup]
    ; NOTE: The value of AppId uniquely identifies this application.
    ; Do not use the same AppId value in installers for other applications.
    ; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
    AppId={{E4F9F679-6E2B-46A2-B7CE-6FEAD68186AA}
    AppName={#MyAppName}
    AppVersion={#MyAppVersion}
    ;AppVerName={#MyAppName} {#MyAppVersion}
    DefaultDirName={pf}\{#MyAppName}
    DefaultGroupName={#MyAppName}
    AllowNoIcons=yes
    OutputBaseFilename=setup
    SetupIconFile=D:\Igrice\Akcija\Outlast Whistleblower\Icon.ico
    Compression=lzma
    SolidCompression=yes
    SourceDir=d:\

    [Languages]
    Name: "english"; MessagesFile: "compiler:Default.isl"

    [Tasks]
    Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "                        {cm:AdditionalIcons}"; Flags: unchecked

    [Files]
    Source: "D:\Igrice\Akcija\Outlast Whistleblower\OutlastLauncher.exe"; DestDir: "  {app}"; Flags: ignoreversion
    Source: "D:\Igrice\Akcija\Outlast Whistleblower\*"; DestDir: "{app}"; Flags:   ignoreversion recursesubdirs createallsubdirs
    ; NOTE: Don't use "Flags: ignoreversion" on any shared system files

    [Icons]
    Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
    Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
    Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks:   desktopicon

    [Run]
    Filename: "{app}\DXSETUP.EXE"; Description: "Launch application"; Flags:  postinstall nowait skipifsilent unchecked
    Filename: "{app}\vcredist_x64.EXE"; Description: "Launch application"; Flags:   postinstall nowait skipifsilent unchecked
    Filename: "{app}\vcredist_x86.EXE"; Description: "Launch application"; Flags: postinstall nowait skipifsilent unchecked
  • 1
    The stuff you're executing are so called prerequisites which should be installed before the app. installation. That allows the setup e.g. restart the system before you continue. Inno Setup has the [`PrepareToInstall`](http://www.jrsoftware.org/ishelp/topic_scriptevents.htm#PrepareToInstall) event for this purpose. Except that you should check if the version you're going to install is not older than or the same as the one already installed on the user's machine, and only if not execute the setup. – TLama Aug 18 '14 at 10:33
  • And how would script look? – CookieLover Oct 17 '14 at 14:14