"D & J G" <do********@optusnet.com.au> wrote in message
news:44**********************@news.optusnet.com.au ...
A VB6 program that I created has been installed on a wide range of computers
and networks without any problems. Win 95, Win 98 and XP so far..
Occasionally, however, the function refuses to start on some systems, with the
only response being a critical error: 'Unexpected Error!', without even trying
to run.
Well! I didn't expect it, either!
Re-compiling and re-installing doesn't change anything. The program is
nothing really special. Reading, modifying and rewriting files is all it does
and all the files it needs to read are pre-written during install..
Does anyone have any idea what sort of problems commonly produce such a
message? Is the range of suspects far too great to even guess? Why does it
start OK on most computers but refuses on one or two?
No two computers are exactly alike. Stuff happens. If it's weird, don't ask the
why question :)
Some things you might check:
Which OS does it sometimes fail on? (I'm guessing XP...)
Where did you put those files "pre-written during install"? (I'm guessing
Program Files...)
Did you run a setup for the program? Look at the list of files in the setup
(setup.lst). Is every one of those files on the pesky machine? Is each one at
least as new as the version in your setup? Are your "pre-written" files present?
One possible scenario is that while many XP users are set up as machine
administrators, you have encountered someone who is not. They may be denied
permission to install some dlls, or may not have read/write permissions on files
located in Program Files. If your program tries something very early in startup
that is denied, the program might not be perceived by the OS to have even loaded
up and started, hence the "unexpected" error. The most common cause is probably
file permissions.