• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 500
  • Last Modified:

Visual Basic Reference files

I tried to create VB installation program of the project i just did in VB. In this project I have added a commX control which is a control for transferring of files developed by GreenLeaf software. This control has its own dependancy files and references. I have ticked the appropricate references in the reference section of the project to accommodate this control. One of the dependancy files is called commX.ocx. However when I try to create installation disks, for some reason Package and Deployment wizard cannot see the reference. Later when I try to run the exe and open the form which contains commX control it gives an error '53' cannot find the file.

When I reinstalled the CommX, now same thing is happenning but with a different file. Now it can't see dependancy for "expsrv.dll".

Strange thing with this file is that it is not even listed in the reference section of the vb project and i tried adding it but it didn't work.

What is going on here?
1 Solution
aussie_guy_nikAuthor Commented:
OOps, i just realized i sent my question to a wrong category. This is not a database question but if anyone can still answer it anyway it would be greatly appreciated. Thanks.

Controls shuld have .dep files in Windows\system dir (in case of NT the folder is system32)

These are made by the author.

Check where the control is registered
Found this in VB menu controls there is path (some cases part of it is not visible in all display settings.)

Manual register/unregister a component:
Run: regsvr32 CommX.ocx /U

Run: regsvr32 CommX.ocx

The expsrv.dll had a mistaken selfregister value this is fixed in VS6 SP3, there shuld not be a $ in DLLselfregister section if yuo look at file properities.

Hi the setup and deployment wizard with vb is quite a poor product(personal experience only) I reorted to using install shield or wise installer for my apps because of this exact type of problems you are having. My suggestion to u is this
goto this site www.sysinternals.com and download the free tool called filemon. It watches every file your application is using or trying to use. Run your setup program on the target pc(the one with the error) until u hit the error. In the meen time run filemon in the background while you run your app. Then quickly alt tab to filemon and go file save as and save the response to a normal text file. Then ope the text file and go thru it and you should see the file the system is trying to use but cannot find . There will be a description next the file saying "FileNotFound". Then have a look where the system is looking fot the file , copy the file of your development machine onto the taget machine and trouble shoot your application to success. Then add those files in manually into the install script and your problem will be fixed

hope this helps
Good luck

You have to be careful with 3rd party controls. Some of them are only licensed for you to develop with them but *NOT* for distribution. The Microsoft Active Media control is an example of this. You can develop and run on your main system and everything works like a charm. You build the setup kit, still smooth as silk. You install and (maybe) you get a warning. You attempt to run and pfffft! CRASH! BURN & DIE. Nothing appears to be wrong, but it just doesn't run. You may get some obscure negative 32 bit number as an error code but it don't run and it don't say why.

Dig long & deep enough and you'll come accross the fine print that says "Download FREE development .DLL" and "To Order the Full Module send check for..." Now you D/L'd the module and thought, "Wow, it was free and *works*" - but *ONLY* on your target system. Three months go by and you've forgotten the "Send Check" part and the app you've developed will *NOT* run anywhere but on the system it was written on.

Even if you download the control to the target system and register it the !@#$%^ *still* won't run! Why? Because the random GUID serial number generated at install time doesn't match the GUID that your install has hidden into the .EXE files. (sigh)

How do I know all this? M$ stuck it in my *ear* (another part of my anatomy comes to mind but this is a family-oriented forum). I had developed a *lovely* app using a control that I had downloaded months previously, played with a bit and forgotten about. Twas the night before the *big demo* and I can't get this thing to run on the demo system. Runs like a *champ* on the development box, gives an *ugly* crash on the demo system. Panicky calls to M$ tech support give me an answer - in *SIX WEEKS*. That day there is no choice except to drag the development system over to the demo site and patch *it* into the media center instead of just popping my little CD online... (sigh)

Wanna know the *real* kicker? The distribution license for that control was *FREE*! Now who in the *HELL* decided to make a redistribution restriction on something that they're *GIVING* away?

aussie_guy_nikAuthor Commented:
Great comments and answers guys. I have no doubt that one of these will work. You will have to excuse me for a few days cause I am involved in other duties over the next few days but as soon as I try these out I will award the points to the best one. Thanks a lot for your time.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now