Results 1 to 15 of 15

Thread: Inno setup missing runtime files/program crashes

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jun 2008
    Posts
    206

    Inno setup missing runtime files/program crashes

    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: "compilerefault.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
    Attached Images Attached Images  

  2. #2
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: Inno setup missing runtime files/program crashes

    this probably should be in the packaging and deployment forum,
    you could pm a mod to move it
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  3. #3
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: Inno setup missing runtime files/program crashes

    Thread moved to the 'Application Deployment' forum, which where questions about installing/distributing your software belong


    Quote Originally Posted by westconn1
    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).

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Jun 2008
    Posts
    206

    anyone got any ideas?

    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

  5. #5
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: Inno setup missing runtime files/program crashes

    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 ?

  6. #6

    Thread Starter
    Addicted Member
    Join Date
    Jun 2008
    Posts
    206

    Thanks for your reply

    Great news.

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

    Simon
    Last edited by batman321; Sep 22nd, 2009 at 06:03 PM.

  7. #7
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: Inno setup missing runtime files/program crashes

    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.

  8. #8

    Thread Starter
    Addicted Member
    Join Date
    Jun 2008
    Posts
    206

    thanks for the advice

    I have coded my program to deal with .txt files missing.

  9. #9
    "Digital Revolution"
    Join Date
    Mar 2005
    Posts
    4,471

    Re: thanks for the advice

    Quote Originally Posted by batman321 View Post
    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:



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

    Just for future reference.

  10. #10

    Thread Starter
    Addicted Member
    Join Date
    Jun 2008
    Posts
    206

    question

    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.

  11. #11
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: Inno setup missing runtime files/program crashes

    There are addins that can check for you.. I think MZTools (link in my signature) can do that.

  12. #12

    Thread Starter
    Addicted Member
    Join Date
    Jun 2008
    Posts
    206

    question

    what are good vb6 coding practices?

  13. #13
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: Inno setup missing runtime files/program crashes

    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.

  14. #14

    Thread Starter
    Addicted Member
    Join Date
    Jun 2008
    Posts
    206

    problem

    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

  15. #15
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: Inno setup missing runtime files/program crashes

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width