|
-
Aug 5th, 2005, 08:44 AM
#1
Thread Starter
Frenzied Member
error message
Hello
I just compiled my program into an executable and tried to run it off another machine and get the following error message
"
run-time error '339'
Component 'TABCTL32.OCX' or one of its dependencies not correctly registered: a file is missing or invalid"
"
can you guys help me before management starts breathing fire down my neck 
found the error, tabctl32.ocx was not in system32 directory of the new laptop, what is tabctl32.ocx anyway?
Last edited by vb_student; Aug 5th, 2005 at 08:50 AM.
-
Aug 5th, 2005, 08:47 AM
#2
Re: error message
You cannot just copy executable file onto the user machine: you must build a distribution package. There is a Package & Deployment Wizard (aka P&DW) available in VB. It's simple to so just follow On-Screen instructions.
-
Aug 5th, 2005, 08:59 AM
#3
Re: error message
 Originally Posted by vb_student
found the error, tabctl32.ocx was not in system32 directory of the new laptop, what is tabctl32.ocx anyway?
tabctrl32 is the ocx file which contains the Microsoft Tabbed Dialog control. You must be using that in your project.
As RhinoBull stated, you just can't copy a file like a OCX or a .Dll to a machine and expect it to work. In addition to those files, VB requires certain runtime files of its own just to run the .Exe
All of these files MUST be registered with the OS before they can be used, and that is one of the features/functions of an installation setup package.
-
Aug 5th, 2005, 09:48 AM
#4
Thread Starter
Frenzied Member
Re: error message
i copied the executable to the laptop along with the .ocx file and seems to work fine.
you guys envisage any problems since i will be releasing the executable to external pps.
i will go with the package and deployment wizard next time (in 2 weeks), i cant bother the muggles (mgmt) this time, they dont understand c from vb, hehe.
does the wizard also create an executable?
-
Aug 5th, 2005, 09:51 AM
#5
Re: error message
 Originally Posted by vb_student
does the wizard also create an executable?
No, you must compile the app before creating the installation package.
If you are going to manually install your app, then you will have to manually register the components.
Are you familiar with using regsvr32?
-
Aug 5th, 2005, 09:52 AM
#6
Re: error message
Not sure I understand your entire message but NO, P&DW doesn't not compile (it may tell you that exe file is older then vbp but I don't trust that) so you better compile it yourself.
-
Aug 5th, 2005, 10:10 AM
#7
Thread Starter
Frenzied Member
Re: error message
hey guys i am a bit confused here
i did a make on the project that i had done which created an executable.
i copied the executable to myboss's laptop and tried to run it,
it complaiend about the .ocx file,
so i copied the file from my computers system32 directory to the laptops system32 directory and
then i executed the program by clicking on the exe file and it works fine on the laptop, i am not sending any of the code over, just a single executable with a couple of excel sheets
-
Aug 5th, 2005, 10:14 AM
#8
Re: error message
Then your boss already has VB installed on his laptop. That is the only way it would work without an installation setup or manual control registration.
-
Aug 5th, 2005, 10:36 AM
#9
Thread Starter
Frenzied Member
Re: error message
no, i just checked his laptop,
there is no VB installed in his machine.
perhaps it is the MS office which has some sort of rudimentary VB engine?
-
Aug 5th, 2005, 10:40 AM
#10
Re: error message
VB flat, will not run unless its runtime files are installed and registered.
No ifs, no ands, no buts. It just won't happen. So, if you all you did was copy a file to his laptop, you got lucky, very lucky. At some point, a formal installation of some sort was done on his laptop that included VB runtime files. There is absolutely no getting around that.
He is running something that was made in VB, and formally installed.
-
Aug 5th, 2005, 11:21 AM
#11
Thread Starter
Frenzied Member
Re: error message
so i need to launch the package and installation wizard which would create an executable which would not need any ocx files whatsoever?
my program accesses a couple of excel files, i think it should have MS excel installed too, the package wizard would not be able to take care of that, correct?
you mentioned regsvr32, what is that?
where can i use the .exe generated fro mthe make utility ?
Last edited by vb_student; Aug 5th, 2005 at 11:24 AM.
-
Aug 5th, 2005, 12:10 PM
#12
Re: error message
 Originally Posted by vb_student
so i need to launch the package and installation wizard which would create an executable which would not need any ocx files whatsoever?
my program accesses a couple of excel files, i think it should have MS excel installed too, the package wizard would not be able to take care of that, correct?
where can i use the .exe generated fro mthe make utility ?
The package and deployement wizard will want your .vbp file. From that, it will determine what dependency files (like OCXs, Dlls, etc) that you will need to run this from a different machine. It already knows what dependency files VB needs. Then it will bundle all of those up into an installation package. This package can be copied to a new machine, and then you can run the SETUP.EXE that will be created that will unbundle all of that stuff, store on the local PC, register all of the files that need to be registered, and you should be good to do.
If you have other files that need to be included, like Excel Spreadsheets, then those will have to be manually added to the installation package. As you walk through it, you will see what I mean.
-
Aug 5th, 2005, 12:28 PM
#13
Re: error message
[quote=vb_student]you mentioned regsvr32, what is that?[/Highlight]This is a program that comes with the OS. It is used to manually register file with the OS.
-
Aug 5th, 2005, 02:36 PM
#14
Re: error message
vb_student,
Read Installation Problems in my signature.
-
Aug 5th, 2005, 04:40 PM
#15
Thread Starter
Frenzied Member
Re: error message
so the package and deployment wizard bundles the final .exe and its dependencies along with relevent file structures(?) into one setup.exe file.
i guess special fonts used will also packaged, correct?
why do the files need to be registered with the OS?
and the excel files will have to be manually copied to the corresponding "original" locations othe excel files.
hey thanks randem for the link to installation problems, i just issued a beta version of the software(noobie issuing software- you guys must be laughing your heads off)
i guess the first problem copying the .exe across would have been the error message
TABCTL32.OCX' or one of its dependencies not correctly registered: a file is missing or invalid
now if i run it, if there is some other dependency which is not present in some other machine it is gonna throw up an error
will the setup.exe package work with windows xp, 2000 and xp, or will it just work with the OS it was created on?
is the final package similar to the professional software packages taht one downloads from the net? i guess these packages then try to stick say active x files in certain locatons, and if a file with the same exists, it will check dates and versions and if the version in the folder is a new one, then the installer prompts the user whether he/she wants to copy the file, correct?
hey randem, in the link you supplied, it mentions VB6 Runtime Files, what are those, i guess the Microsoft's Package and Deployment Wizard takes the OS dependent runtime files, but other installation packages would take into account generic runtime files
-
Aug 5th, 2005, 05:05 PM
#16
Re: error message
vb_student,
Well, if you venture with PDW you will encounter "other" issues. I suugest not bothering and use Inno Setup along with **********. You will have far less headaches being a noobie and all. Look in my signature for those links as well.
********** will handle most all of those issue with runtime files and such.
-
Aug 6th, 2005, 11:39 AM
#17
Re: error message
I agree with Randem in terms of not using P&D W, it has a few "issues" that other installation software doesn't.
Now for a few of the points you raised:
so the package and deployment wizard bundles the final .exe and its dependencies along with relevent file structures(?) into one setup.exe file.
is the final package similar to the professional software packages taht one downloads from the net?
Yep 
i guess special fonts used will also packaged, correct?
Only if the installer you use supports this, and you tell it which fonts to install.
why do the files need to be registered with the OS?
If they aren't then the OS doesn't know about them. Your program essentially asks the OS where to find them, if it doesn't know then it will make an attempt to find them. If it cant find them you will get your previous error.
will the setup.exe package work with windows xp, 2000 and xp, or will it just work with the OS it was created on?
most will work for all recent versions of Windows, but P&DW has issues with Windows 2000 (I think).
hey randem, in the link you supplied, it mentions VB6 Runtime Files, what are those, i guess the Microsoft's Package and Deployment Wizard takes the OS dependent runtime files, but other installation packages would take into account generic runtime files
Any installer which supports VB programs should include all of the required files (such as MSVBVM?0.DLL, but you don't need to know them).
and the excel files will have to be manually copied to the corresponding "original" locations othe excel files.
You can get the installer to copy the files to where you like, in most cases the application folder is best (App.Path in VB).
my program accesses a couple of excel files, i think it should have MS excel installed too, the package wizard would not be able to take care of that, correct?
If you add a reference to Excel (under "project" - "references") or use CreateObject("Excel.Application") then this is correct. You will need to install Excel/Office separately - and have a valid licence for it
-
Aug 6th, 2005, 02:47 PM
#18
Re: error message
si_the_geek,
There are such things as Universal VB Runtime files. They are in ********** (one word) and in my link. Most people just use the ones on their system which most are OS dependant and should not be deployed on other OS systems (and people wonder why their XP app won't work properly on 98).
Newer dll/ocx/exe make calls thay were not supported in older OS systems and on an older system will create "Problems" when you make a call to a non-existing entry point or a function that has been changed to return different results than the older version.
Let say that the old dll return from a call a string and the new version of the same dll the same function now returns a long. What do you thinks would happen to code that was expecting a string. Some sort of failure would eventually happen if the code actually check the return value.
The universal runtime files will return the same data type as the older version etc... The same thing would happen if one forced a older dll onto a newer system. But the Installers automatically handle this one. But I have known some companies (I will not name them) that actually force the dll's onto your system. This is because they have a lack of understanding for installers, VB and the OS in general. I cannot stress this enough but Noobies keep trying it.
Hope this long winded explaination helps (I am usually very abrupt with my answers).
Also read Installation Problems in my signature.
Last edited by randem; Aug 18th, 2005 at 06:00 AM.
-
Aug 7th, 2005, 12:05 PM
#19
Re: error message
Good point, and one which is part of the downfall of P&DW.
I have heard lots of good things about Inno., but haven't used it myself.
I certainly wouldn't argue with your knowledge in area of installers tho, as I know you are the guru (of Inno. at least!).
-
Aug 7th, 2005, 06:13 PM
#20
Re: error message
Amen, INNO Script/Setup all the way, i use P&DW and it made crappy setup files, which were like 5mb.
Now with Inno 1.6mb for the same project, and you get a lot more control on what is intalled, and how, and where etc.
Inno Baby
-
Aug 8th, 2005, 04:55 AM
#21
Thread Starter
Frenzied Member
Re: error message
thanks for the replies guys
can the setup.exe generated by the package and deployment wizard be used with say windows xP korean edition
can i place the setup.exe produced by the wizardon say the desktop and execute it from there?
does the package wizard provided by VB support special fonts?
so if the file is registered with the OS then my program asks the OS to locate it, if it is not registered with the OS, the OS tells the program to give the error?
is the app.path where i store excel files, in that case can i tell the installer to do some sort of archive and it would bundle the excel files in the relevent directory?
hey randem, if
the universal runtime files will return the same data type as the older version etc.
then how do they work with (support) the new systems.
hey i downloaded the ********** and innosetup, how do i use them?
-
Aug 8th, 2005, 05:08 AM
#22
Re: error message
vb_student,
Well, the old versions would never be installed over the newer ones and the newer one have the entry points to support those calls. Now the new calls in the newer files would not be present in the older files and that's where the data types would change.
Now if you coded for the new calls and put the app on the old system problems would occur because of the old dll with the original calls.
95/98/Me Integer/Long returns
2000+ Long returns
-
Aug 8th, 2005, 06:02 AM
#23
Thread Starter
Frenzied Member
Re: error message
i guess first i need to do ********** which will give me an .iss file and then do the innosetup compiler
which will give me the .exe file
i guess different language versions of windows would be taken care of, e.g. if i was to do the project building on say an english version then this could be used on a say korean version of windows xp, correct?
i started off innosetup and it comes up with innosetup parameters, i do not think these parameters will be used, so i hit Exit
my VB runtime files folder is
C:\Program Files\Randem Systems\**********\********** 4.0\VB 6 Redist Files\
i stick in my .vbp project
name a file for the .iss
the fourth input box fro mthe top does not seem to do much, so i dont use it
i have windows 95 as the minimum windows version and Windows NT 4.0 as the minimum NT version
VB6 as the VB version
NT service pack level left blank
what is the add files and add folders for?
is that where i can add my excel files and crate some sort of archive?
i hit OK and it started doing its searching process
i used the iss file in the inno setup compiler and it hit an error
LIne 60:unrecognised parameter name "graph.exe; DestDir"
did i do something wrong, or is it the use of MSgraph within the code.
i actually did search for Msgraph and graph in my code
the line in the .iss file which causes the error is
Code:
source: =msgraph.chart.8; graph.exe;DestDir: (sys); Flags: ignoreversion
-
Aug 8th, 2005, 06:08 AM
#24
Re: error message
vb_student
Starting with the instruction is always a good starting point. Everything is usually explained there. It would also eliminate guessing.
-
Aug 8th, 2005, 06:22 AM
#25
Thread Starter
Frenzied Member
Re: error message
you guys pointed me in the right direction, i have already come up with a component pdf.ocx not found on the previous version. now i realise the value of the package wizard.
-
Aug 8th, 2005, 06:27 AM
#26
Re: error message
vb_student,
Good Job. I knew you could do it!
-
Aug 8th, 2005, 07:25 AM
#27
Thread Starter
Frenzied Member
Re: error message
randem i have not been able to surmount the msgraph obstacle as yet
Code:
source: =msgraph.chart.8; graph.exe;DestDir: (sys); Flags: ignoreversion
can you give me some hint as to what to locate since i can not find any instances of graph or msgraph in my code
i think i found it, there are references to MSchart within the code, but why does the compiler complain about the references to MSchart?
Code:
MSChartULcap.Row = rangee
i looked in the .iss file and see this section
Code:
; --------------------------
; Visual Basic Components
; --------------------------
; Unknown Component (Possibly not registered) - =MSGraph.Chart.8; GRAPH.EXE -
; Unknown Component (Possibly not registered) - =Excel.Chart.8; EXCEL.EXE -
; Microsoft Internet Controls
; Acrobat Control for ActiveX
; VB 6 Application Wizard
why would MSgraph.chart.8 and excel.shart.8 not be registered?
Last edited by vb_student; Aug 8th, 2005 at 07:41 AM.
-
Aug 8th, 2005, 07:41 AM
#28
Re: error message
Have you loaded MSGraph into your project? That would cause a reference to be made to it, even if you never used it. Take a look at your components list, and see if it is there. If so, just uncheck it, and this error should be taken care of.
-
Aug 8th, 2005, 07:45 AM
#29
Thread Starter
Frenzied Member
Re: error message
i checked the components
i cant see the MS excel object(checked or unchecked) under controls or designers
however under insertable objects i can see microsoft excel chart and microsoft graph chart, and they are both checked
-
Aug 8th, 2005, 07:54 AM
#30
Re: error message
 Originally Posted by vb_student
however under insertable objects i can see microsoft excel chart and microsoft graph chart, and they are both checked
Are you using both?
-
Aug 8th, 2005, 07:57 AM
#31
Thread Starter
Frenzied Member
Re: error message
yes, i am using both microsoft excel chart (accessing and writing to cells in excel sheets) and microsoft graph chart(MSChartULcap.Row = rangee)
-
Aug 8th, 2005, 08:15 AM
#32
Thread Starter
Frenzied Member
Re: error message
hey when i ran inoscript it came up with
number of files found: 13
number of files unsafe: 24
number of files not found: 17 (Shown in Red)
number of files deleted: 24
elapsed time: 00:00:26
i checked out the references in VB6 and found out that
Microsoft Excel 10.0 Object Library
Microsoft Graph 10.0 Object LIbrary
are not added (no check sign against them)
so i added them and this time it runs for a longer time, so perhaps it was the references,
i guess the time the script file takes to generate depends upon the number of different object types as well as the length of the code
it has been going for 2 minutes and is still looking for dll's. how long does a typical script file take to generate
does it also take a long time to produce an exe from the script file?
-
Aug 8th, 2005, 08:25 AM
#33
Thread Starter
Frenzied Member
Re: error message
i still get the error
Code:
Compiler error
line 62: unrecognized parameter name "graph.exe;DestDir"
-
Aug 8th, 2005, 09:04 AM
#34
Re: error message
 Originally Posted by vb_student
i still get the error
Code:
Compiler error
line 62: unrecognized parameter name "graph.exe;DestDir"
Does it tell you where that is coming from?
Have you done a project wide search to see if you can find that reference?
-
Aug 8th, 2005, 09:09 AM
#35
Thread Starter
Frenzied Member
Re: error message
it is to do with the ********** output file, it still cant find the excel and MSchart references, i think it is to do with the path.
i looked up the ********** manual, the manual reads
Source File Search Paths
Just beneath the Visual Basic Project folder drop down; there is an area that contains the current path. This
path can be modified to steer ********** to locations that contain your files that go into the script for faster searches
and to find files that might not be found under normal conditions.
i guess the area is the area right above the bottom input area. it is full of paths, and i feel that whenever i run the program(smiley) it adds some more paths. this time i had added c:\windows\system32\ but the application crashed
-
Aug 8th, 2005, 12:47 PM
#36
Thread Starter
Frenzied Member
Re: error message
i have a feeling it is not picking up the right path,
it seems to be picking up files from this directory only
C:\Program Files\Randem Systems\**********\********** 4.0\VB 6 Redist Files
can you guys tell me if i am sticking the path in the right place, it is the place where i get the tooltip "Enter source file search paths ....."
i cant see the path refresh button
-
Aug 8th, 2005, 02:16 PM
#37
Re: error message
vb_student,
If you have the graph.exe file on your computer, you would need to let InnoScipt know where it is. One thing you can do is run in UnSafe mode to see if ********** will find it in your SYSTEM folder.
Send or Post your app exe and vbp file and I will take a look.
-
Aug 8th, 2005, 04:03 PM
#38
Thread Starter
Frenzied Member
Re: error message
thanks for the reply
so once ********** finds it, do i need to modify the generated scriptfile accordingly?
-
Aug 8th, 2005, 04:43 PM
#39
Re: error message
vb_student,
You need to modify the script if it does not find files, due to the non-existance of the files or if you want the script to do something different than the default. If it finds the file you might want to remove it if you don't want to deploy it for one reason or the other.
-
Aug 8th, 2005, 04:54 PM
#40
Thread Starter
Frenzied Member
Re: error message
why does the script look for excel.exe, i mean isn't the excel.exe already a part of the software on the machine where the package is to be deployed?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|