ComponentOne still having trouble

Started by bibin98, August 26, 2012, 09:03:14 PM

Previous topic - Next topic

Randem

OK, then are you sure that the error is on that line of code?

bibin98

I'm not running on developer machine, but on a fresh install Win7 Ultimate. I have manually register scrrun.dll using regsvr32 and run success but myprogram still error.

Randem

Did you make sure scrrun.dll was registered?

Randem

Are you installing on your development machine again? If so you will have all sorts of issues...

Randem

You also have an error in this line
 
Set A = fs.CreateTextFile(App.Path & Config.lic, True)
 
You have the issue of a possible c:\Config.lic
That could be an invalid path...

bibin98

I'm using Win7 Ultimate and Win7 Pro, I also compiled it on Win7 Pro

bibin98

Owww... I put AutoOSUpdater just to try what the problem is ... Looks like that's not the problem

Randem

What OS are you installing your application on? The scripting runtime selected will only install on XP. If you are installing on another OS it will not be installed.

bibin98

Yes, when it installed, the default is all checked

Randem

Why did you put VB_VC_DCOM_MDAC_JET_AutoSetup.exe back in?

Randem

Then are you sure that line of code is where the error is? And did you select the check mark for the Scripting runtime to be installed on installation

bibin98

I always enable Scripting Runtime to all my project.
 
; InnoScript Version 11.1  Build 19
; Randem Systems, Inc.
; Copyright (c) 2002 - 2011, Randem Systems, Inc.
; Website:  https://randemsystems.com
; Support:  https://randemsystems.support
; OS: Windows NT 6.1 build 7601 (Service Pack 1)
 
; Derived from VB VBP Project File
 
; Designed for Inno Setup Version: 5.5.1 (a)
; Installed Inno Setup Version: 5.5.1 (a)
 
; Date: September 06, 2012
 
; Local Machine Settings. Use these settings as a template for your installation folders
 
; {app}           : C:\Program Files\Randem Systems\InnoScript
; {appdata}       : C:\Users\Admin\AppData\Roaming\Randem Systems\InnoScript\
; {localappdata}  : C:\Users\Admin\AppData\Local\Randem Systems\InnoScript\
; {cf}            : C:\Program Files\Common Files\Randem Systems
; {tmp}           : C:\Users\Admin\AppData\Local\Temp\
; {commonappdata} : C:\ProgramData\Randem Systems\InnoScript\Release\
; {pf}            : C:\Program Files\
 
;              VB Runtime Files Folder:   C:\Program Files\Randem Systems\InnoScript\InnoScript 11\VB 6 Redist Files\
;     Visual Basic Project File (.vbp):   D:\Project VB\Asen\PrSIB.vbp
; Inno Setup Script Output File (.iss):   D:\Project VB\Asen\Scripts\PrSIB Release.iss
;:   D:\Project VB\Asen\Scripts\Templates\Apple East Coast.tpl
;:   C:\Users\Admin\AppData\Local\Randem Systems\InnoScript\Release\Templates\AutoOSUpdater.tpl
;:   C:\Users\Admin\AppData\Local\Randem Systems\InnoScript\Release\Templates\Crystal Reports.tpl
;:   C:\Users\Admin\AppData\Local\Randem Systems\InnoScript\Release\Templates\VCRuntime.tpl
 
; ------------------------
;        References
; ------------------------
 
; OLE Automation - (stdole2.tlb)
; Microsoft ActiveX Data Objects 2.7 Library - (msado27.tlb)
; Microsoft Data Binding Collection VB 6.0 (SP4) - (MSBIND.DLL)
; Crystal Reports ActiveX Designer Design and Runtime Library 11.5 - (craxddrt.dll)
 
 
; --------------------------
;        Components
; --------------------------
 
; ComponentOne True DBDate 8.0 - (tidate8.ocx)
; Crystal ActiveX Report Viewer Library 11.5 - (CRViewer.dll)
; Microsoft Windows Common Controls 6.0 (SP6) - (MSCOMCTL.OCX)
; ComponentOne True DBGrid Pro 8.0 (OLEDB) - (todg8.ocx)
; Microsoft Common Dialog Control 6.0 (SP6) - (comdlg32.ocx)
; ComponentOne True DBList Pro 8.0 (OLEDB) - (todl8.ocx)
; ctNEdit (5.0) Numeric Edit Control - (ctNEdit.ocx)
; ActiveSkin 4.0 Type Library - (actskin4.ocx)
; ActiveSplash 1.0 Type Library - (actsplash.ocx)
; ctBanner (3.0) Animated Banner Control - (ctBanner.ocx)
 
 
[Setup]
SetupLogging=Yes
AppId=Sistem Informasi Bisnis
 
;------------------------------------------------------------------------------------------------------------------------
; Taken from VBP/VBG Project File Parameters AppName, AppName AppVersion and Company
;------------------------------------------------------------------------------------------------------------------------
 
AppName=Sistem Informasi Bisnis 1.0.0
AppVerName=Sistem Informasi Bisnis
AppPublisher=Apple East Coast
 
;------------------------------------------------------------------------------------------------------------------------
 
AppVersion=1.0.0
VersionInfoVersion=1.0.0
AllowNoIcons=yes
DefaultGroupName=Sistem Informasi Bisnis  
DefaultDirName={pf}\Sistem Informasi Bisnis\  
AppCopyright=2012
PrivilegesRequired=None
MinVersion=0,5.01
OnlyBelowVersion=0,7.0
Compression=lzma
OutputBaseFilename=SIB0100000Release
 
[Tasks]
Name: Desktopicon; Description: {cm:CreateDesktopIcon}; GroupDescription: {cm:AdditionalIcons}
Name: AutoOSUpdater; Description: Install Database Support Updater; GroupDescription: Database Support:
Name: VCRuntime6; Description: Install VC   6.0 Runtimes; GroupDescription: VC Runtimes:
Name: ScriptingRuntime; Description: Install Microsoft's Scripting Runtime; GroupDescription: Install Scripting Runtime:
Name: CRInstallation; Description: Install Crystal Reports Runtime Files; GroupDescription: Install CR Runtime Files:
 
[Files]
Source: D:\Project VB\Asen\Scripts\Output\Support\VB_VC_DCOM_MDAC_JET_AutoSetup.exe; DestDir: {tmp}; Flags:  deleteafterinstall ignoreversion nocompression; AfterInstall: InstallAutoOSUpdater('{tmp}\VB_VC_DCOM_MDAC_JET_AutoSetup.exe','/NORESTART /VERYSILENT'); Tasks: AutoOSUpdater;
Source: D:\Project VB\Asen\Scripts\Output\Support\vcredist.exe; DestDir: {tmp}; Flags:  deleteafterinstall ignoreversion nocompression; AfterInstall: InstallVCRuntime('{tmp}\vcredist.exe','/Q /T:{tmp}'); Tasks: VCRuntime6;
Source: D:\Project VB\Asen\Report\*.*; DestDir: {app}\Report\; Flags:  
Source: D:\Project VB\Asen\Skins\*.*; DestDir: {app}\Skins\; Flags:  
Source: C:\Program Files\Randem Systems\InnoScript\InnoScript 11\VB 5 Redist Files\stdole2.tlb; DestDir: {sys}; Flags:  regtypelib restartreplace uninsneveruninstall;  
Source: D:\Project VB\Asen\Scripts\Output\Support\tidate8.ocx; DestDir: {app}; Flags:  regserver restartreplace sharedfile;  
Source: D:\Project VB\Asen\Scripts\Output\Support\MSBIND.DLL; DestDir: {sys}; Flags:  regserver restartreplace sharedfile;  
Source: D:\Project VB\Asen\Scripts\Output\Support\CRXI_5_RDC_Redistribution.msi; DestDir: {tmp}; Flags:  deleteafterinstall ignoreversion nocompression; Tasks: CRInstallation
Source: D:\Project VB\Asen\Scripts\Output\Support\MSCOMCTL.OCX; DestDir: {sys}; Flags:  regserver restartreplace sharedfile;  
Source: D:\Project VB\Asen\Scripts\Output\Support\todg8.ocx; DestDir: {app}; Flags:  regserver restartreplace sharedfile;  
Source: D:\Project VB\Asen\Scripts\Output\Support\comdlg32.ocx; DestDir: {sys}; Flags:  regserver restartreplace sharedfile;  
Source: D:\Project VB\Asen\Scripts\Output\Support\todl8.ocx; DestDir: {app}; Flags:  regserver restartreplace sharedfile;  
Source: C:\DBITech\Studio Controls R3\COM Controls\ctNEdit.ocx; DestDir: {app}; Flags:  regserver restartreplace sharedfile;  
Source: D:\Project VB\Asen\Scripts\Output\Support\actskin4.ocx; DestDir: {app}; Flags:  regserver restartreplace sharedfile;  
Source: D:\Project VB\Asen\Scripts\Output\Support\actsplash.ocx; DestDir: {app}; Flags:  regserver restartreplace sharedfile;  
Source: C:\DBITech\Studio Controls R3\COM Controls\ctBanner.ocx; DestDir: {app}; Flags:  regserver restartreplace sharedfile;  
Source: D:\Project VB\Asen\SIB.exe; DestDir: {app}; Flags:  ignoreversion restartreplace;  
Source: D:\Project VB\Asen\Scripts\Output\Support\scripten.exe; DestDir: {tmp}; Flags:  deleteafterinstall ignoreversion nocompression; MinVersion: 0,5.0; OnlyBelowVersion: 0,5.02; Tasks: ScriptingRuntime
Source: D:\Project VB\Asen\apple.spl; DestDir: {app}; Flags:  ignoreversion;  
Source: D:\Project VB\Asen\Config.lic; DestDir: {app}; Flags:  ignoreversion;  
Source: D:\Project VB\Asen\Scripts\Output\Support\tdbgpp8.dll; DestDir: {app}; Flags:  ignoreversion;  
Source: D:\Project VB\Asen\Scripts\Output\Support\tibase8.dll; DestDir: {app}; Flags:  ignoreversion;  
Source: D:\Project VB\Asen\Scripts\Output\Support\timask8.ocx; DestDir: {app}; Flags:  regserver restartreplace sharedfile;  
Source: D:\Project VB\Asen\Scripts\Output\Support\tinumb8.ocx; DestDir: {app}; Flags:  regserver restartreplace sharedfile;  
Source: D:\Project VB\Asen\Scripts\Output\Support\tishare8.dll; DestDir: {app}; Flags:  regserver restartreplace sharedfile;  
Source: D:\Project VB\Asen\Scripts\Output\Support\todgub8.dll; DestDir: {app}; Flags:  regserver restartreplace sharedfile;  
Source: C:\Program Files\Randem Systems\InnoScript\InnoScript 11\VB 5 Redist Files\OLEAUT32.dll; DestDir: {sys}; Flags:  restartreplace sharedfile;  
Source: C:\Program Files\Randem Systems\InnoScript\InnoScript 11\VB 5 Redist Files\OLEPRO32.DLL; DestDir: {sys}; Flags:  regserver restartreplace sharedfile;  
Source: D:\Project VB\Asen\Scripts\Output\Support\MSVBVM60.DLL; DestDir: {sys}; Flags:  regserver restartreplace sharedfile;  
 
[INI]
 
[Icons]
Name: {group}\PrSIB ; Filename : {app}\SIB.exe; WorkingDir: {app};
Name: {group}{cm:UninstallProgram, PrSIB }; Filename: {uninstallexe};
Name: {commondesktop}\PrSIB ; Filename: {app}\SIB.exe; Tasks: Desktopicon ; WorkingDir: {app};
 
[Run]
Filename: {tmp}\scripten.exe; Parameters: /quiet /passive; MinVersion: 0,5.0; OnlyBelowVersion: 0,5.02; WorkingDir: {tmp}; Flags: skipifdoesntexist runascurrentuser; Tasks: ScriptingRuntime; StatusMsg: Installing Scripting Runtime;
Filename: msiexec.exe; Parameters: /package CRXI_5_RDC_Redistribution.msi /passive /promptrestart /l* {sd}\CRXI_5_RDC_Redistribution.msi.txt; WorkingDir: {tmp}; Flags: skipifdoesntexist runascurrentuser; Tasks: CRInstallation; StatusMsg: Installing Crystal Reports Runtimes;
; 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|!F62B9FA4-455F-4FE3-8A2D-205E4F0BCAFB@\11.5.0.313}{code:LogFileName|crviewer.dll}; WorkingDir: {code:GetCLSIDFldr|!F62B9FA4-455F-4FE3-8A2D-205E4F0BCAFB@\11.5.0.313}\; StatusMsg: Registering Crystal ActiveX Report Viewer Library 11.5; Tasks: CRInstallation; Flags: runascurrentuser
Filename: regsvr32.exe; Parameters: /s {code:GetCLSIDFldr|!4FB2D832-C996-4EB1-BE0D-4DE953CF25F0@\11.5.0.313}{code:LogFileName|craxddrt.dll}; WorkingDir: {code:GetCLSIDFldr|!4FB2D832-C996-4EB1-BE0D-4DE953CF25F0@\11.5.0.313}\; StatusMsg: Registering Crystal Reports ActiveX Designer Design and Runtime Library 11.5; Tasks: CRInstallation; Flags: runascurrentuser
Filename: {app}\SIB.exe; Description: {cm:LaunchProgram, PrSIB }; Flags: nowait postinstall skipifsilent runascurrentuser; WorkingDir: {app}
 
[UninstallDelete]
Type: dirifempty; Name: {app}
 
 
 
[InstallDelete]
Type: files; Name: {app}\Install.log;
 
[Code]
//=============================================================
// Install the Automatic OS Updater
//=============================================================
Procedure InstallAutoOSUpdater(Filename: String; Param: String);
var
  ErrorCode: Integer;
  begin
     ShellExec('', ExpandConstant(Filename), ExpandConstant(Param), '', SW_SHOW, ewWaitUntilTerminated, ErrorCode);
  end;
//===================================================================
// Install VC   Runtime files
//===================================================================
Procedure InstallVCRuntime(Filename: String; Param: String);
var
  ErrorCode: Integer;
  begin
     ShellExec('', ExpandConstant(Filename), ExpandConstant(Param), '', SW_SHOW, ewWaitUntilTerminated, ErrorCode);
  end;
 
//========================================================================================================================
// 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;
 
//============================================================================

Randem

Add the reference to Scripting Runtime in your project, then re-run InnoScript. You probably selected VB5 instead of VB6. Check your options... Also check your search folder, you may have VB5 in there.

bibin98

I want to ask why InnoScript added VB5, meanwhile I'm using VB6 SP6. Is this cause my trouble?
 
Source: C:Program FilesRandem SystemsInnoScriptInnoScript 11VB 5 Redist Filesstdole2.tlb; DestDir: {sys}; Flags:  regtypelib restartreplace uninsneveruninstall;  
Source: C:Program FilesRandem SystemsInnoScriptInnoScript 11VB 5 Redist FilesOLEAUT32.dll; DestDir: {sys}; Flags:  restartreplace sharedfile;  
Source: C:Program FilesRandem SystemsInnoScriptInnoScript 11VB 5 Redist FilesOLEPRO32.DLL; DestDir: {sys}; Flags:  regserver restartreplace sharedfile;

bibin98