I use Inno Setupto create a developed BootStrapper project for My .NET.
When using PascalScript, I have some problems. But before that, here is the Script that I use to createBootStrapper
[Setup]
AppId={{69A884D3-671F-4DFB-9E23-F6FA35BD6264}
AppName={
AppVersion={
;AppVerName={
AppPublisher={
AppPublisherURL={
AppSupportURL={
AppUpdatesURL={
DefaultDirName={pf}\{
DisableDirPage=yes
DefaultGroupName={
DisableProgramGroupPage=yes
LicenseFile=<License File Path>
OutputDir=<Output Directory Path>
OutputBaseFilename=<Output File Name>
Compression=lzma
SolidCompression=yes
SetupIconFile=<Icon File Path>
ArchitecturesInstallIn64BitMode=x64
AppCopyright={
AppContact={
VersionInfoVersion=1.5
VersionInfoCompany=<Company Name>
VersionInfoProductName=<Product Name>
VersionInfoProductVersion=<Product Version>
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked; OnlyBelowVersion: 0,6.1
[Files]
Source: "<Path>\NDP452-KB2901907-x86-x64-AllOS-ENU.exe"; DestDir: "{tmp}"; Flags: deleteafterinstall; Permissions: admins-full; Check: Framework45IsNotInstalled
Source: "<Path>\CRRuntime_32bit_13_0_13.msi"; DestDir: "{tmp}"; Flags: deleteafterinstall 32bit; Permissions: admins-full;
Source: "<Path>\CRRuntime_64bit_13_0_14.msi"; DestDir: "{tmp}"; Flags: 64bit deleteafterinstall; Permissions: admins-full; Check: IsWin64
Source: "<Path>\SSCERuntime_x86-ENU.exe"; DestDir: "{tmp}"; Flags: deleteafterinstall 32bit; Permissions: admins-full
Source: "<Path>\SSCERuntime_x64-ENU.exe"; DestDir: "{tmp}"; Flags: 64bit deleteafterinstall; Permissions: admins-full; Check: IsWin64
Source: "<Path>\<Product>.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "<Path>\File1.dll"; DestDir: "{app}"; Flags: ignoreversion
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[Run]
Filename: {tmp}\NDP452-KB2901907-x86-x64-AllOS-ENU.exe; Parameters: "/q /norestart"; Check: Framework45IsNotInstalled; StatusMsg: Microsoft Framework 4.0 is being installed. This process might take some time. Please wait.....
Filename: "msiexec.exe"; Parameters: "/i ""{tmp}\CRRuntime_32bit_13_0_13.msi"; StatusMsg: Crystal Reports Runtime is being installed. Please wait....;
Filename: {tmp}\SSCERuntime_x86-ENU.exe; StatusMsg: Microsoft SQL Compact 4.0 is being installed. Please wait.....
[Code]
function Framework45IsNotInstalled(): Boolean;
var
regresult: Cardinal;
begin
RegQueryDWordValue(HKLM, 'Software\Microsoft\NET Framework Setup\NDP\v4\Full', 'Install', regresult);
if (regresult = 0) then
begin
Result := True;
end
else
begin
Result := False;
end;
end;
[Icons]
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: quicklaunchicon
[Run]
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
Now I have three problems on this issue:
- How to check if the system architecture is 32Bit or 64Bit and executes the corresponding file accordingly?
eg. As mentioned in the script, I have included two files for Crystal Reports. Now, performing the setup, setup should detect the System Architecture and Run the corresponding file. I tried to solve this problem using this link here in StackOverdlow , but did not quite understand.
- ,
. , .NET Framework , Script . Crystal Report SQL Compact?
Script Crystal Report, .
[Code]
function CheckForCrystalReports: Boolean;
var
regresul: Cardinal;
begin
RegQueryDWordValue(HKLM, 'SOFTWARE\SAP BusinessObjects\Suite XI 4.0\Installer\CRV','Install',regresul);
if(regresul = 0) then
begin
Result := True;
end
else
begin
Result := False;
end;
end;
. script Parameters: "/q /norestart"; Silent . *.msi? , .