Attached you will find an error message indicating the task in the line below is not valid. I have never used InnoScript before today and have not tried to make Crystal a part of my installation programs before. But that was the main reason for wanting to use InnoScript.
Filename: regsvr32.exe; Parameters: /s {code:GetCLSIDFldr|\13.0.2000.0}\{code:LogFileName|crystaldecisions.reportappserver.clientdoc.dll}; WorkingDir: {code:GetCLSIDFldr|\13.0.2000.0}\; StatusMsg: Registering CrystalDecisions.ReportAppServer.ClientDoc.dll (13.0); Tasks: CRInstallation; Flags: runascurrentuser
I have created a program in VB.NET 2010 and have the Crystal Engine version 13.0.9.1312 installed on my development machine. I am not sure if I should be including the CRRuntime_32bit_13_0_9.msi file in my list of files but when I tried to Add Files in InnoScript, I was not sure what location folder to select and which flags to use. Reading the generated code, it does look like I need to include them rather than have it download.
First question, is the error just because I did not include the msi file?
Second question, what are the appropriate flags and location folder settings for the msi file?
Thank you for any help you can provide. rasinc
Aloha rasinc,
If I understand you correctly, You MUST include the Crystal Reports MSI file in the script. InnoScript should have selected the proper installation for you to download and include in the Support folder for InnoScript to find. To check look in Versioning->Other->Crystal Reports Installations. In the drop down selector you should see the chosen installation. You need to download that installation from our website (use the downloads menu item) then place the file into the folder \Scripts\Output\Support located inside the folder where your VBP file is located so that InnoScript can find it.
The placement in your script should be automatic. I cannot tell much from one line of your script aside that InnoScript has selected the correct CR installation. I would need to see the whole script to determine what is happening. Please attach your script so that I can look into it.
Thanks Randem for the quick reply.
Here is the script. I did select the highest CR version 13.0.5 32 bit before I hit the Create Script button but I was expecting the list to show which file I was to include and where to put it. It now shows Nothing checked.
Poking around since you posted I found these template lines that I believe were missing for the proper file I should use. So would it be accurate that I should change the CRXI references to the proper one for the version I wish to use and keep all the flags etc. the same?
[Files]
;Source: "{src}\Support\CRXI_RDC_Redistribution.msi"; DestDir: "{tmp}"; Flags: nocompression ignoreversion deleteafterinstall
[Run]
Filename: msiexec.exe; Parameters: "/package {src}\Support\CRXI_RDC_Redistribution.msi /passive"; WorkingDir: {tmp}; Flags: skipifdoesntexist
Below is the script. I hope you don't mind, but I've changed information that identifies me or my program. I doubt that would cause any problems in your interpretation. The only error your script generated was on the fifth file in the [Files]. I have changed it manually in InnoSetup to point to the correct file. I may or may not include it in the final project but I changed it now because I have a reference in the program for it.
; InnoScript Version 11.3 Build 0
; Randem Systems, Inc.
; Copyright (c) 2002 - 2014, Randem Systems, Inc.
; Website: https://randemsystems.com
; Support: https://randemsystems.support/
; OS: Windows NT 6.1 build 7601 (Service Pack 1)
; Derived from VB.NET Project File
; Designed for Inno Setup Version: 5.5.4 (a)
; Installed Inno Setup Version: 5.5.4 (a)
; Date: June 08, 2014
; Local Machine Settings. Use these settings as a template for your installation folders
; {app} : C:\Program Files\Randem Systems\InnoScript
; {appdata} : C:\Users\Username\AppData\Roaming\Randem Systems\InnoScript\
; {localappdata} : C:\Users\Username\AppData\Local\Randem Systems\InnoScript\
; {cf} : C:\Program Files\Common Files\Randem Systems
; {tmp} : C:\Users\Username\AppData\Local\Temp\
; {commonappdata} : C:\ProgramData\Randem Systems\InnoScript\Release\
; {pf} : C:\Program Files\
; VB Runtime Files Folder: C:\RandemSystems\InnoScript\InnoScript 11\VB 6 Redist Files\
; .NET Project File (.NET): C:\Development\ABC2\ABC\ABC.vbproj
; Inno Setup Script Output File (.iss): C:\Development\ABC2\ABC\Scripts\DEF 2.0.0 Release.iss
;: C:\Development\ABC2\ABC\InnoInstaller\Templates\DEF.tpl
;: C:\Users\Username\AppData\Local\Randem Systems\InnoScript\Release\Templates\Crystal Reports.tpl
; ------------------------
; References
; ------------------------
; CrystalDecisions.CrystalReports.Engine.dll (13.0) - (CrystalDecisions.CrystalReports.Engine.dll)
; CrystalDecisions.ReportAppServer.ClientDoc.dll (13.0) - (CrystalDecisions.ReportAppServer.ClientDoc.dll)
; CrystalDecisions.ReportAppServer.Controllers.dll (13.0) - (CrystalDecisions.ReportAppServer.Controllers.dll)
; CrystalDecisions.ReportAppServer.DataDefModel.dll (13.0) - (CrystalDecisions.ReportAppServer.DataDefModel.dll)
; CrystalDecisions.ReportSource.dll (13.0) - (CrystalDecisions.ReportSource.dll)
; CrystalDecisions.Shared.dll (13.0) - (CrystalDecisions.Shared.dll)
; CrystalDecisions.Windows.Forms.dll (13.0) - (CrystalDecisions.Windows.Forms.dll)
; Microsoft.VisualBasic.PowerPacks.Vs.dll (10.0) - (Microsoft.VisualBasic.PowerPacks.Vs.dll)
; --------------------------
; Components
; --------------------------
; Microsoft.VisualBasic.dll - (Microsoft.VisualBasic.dll)
; MySql.Data.MySqlClient.dll - (MySql.Data.MySqlClient.dll)
; System.Collections.dll - (System.Collections.dll)
; System.Collections.Generic.dll - (System.Collections.Generic.dll)
; System.Diagnostics.dll - (System.Diagnostics.dll)
; - (Microsoft.Net.Client.3.5)
; - (Microsoft.Net.Framework.3.5.SP1)
; Windows Installer 3.1 - (Microsoft.Windows.Installer.3.1)
[Setup]
SetupLogging=Yes
AppId= My Program
;------------------------------------------------------------------------------------------------------------------------
; Taken from VBPROJ Project File Parameters Root Namespace, Root NameSpace Assembly Version and Company
;------------------------------------------------------------------------------------------------------------------------
AppName=My Program 2.0.0
AppVerName=My Program
AppPublisher=My Company
;------------------------------------------------------------------------------------------------------------------------
AppVersion=2.0.0
VersionInfoVersion=2.0.0
AllowNoIcons=yes
WizardImageFile=C:\Development\ABC2\DEF.ico
WizardSmallImageFile=C:\Development\ABC2\DEF.ico
UninstallDisplayIcon=C:\Development\ABC2\ABC\Bm.ico
DefaultGroupName=My Company\
DefaultDirName={pf}\ABC 2
AppCopyright=2014 My Name
PrivilegesRequired=Admin
MinVersion=0,6.0
OnlyBelowVersion=0,6.4
Compression=lzma
OutputBaseFilename=ABC0200000Release
[Tasks]
Name: Desktopicon; Description: {cm:CreateDesktopIcon}; GroupDescription: {cm:AdditionalIcons}
Name: VisualBasicPowerPacks; Description: Install Visual Basic Power Packs; GroupDescription: Visual Basic Power Packs:
[Files]
Source: C:\Development\ABC2\ABC\bin\Release\ABC.exe; DestDir: {app}; Flags: ignoreversion restartreplace;
Source: C:\Program Files\MySQL\MySQL Connector Net 6.0.4\Assemblies\MySql.Data.dll; DestDir: {sys}; Flags: restartreplace sharedfile;
Source: C:\Program Files\winsim\ConnectionManager\Simply.ConnectionManagerService.dll; DestDir: {sys}; Flags: restartreplace sharedfile;
Source: C:\Program Files\winsim\ConnectionManager\Simply.ConnectionManagerServiceClient.dll; DestDir: {sys}; Flags: restartreplace sharedfile;
Source: C:\Development\ABC2\ABC\obj\x86\Release\Interop.DEF.dll; DestDir: {sys}; Flags: restartreplace sharedfile; Source: C:\Development\ABC2\ABC\DEF.ico; DestDir: {app}; Flags: ignoreversion;
Source: C:\Windows\system32\MSVBVM60.DLL; DestDir: {sys}; Flags: regserver restartreplace sharedfile;
Source: C:\RandemSystems\InnoScript\InnoScript 11\VB 6 Redist Files\OLEAUT32.dll; DestDir: {sys}; Flags: restartreplace sharedfile;
Source: VisualBasicPowerPacks3Setup.exe; DestDir: {tmp}; Flags: deleteafterinstall ignoreversion nocompression; Tasks: PowerPackInstallation
[INI]
Filename: {app}\ABC.url; Section: InternetShortcut; Key: URL; String:
[Icons]
Name: {group}\ABC ; Filename : {app}\ABC.exe; WorkingDir: {app}; IconFilename: {app}\DEF.ico;
Name: {group}\{cm:ProgramOnTheWeb, ABC }; Filename: {app}\ABC.url; IconFilename: {app}\DEF.ico;
Name: {group}\{cm:UninstallProgram, ABC }; Filename: {uninstallexe};
Name: {commondesktop}\ABC ; Filename: {app}\ABC.exe; Tasks: Desktopicon ; WorkingDir: {app}; IconFilename: {app}\DEF.ico;
[Run]
Filename: {tmp}\VisualBasicPowerPacks3Setup.exe; WorkingDir: {tmp}; Flags: skipifdoesntexist runascurrentuser; Tasks: VisualBasicPowerPacks; StatusMsg: Installing Visual Basic Power Packs;
; Register the Crystal Reports Merge Module components that need to be registered in place where the Merge Modules installed them
Filename: regsvr32.exe; Parameters: /s {code:GetCLSIDFldr|\13.0.2000.0}\{code:LogFileName|crystaldecisions.reportappserver.clientdoc.dll}; WorkingDir: {code:GetCLSIDFldr|\13.0.2000.0}\; StatusMsg: Registering CrystalDecisions.ReportAppServer.ClientDoc.dll (13.0); Tasks: CRInstallation; Flags: runascurrentuser
Filename: regsvr32.exe; Parameters: /s {code:GetCLSIDFldr|\13.0.2000.0}\{code:LogFileName|crystaldecisions.reportappserver.controllers.dll}; WorkingDir: {code:GetCLSIDFldr|\13.0.2000.0}\; StatusMsg: Registering CrystalDecisions.ReportAppServer.Controllers.dll (13.0); Tasks: CRInstallation; Flags: runascurrentuser
Filename: regsvr32.exe; Parameters: /s {code:GetCLSIDFldr|\13.0.2000.0}\{code:LogFileName|crystaldecisions.reportappserver.datadefmodel.dll}; WorkingDir: {code:GetCLSIDFldr|\13.0.2000.0}\; StatusMsg: Registering CrystalDecisions.ReportAppServer.DataDefModel.dll (13.0); Tasks: CRInstallation; Flags: runascurrentuser
Filename: regsvr32.exe; Parameters: /s {code:GetCLSIDFldr|\13.0.2000.0}\{code:LogFileName|crystaldecisions.reportsource.dll}; WorkingDir: {code:GetCLSIDFldr|\13.0.2000.0}\; StatusMsg: Registering CrystalDecisions.ReportSource.dll (13.0); Tasks: CRInstallation; Flags: runascurrentuser
Filename: regsvr32.exe; Parameters: /s {code:GetCLSIDFldr|\13.0.2000.0}\{code:LogFileName|crystaldecisions.shared.dll}; WorkingDir: {code:GetCLSIDFldr|\13.0.2000.0}\; StatusMsg: Registering CrystalDecisions.Shared.dll (13.0); Tasks: CRInstallation; Flags: runascurrentuser
Filename: regsvr32.exe; Parameters: /s {code:GetCLSIDFldr|\13.0.2000.0}\{code:LogFileName|crystaldecisions.windows.forms.dll}; WorkingDir: {code:GetCLSIDFldr|\13.0.2000.0}\; StatusMsg: Registering CrystalDecisions.Windows.Forms.dll (13.0); Tasks: CRInstallation; Flags: runascurrentuser
Filename: {app}\ABC.exe; Description: {cm:LaunchProgram, ABC }; Flags: nowait postinstall skipifsilent runascurrentuser; WorkingDir: {app}
[UninstallDelete]
Type: files; Name: {app}\ABC.url
Type: dirifempty; Name: {app}
[InstallDelete]
Type: files; Name: {app}\Install.log;
[Registry]
[Code]
//========================================================================================================================
// Get the CLSID from the registry for the queried file to locate where this file was installed by the CR merge module
// We do this so that we know where to register the file after installation.
//========================================================================================================================
function GetCLSIDFldr(Param: String): String;
var
Location: String;
CSLID: String;
LogFile: String;
sStr: String;
begin
CSLID := Param;
StringChangeEx(CSLID, '!', '{', True);
StringChangeEx(CSLID, '@', '}', True);
LogFile := ExpandConstant('{app}') + '\Install.log';
SaveStringToFile(LogFile, #13#10 + CSLID + #13#10, True);
if not RegQueryStringValue(HKEY_CLASSES_ROOT, 'TypeLib\' + CSLID + '\0\win32','', Location) then
Result := 'Not Registered !!!' + #13#10 + 'Possible Wrong Crystal Reports Version Installed on Source Machine or ' + #13#10 + 'Wrong CRystal Reports Merge Module Installed on Target Machine' + #13#10;
begin
Location := ExpandConstant(Location)
sStr := #13#10 + Location + #13#10 + StringOfChar('*',70) + #13#10
SaveStringToFile(LogFile, sStr, True);
Result := ExtractFileDir(Location);
end;
end;
//=============================================================
// Log the filename process to a log file
//=============================================================
function LogFileName(Filename: String): String;
var
LogFile: String;
sSTr: String;
begin
LogFile := ExpandConstant('{app}') + '\Install.log';
sStr := #13#10 + 'Registering ' + Filename + #13#10;
SaveStringToFile(LogFile, sStr, True);
Result := Filename;
end;
//============================================================================
Thanks again, rasinc
I did a test here to select CR 13.05 installation to be put into the script and these are the lines that automatically get placed into the script:
[Files]
Source: CRRuntime_64bit_13_0_5.msi; DestDir: {tmp}; Flags: deleteafterinstall ignoreversion nocompression; Tasks: CRInstallation
[Run]
Filename: msiexec.exe; Parameters: "/package ""CRRuntime_64bit_13_0_5.msi"" /passive /promptrestart /l* ""{sd}\CRRuntime_64bit_13_0_5.msi.txt"""; WorkingDir: {tmp}; Flags: skipifdoesntexist runascurrentuser; Tasks: CRInstallation; StatusMsg: Installing Crystal Reports Runtimes;
This also contains the missing tasks section in your script. In this example; the file CRRuntime_64bit_13_0_5.msi; is not found because it needs to be downloaded and placed into the \Scripts\Output\Support\ as I mentioned before. If it is there and you re-create the script; InnoScript will find it and place the correct path in the script so that it will compile in Inno Setup. If you want a different CR MSI file to be deployed you must either manually change it in your script or place correction lines in your project template to replace the lines with the ones that you want to use.
InnoScript will automatically place the lines in your script when it finds that you are using Crystal Reports and it can identify the version.
Randem,
Thanks again for your help. Sorry about the delayed response but my phone has been going crazy lately and I have not been able to look at this stuff all the time.
After your first response, I started doing some manual changes to the script in InnoSetup. This did get an installation of my program but the Crystal engine did not install (it did compile in the setup program and unpack but not trigger the install).
So after your last post, I decided not just to take the advice of regenerating the script but I made sure all the files referenced in my original script, that needed to be sent to the output folder were there, then I recreated the InnoScript project from scratch. It appears to trigger the install of the Crystal Engine properly now. I will do a full test with a fresh Windows install on the weekend but I believe it is working now. I did my tests with the 13_0_5 version and I think I will test with the _9 version as well but it should be just a filename reference to change (and make sure the file exists in the output folder) and all will be good.
I still had to manually make a couple of changes for my other parts of the program but I am getting used to the InnoSetup program and what it does so it appears to be easier now. I've sorted that part out now so I won't bug you about it.
Thank you again very much for your testing and your help. Years ago your posts on another forum helped me get some VB6 programming done. It's nice to see you are still helping when you can. BTW, I am going to assume your validation question below refers to human, not vulcan... Aloha.
rasinc,
Thank You, Thank You very Much! Always a pleasure to help. About the validation... Have to keep the BOT from creating fake accounts and posts!
Good to see that you are making progress. It is a bit to get a handle on at first, but if you follow the simplest approach first; most everything will be done for you. Now if you desire changes in your script you should consider using the templates to make the changes for you. In that way you can create the same script each time without making ANY manual changes. You might not think that is a big deal right now but 6 months from now when you want to make a change and cannot figure out how or why you made a change it will be BIG then; for you will have some basic documentation and then you can follow the example for new additions / modifications.
BTW: The proper place for the files should be in the SUPPORT folder of the OUTPUT folder. It will help in the long run...
Thanks again. I'll play with the templates and I will also look at putting in comments. I had mistyped earlier. I did put everything needed in the\output\support folder.