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?
; 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
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
Thread moved to the 'Application Deployment' forum, which where questions about installing/distributing your software belong
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).
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.
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 ?
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.
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.
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.
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.
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.