PDA

Click to See Complete Forum and Search --> : Inno setup missing runtime files/program crashes


batman321
Sep 19th, 2009, 11:34 PM
Hi,

I've started to use Inno setup to package my application. It works great, installs my application really well but when I run my app after install, my application crashes. I have attached a list of references used in VB6. I try to run MDAC but it states it can't find setup.exe so this does not get installed. Do I need to register any dll's?

Below is my INNO installation script:

'---------------------------------------------------

; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

[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={{79D32A95-1602-4373-9BA2-56939496E100}
AppName=Client Master
AppVerName=Client Master Version 1.0
DefaultDirName={pf}\Client Master
DefaultGroupName=Client Master
LicenseFile=C:\Applications\Visual Basic - Harcourts Program\License.txt.txt
OutputDir=G:\Client Master INNO Setup
OutputBaseFilename=Client Master Setup
SetupIconFile=C:\Applications\Visual Basic - Harcourts Program\Client Master Icon.ico
Compression=lzma
SolidCompression=yes

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

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

[Types]
Name: Custom; Description: Custom installation; Flags: iscustom

[Components]
;Name: VB5RT; Description: Visual Basic Runtime 5.0; Flags: disablenouninstallwarning
;Name: VB6RT; Description: Visual Basic Runtime 6.0; Flags: disablenouninstallwarning
;Name: DCOM95; Description: DCOM for Windows 95; Flags: disablenouninstallwarning restart; MinVersion: 4.0,0; OnlyBelowVersion: 4.1,0
;Name: DCOM98; Description: DCOM for Windows 98; MinVersion: 4.1,0; Flags: disablenouninstallwarning
;Name: MDAC; Description: Microsoft Data Access Components; Flags: disablenouninstallwarning restart; MinVersion: 4.0,4.0; OnlyBelowVersion: 0,5.0

[Files]
Source: "C:\Applications\Visual Basic - Harcourts Program\Client Master.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Applications\Visual Basic - Harcourts Program\Client Master Database.mdb"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Applications\Visual Basic - Harcourts Program\Client Master Letter Creation.doc"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Applications\Visual Basic - Harcourts Program\flag.txt"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Applications\Visual Basic - Harcourts Program\LOGOUT.bmp"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Applications\Visual Basic - Harcourts Program\LOGOUT1.bmp"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Applications\Visual Basic - Harcourts Program\mode.txt"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Applications\Visual Basic - Harcourts Program\LETTER_CREATION1.bmp"; DestDir: "{app}"; Flags: ignoreversion

Source: "C:\windows\system32\comdlg32.ocx"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\program files\common files\microsoft shared\dao\dao350.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\windows\system32\expsrv.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "e:\Applications\Visual Basic 6\wizards\pdwizard\redist\mdac_typ.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\program files\common files\system\ado\msado20.tlb"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\client master\msadodc.ocx"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\windows\system32\msbind.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\client master\msdatgrd.ocx"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\client master\msflxgrd.ocx"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\windows\system32\msjet35.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\windows\system32\msjint35.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "e:\applications\microsoft office 2000\office\msoutl9.olb"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\windows\system32\msrd2x35.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\windows\system32\msrdo20.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\windows\system32\msrepl35.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\windows\system32\msstdfmt.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "e:\Applications\Visual Basic 6\wizards\pdwizard\redist\msvcrt40.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "e:\applications\microsoft office 2000\office\msword9.olb"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\windows\system32\pdaddin.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\windows\system32\rdocurs.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\client master\richtx32.ocx"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\windows\system32\scrrun.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "e:\Applications\Visual Basic 6\wizards\pdwizard\setup.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "e:\Applications\Visual Basic 6\wizards\pdwizard\setup1.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "e:\Applications\Visual Basic 6\wizards\pdwizard\st6unst.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\client master\tabctl32.ocx"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\windows\system32\vb5db.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\windows\system32\vb6stkit.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\windows\system32\vbajet32.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\windows\system32\wshom.ocx"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Applications\Visual Basic - Harcourts Program\Login Page\login_bottom.bmp"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Applications\Visual Basic - Harcourts Program\Login Page\login_top.bmp"; DestDir: "{app}"; Flags: ignoreversion

; begin VB system files
; (Note: Scroll to the right to see the full lines!)
Source: "C:\Applications\Visual Basic - Harcourts Program\Inno DLLs\stdole2.tlb"; DestDir: "{sys}"; OnlyBelowVersion: 0,6; Flags: restartreplace uninsneveruninstall sharedfile regtypelib
Source: "C:\Applications\Visual Basic - Harcourts Program\Inno DLLs\msvbvm60.dll"; DestDir: "{sys}"; OnlyBelowVersion: 0,6; Flags: restartreplace uninsneveruninstall sharedfile regserver
Source: "C:\Applications\Visual Basic - Harcourts Program\Inno DLLs\oleaut32.dll"; DestDir: "{sys}"; OnlyBelowVersion: 0,6; Flags: restartreplace uninsneveruninstall sharedfile regserver
Source: "C:\Applications\Visual Basic - Harcourts Program\Inno DLLs\olepro32.dll"; DestDir: "{sys}"; OnlyBelowVersion: 0,6; Flags: restartreplace uninsneveruninstall sharedfile regserver
Source: "C:\Applications\Visual Basic - Harcourts Program\Inno DLLs\asycfilt.dll"; DestDir: "{sys}"; OnlyBelowVersion: 0,6; Flags: restartreplace uninsneveruninstall sharedfile
Source: "C:\Applications\Visual Basic - Harcourts Program\Inno DLLs\comcat.dll"; DestDir: "{sys}"; OnlyBelowVersion: 0,6; Flags: restartreplace uninsneveruninstall sharedfile regserver
; end VB system files

; NOTE: Don't use "Flags: ignoreversion" on any shared system files

[Icons]
Name: "{group}\Client Master"; Filename: "{app}\Client Master.exe"
Name: "{commondesktop}\Client Master"; Filename: "{app}\Client Master.exe"; Tasks: desktopicon

[Run]
; START DCOM
;Filename: {tmp}\dcom95.EXE; Parameters: /r:n /q:u; WorkingDir: {tmp}; Flags: skipifdoesntexist; Components: DCOM95; MinVersion: 4.0,0; OnlyBelowVersion: 4.1,0
;Filename: {tmp}\dcom98.exe; Parameters: /r:n /q:u; WorkingDir: {tmp}; Flags: skipifdoesntexist; Components: DCOM98; MinVersion: 4.1,0
;Filename: {tmp}\dcm95cfg.exe; Parameters: /r:n /q:u; WorkingDir: {tmp}; Flags: skipifdoesntexist; Components: DCOM95 DCOM98; MinVersion: 4.0,0
; END DCOM
; START MDAC
;Filename: {tmp}\mdac_typ.exe; Parameters: "/Q /C:""setup /QNT"""; WorkingDir: {tmp}; Flags: skipifdoesntexist; Components: MDAC; MinVersion: 4.0,4.0; OnlyBelowVersion: 0,5.0
; END MDAC

westconn1
Sep 20th, 2009, 01:42 AM
this probably should be in the packaging and deployment forum,
you could pm a mod to move it

si_the_geek
Sep 20th, 2009, 07:47 AM
Thread moved to the 'Application Deployment' forum, which where questions about installing/distributing your software belong


this probably should be in the packaging and deployment forum,
you could pm a mod to move it A better alternative is for somebody else (because poster themselves doesn't have the ability) to click the "Report post" icon on the left of the post - as that sends a PM to any mod's assigned to the forum, and creates a copy in a private forum for all of the mod's (so whoever logs in first can act on it).

batman321
Sep 22nd, 2009, 04:17 AM
My program works fine when I use VB6 PDW.

I've included all the .DDL files that are listed in VB6 references (in Inno). When I used the PDW wizard it gave me the option to include DAO drivers, which worked. But when I run my program's exe file it launches then crashes. No error message. Am I missing any .DLLs, runtime program? I installed MDAC but it made no difference.

Thanks

Simon

si_the_geek
Sep 22nd, 2009, 05:16 AM
DAO is far beyond unsupported (VB6's help for it [1998] explicitly says not to use it for new projects), so you should expect it to fail on modern versions of Windows (especially 64 bit ones), and for there to be no solution to that... and in other cases for people to not be able to help much (as most of us moved away from DAO years ago).

However, you have lots of database related References+Components (some of which are contradictory), whereas you should only need 1 or 2 in most programs. I would recommend checking that you actually need the ones that you have got selected - untick one of them, then try a full compile (Ctrl-F5). If you get an error tick it again, and if there is no error you don't need it. Repeat for all of them.


I notice that you have references that are specific to a particular version of Microsoft Office, which means that you should expect errors if that version is not installed. You would be better off using Late Binding - for info on that see our Office Development FAQs (at the top of the Office Development forum)
But when I run my program's exe file it launches then crashes. No error message.What code have you got in Form_Load / Form_Initialise / Sub Main ?

batman321
Sep 22nd, 2009, 05:44 PM
Great news.

I fixed my program. Forget to add a .txt file.

Simon

si_the_geek
Sep 23rd, 2009, 05:14 AM
In that case I would say that there is something seriously wrong with the way you have designed your code.

A missing text file should not be allowed to cause a crash at all (let alone one without a message), instead you should at least be giving an error message, and preferably handling it gracefully (ie: not allowing the crash). Depending on the circumstances, you could also potentially automatically fix the error by generating a 'valid' text file.

batman321
Sep 24th, 2009, 03:47 AM
I have coded my program to deal with .txt files missing.

DigiRev
Sep 24th, 2009, 10:50 PM
I have coded my program to deal with .txt files missing.

Also, "crashing" isn't a very good term to use in this case. Might sound like I'm being picky, but to most people, crashing means a "GPF" error raised by Windows, ie, something like this:

http://www.certiguide.com/apfr/diagrams/figure320.png

Other errors like "File not found", etc. are called "runtime errors" and are raised by your program specifically.

Just for future reference. ;)

batman321
Sep 25th, 2009, 01:40 AM
Can VB6 search for declared variables that aren't used. I remember C++ compiler could. (this is going back a few years) I searched Google but no mention of this.

si_the_geek
Sep 25th, 2009, 04:30 AM
There are addins that can check for you.. I think MZTools (link in my signature) can do that.

batman321
Sep 25th, 2009, 04:45 PM
what are good vb6 coding practices?

si_the_geek
Sep 26th, 2009, 05:36 AM
There are a few things explained in the "Coding standards/Good Practice" section of our Classic VB FAQs (in the FAQ forum)

If you want more, I suggest you create a thread about it in the VB6 forum.

batman321
Sep 27th, 2009, 04:40 PM
Hi,

One of my forms won't load. When I changed the startup object to this form, it won't load. All my other forms load. I think I re registered a .dll. That's when the trouble started. I haven't changed the code on for form that does not load. It does load from other forms btw.

Simon

si_the_geek
Sep 27th, 2009, 04:42 PM
As that question is not directly related to what you asked in the first post, it does not belong in this thread - so you should create a new thread for it.