We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

Running app w/o installing DLLs/OCXs/XYZs? ChrisLewis?

MacSverre
MacSverre asked
on
Medium Priority
222 Views
Last Modified: 2010-05-03
I've heard that it's possible to run a VB application without installing the required DLLs, _if_ those DLLs are in the same directory as the application file. Well, I've put all the files that SetupWizard includes in an install for the application in the same directory. And, surprise, surprise, it doesn't work... (And yes, I have "extracted" the install files...)

When I run the app, I first get two error messages saying "Object server not correctly registered". Then, when the application window appears, I get the same error with an additional "Run-time error '336':  " at the top. And then the application exits.

As indicated in the question title, the project uses OCXs.

Can anyone tell me if it's possible to get this to work, and if it is, how?

If you want to know what the point of not installing is, it's because the application reads data from a CD-ROM, and as long as you have to have the CD-ROM in the drive, it would be nice to be able to just skip the install... (And have an _optional_ App+Data install instead...)



Regards,

   MacSverre
Comment
Watch Question

Author

Commented:
Edited text of question
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Author

Commented:
Hmm... First of all, I forgot to mention that the program has both Win95 and Win3.X versions.

Someone on #visualbasic/efnet told me about "regsvr32". I tried using that on the OCXs, but it didn't seem to do much good - it said it had registered the controls, but it still didn't work (actually, the win95 version gave another error message, "File not found", before I ran regsvr32). Can I make it work somehow with the help of regsvr32? More important, should I? (It seems to me that redefining the location of an already installed OCX to removable drive is not a very good idea...) Also, is there a "regsvr16"?

Commented:
When using regsvr32 or regsvr16 (yes, there is one), you need to specify the complete path for the OCX.  Also, most OCXs I have seen have DLL support files which need to be in a location where the OCX can find them.  Usually this will be the same directory as the OCX.

As I said above, usually Win95/NT won't allow you to register an OCX over an existing newer version of the same OCX.  There will be exceptions, especially with OCXs without version information, but this will generally be the case.  What should happen is that the registration will go along without a problem, but the next time you boot Windows it will revert back to the original.

More important (good words), you should not do this.  Almost all OCXs are backwards compatible and those that aren't you shouldn't use.  If you keep the latest versions on your developement machine, there should not be a problem.  Also, if your could/did replace an older version of an OCX or DLL, you will find that your users will not be very happy when they try to run an application other than yours and find out it crashes because you replaced an necessary OCX/DLL.

Author

Commented:
OK, I'm gonna stop soon now...  :-)

If I re-register an OCX (on the CD) that's already installed on the PC, and Windows reverts back to the original on the next boot, it doesn't really matter, does it?

But isn't there a way to check if an OCX is installed? Like "LVAR_goobledygook_IS_OCX_INSTALLED( byval doop as string) as BOOLEAN"?



   MacSverre, grasping for straws... :-)

Commented:
As far as telling if an OCX is installed (registered) you could look in the registry, but this would be very difficult as you would need to know the classid (or search through all the classids).

In a nutshell, you might as well go through the install routine.  If you're looking for speed in installing, most setup routines won't copy an older (or current) version OCX on top of a newer (or current) OCX.  They can't tell if the OCX is registered or not, though.

Author

Commented:
Speed of installation is not really the issue. I would just prefer to be able to run the program without installing anything at all.

Anyway, I understand it`s not practical now... Thanks to you!!!  :-) You deserve the 400 points for bearing with a slow-minded one...  :-)

Commented:
I wouldn't call you that.  You do have some very valid questions and ideas.  Perhaps one day...

Thanks for the points.  :)
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.