crystal reports - Inno सेटअप में सिस्टम आर्किटेक्चर की जाँच करें
crystal-reports inno-setup (1)
मैं अपने .NET
विकसित प्रोजेक्ट के लिए BootStrapper बनाने के लिए Inno Setup
का उपयोग कर रहा हूं।
PascalScript
का उपयोग करते PascalScript
, मुझे कुछ समस्याएं आ रही हैं I लेकिन इससे पहले, स्क्रिप्ट मैं BootStrapper
बनाने के लिए उपयोग कर रहा हूं
#define MyAppName "<ProductName>"
#define MyAppVersion "<ProductVersion>"
#define MyAppPublisher "<Company Name>"
#define MyAppURL "<URL>"
#define MyAppExeName "<AppName>.exe"
#define MyAppCopyright "[email protected]"
#define MyContact "<Contact No>"
[Setup]
AppId={{69A884D3-671F-4DFB-9E23-F6FA35BD6264}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={pf}\{#MyAppName}
DisableDirPage=yes
DefaultGroupName={#MyAppName}
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={#MyAppCopyright}
AppContact={#MyContact}
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
अब इस समस्या के विषय में मेरे पास तीन समस्याएं हैं:
- कैसे जांच करें कि क्या सिस्टम आर्किटेक्चर 32 बिट या 64 बिट है और तदनुसार संबंधित फ़ाइल निष्पादित है?
जैसे कि स्क्रिप्ट में उल्लिखित है, मैंने Crystal Reports
लिए दो फाइलों को संलग्न किया है, अब सेटअप सेटअप करते समय, सेटअप को सिस्टम आर्किटेक्चर का पता लगाना चाहिए और संबंधित फाइल को चलाने चाहिए। मैंने इसे स्टैक ओवरड्लो पर इस लिंक का उपयोग करके इसे हल करने की कोशिश की, लेकिन उसे काफी समझ में नहीं आया
- जांचें कि क्या पूर्वापेक्षा सिस्टम पहले से इंस्टॉल है या नहीं
जैसे कि मशीन पर .NET Framework
पहले से स्थापित है या नहीं, यह देखने के लिए, मुझे उपर्युक्त स्क्रिप्ट मिली और इसके कामकाज ठीक। Crystal Report
या SQL Compact
लिए यह कैसे करें?
मैंने इस स्क्रिप्ट के लिए Crystal Report
की कोशिश 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;
- मौन मोड में निष्पादन योग्य चलाएं
जैसे ऊपर की स्क्रिप्ट में, मैं Parameters: "/q /norestart";
का उपयोग कर रहा हूं Parameters: "/q /norestart";
साइलेंट मोड में सेटअप को चलाने के लिए और उसके काम करना लेकिन यह कैसे करें *.msi
फ़ाइल के लिए? मैंने कुछ मापदंडों की कोशिश की लेकिन वे काम नहीं कर रहे हैं
ShellExec
साथ इस समाधान की कोशिश करें:
[Run]
Filename: "{tmp}\CRRuntime_32bit_13_0_13.msi"; Parameters: "/passive";
Flags: shellexec waituntilterminated skipifdoesntexist;
StatusMsg: "Crystal Reports Runtime is being installed. Please wait...";
यदि आप MSIEXEC
माध्यम से कॉल करना चाहते हैं:
[Run]
Filename: "msiexec.exe"; Parameters: "/passive /i ""{tmp}\CRRuntime_32bit_13_0_13.msi""";
Flags: waituntilterminated skipifdoesntexist;
StatusMsg: "Crystal Reports Runtime is being installed. Please wait...";
पीएस अपने कोड स्निपेट में से टिप्पणी में Parameters
लिए उद्धरण अनुपलब्ध थे। आपको पैरामीटर को खोलना और बंद करना चाहिए "
यदि आप पैरामीटर लाइन में उद्धरण का उपयोग करना चाहते हैं तो आपको इसे दोगुना करना होगा। ""
SQL Compact
आप निम्न कोड का उपयोग कर सकते हैं:
[Files]
Source: "C:\Temp\SSCERuntime_x64-ENU.exe"; DestDir: "{tmp}";
Flags: nocompression deleteafterinstall uninsremovereadonly
Source: "C:\Temp\SSCERuntime_x86-ENU.exe"; DestDir: "{tmp}";
Flags: nocompression deleteafterinstall uninsremovereadonly
[Run]
Filename: "{tmp}\SSCERuntime_x64-ENU.exe"; Parameters: "/qn /i";
Flags: waituntilterminated skipifdoesntexist;
StatusMsg: SQL Compact 4.0 x64 is being installed. Please wait...;
Check: (IsWin64) and (not IsSQLCompact40Installed);
Filename: "{tmp}\SSCERuntime_x86-ENU.exe"; Parameters: "/qn /i";
Flags: waituntilterminated skipifdoesntexist;
StatusMsg: SQL Compact 4.0 x86 is being installed. Please wait...;
Check: (not IsWin64) and (not IsSQLCompact40Installed);
[Code]
function IsSQLCompact40Installed(): Boolean;
var
InstallDirString : String;
begin
result := false;
if RegQueryStringValue(HKLM, 'SOFTWARE\Microsoft\Microsoft SQL Server Compact Edition\v4.0',
'InstallDir', InstallDirString) then begin
if FileExists(InstallDirString + '\sqlcecompact40.dll') then
result := true;
end;
end;