Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


What is required for a VB6 exe to run on Windows XP?

Posted on 2003-02-20
Medium Priority
Last Modified: 2013-11-13
I have just returned to VB after 10 or 12 years. I am using VB6 Pro and Access to create database programs.  My programs run without errors on Win 98 se but will not even open on Win XP.  When I tried dragging the progam (all parts in one folder) to Xp hard disk, the message was "Cannot read Source Code).  I have the latest MS downloads.  Do I have to program using DB6 in Win XP for it to work?  Hope 25 points is ok.  Only have a few left.
Thanks, Arno
Question by:arno-c
LVL 44

Accepted Solution

Arthur_Wood earned 75 total points
ID: 7990883
you must create an Installation package to INSTALL your application (Program.EXE), along with the related DLLs, in order for the program to run on ANY PC where VB itself is not installed.  I have Windows XP Pro, and VB runs just fine.


Expert Comment

ID: 7991059
to run on a computer you must figure out what ocx and dll files your program makes reference (ie. if your program uses a winsock function, it will need winsock ocx file)

these files are in your system directory, and then you just include them in an installer, or, send all these files with exe

you do not need to make an installation package, you just need to get the required files into the computers system directory. An installation makes this easy, but is not required

Expert Comment

ID: 7991076
ps - visual basic comes with a packager that creates this 'setup' file, including the required ocx files.
this is called a package and deployment wizard.
you can run this file in your ..\Microsoft Visual Studio\VB98\Wizards\PDWizard\ directory...the filename is PDCMDLN.EXE
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Expert Comment

ID: 7991603
at minimum you need the vb runtime files.  Best bet is to create the install package as described

Author Comment

ID: 7997154
Ok used the Package and Deploy but program starts then fails.  Error says Class not registered looking for object with CLSID:  !Runtime error 91 Object variable or with block variable not set.

Expert Comment

ID: 7997175
whoa...i'm kinda new to this.....thats over my head..srry i cant be more help

Expert Comment

ID: 7997184
that wizard actually compilers vb code to make installer....maybe during yur installation of vb that code didnt get extracted properly.....or, if you want, you could send yur source and i'll tell you what ocx files are needed...then you can create an installer including those files with another program like setup factory......if you dont feel comfortable sending me your source....sorry i cant be of much help

Author Comment

ID: 8012928
Ok, The package mgr did put the COMDLG32.OCX in even though the path was shown. I put it in the folder with the program.  Now the program starts but an Error says "Class not registered. Looking for object with CLSID" and gives a long hex number.

I made another partition and installed Win XP so I can test the program myself.  I'm not sure about that last error message.

Expert Comment

ID: 8901341
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
Experts: Post your closing recommendations!  Who deserves points here?
LVL 49

Expert Comment

ID: 8964000
arno-c, an EE Moderator will delete this for you.
Moderator, my recommended disposition is:

    DELETE this question (refund points).

DanRollins -- EE database cleanup volunteer

Author Comment

ID: 8964357
Finally found the problem.  My program used the hard drive serial numbers of the user's computers.  Problem was those two computers with XP returned a negative serial number and so my calculations created the errors and then bombed.  The computers with Win 98 were returning positive numbers and so no problem.  I thank everyone for helping and sorry I did not mention the serial number part but did not think that was the problem.  I am giving the points to the first answer Arthur-Wood since his answer helped me make a better installation.  Thanks all.

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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

580 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question