Link to home
Start Free TrialLog in
Avatar of arno-c
arno-c

asked on

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

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
ASKER CERTIFIED SOLUTION
Avatar of Arthur_Wood
Arthur_Wood
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of boss302_lp
boss302_lp

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
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
at minimum you need the vb runtime files.  Best bet is to create the install package as described
Avatar of arno-c

ASKER

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.
whoa...i'm kinda new to this.....thats over my head..srry i cant be more help
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
Avatar of arno-c

ASKER

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.
arno-c:
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?
Avatar of DanRollins
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
Avatar of arno-c

ASKER

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.