-
Oct 1st, 2024, 12:14 PM
#1
Thread Starter
Addicted Member
vb6 - run time error 76
I have writen a computer program about statistics 18 years ago (!) for a friend statistician using VB6.
It must have been 2007 or 2006 and we were using xp at the time.
He 's been using it on and off since but in 2010 an accident happened in my office and I lost the source code.
Now we are both using windows 10 and it won't run.
We tried changing the compatibility, nothing.
I offered to write it again from scratch.
But it's fairly big and I don't remember all of the contents.
So is there a way to make it run at least to remember what it was about ?
Apparently it starts but crashes immediately with the message "path not found - run time error 76".
It obviously looks for some standard data file and can't find it.
As we are talking about xp environment, two possible locations for the program are a) C:\program files\application name and b) C:\application name, but as we know later versions of
windows don't like these things.
He says however that the program was working in windows 7, which I never used (I jumped from xp to windows 10).
I have n't been using this program myself since it is well outside my interests, that's why I don't remember the stuff in it.
Can you help me locate the missing file to avoid the error message ?
I know it's easy to make the necessary modifications and emigrate from xp to windows 10, but as I have no source code, I can't.
-
Oct 1st, 2024, 12:24 PM
#2
Lively Member
Re: vb6 - run time error 76
You can install virtual machine with windows xp and try your program.
Also, did you try to Run as Admin?
-
Oct 1st, 2024, 01:49 PM
#3
Re: vb6 - run time error 76
-Download Process Monitor from Microsoft
-Run Process Monitor
-While it is capturing events, run your program up until the point that the error happens
-In Process Monitor, stop capturing events
-Add a Filter in process monitor where the process name is the name of your executable
-Add a Filter in process monitor where the Result is Path Not Found*
That should tell you exactly where the program is expecting the file(s) to exist.
*If that doesn't work, try a filter of "Result" "Is Not" "Success" instead.
-
Oct 1st, 2024, 02:20 PM
#4
Re: vb6 - run time error 76
Microsoft changed the file and folder names for system and other files from XP to Windows 10.
If you can remember where you put the files under XP, you can recreate the folder name(s) and that should get the program working.
https://tarma.com/support/im9/using/...picalpaths.htm
-
Oct 1st, 2024, 10:39 PM
#5
Thread Starter
Addicted Member
Re: vb6 - run time error 76
Originally Posted by jdc2000
Microsoft changed the file and folder names for system and other files from XP to Windows 10.
If you can remember where you put the files under XP, you can recreate the folder name(s) and that should get the program working.
https://tarma.com/support/im9/using/...picalpaths.htm
I 'd like to do that as it sounds simpler than installing the virtual machine.
I mentioned the location where I used to install under xp:
program files, program files x86, root
The installer I have in fact says program files x86.
Now in my computer I see the installed files but nothing like a data file (should exist but can't be found - may be it is universal constants of some kind, relating to statistics I suppose).
So where is windows 10 taking such files ?
Run as admin does n't work, fix compatibility does n't work. What about lowering security level ?
In newer installers I have created for other programs of mine files don't go to strange places and the programs work.
-
Oct 2nd, 2024, 04:10 AM
#6
Re: vb6 - run time error 76
Without knowing anymore details, all I can say is you shouldn't hardcode (if that has been done) system folder paths. There are ways to retrieve them such as the SHGetFolderPathA API function. Also you could use environment variables (ProgramData/ProgramFiles, etc.) in some cases. Perhaps you could show the relevant piece of code?
-
Oct 2nd, 2024, 04:43 AM
#7
Thread Starter
Addicted Member
Re: vb6 - run time error 76
Originally Posted by Peter Swinkels
Without knowing anymore details, all I can say is you shouldn't hardcode (if that has been done) system folder paths. There are ways to retrieve them such as the SHGetFolderPathA API function. Also you could use environment variables (ProgramData/ProgramFiles, etc.) in some cases. Perhaps you could show the relevant piece of code?
Hi.
Read the above stuff - we don't have the code (or it would take seconds to make it compatible and create a new installation package).
Now what I want is to understand why this "path not found" occurs or find files-subfolders perhaps dispersed around the pc, due to the incompatibility.
At this hour I found an old tablet sized computer with windows 7 and I 'm searching for the power cable.
Perhaps it runs there and will show me some things.
-
Oct 2nd, 2024, 09:50 AM
#8
Re: vb6 - run time error 76
Windows 7 should have the same problem as Windows 10.
Also, while you can install a program in Program Files after Windows XP, you cannot normally write to files there. Placing files in the C:\ root folder is also a no-no.
-
Oct 2nd, 2024, 08:31 PM
#9
Lively Member
Re: vb6 - run time error 76
Originally Posted by johnywalker
I 'd like to do that as it sounds simpler than installing the virtual machine.
I mentioned the location where I used to install under xp:
program files, program files x86, root
The installer I have in fact says program files x86.
Now in my computer I see the installed files but nothing like a data file (should exist but can't be found - may be it is universal constants of some kind, relating to statistics I suppose).
So where is windows 10 taking such files ?
Run as admin does n't work, fix compatibility does n't work. What about lowering security level ?
In newer installers I have created for other programs of mine files don't go to strange places and the programs work.
Do what OptionBase1 suggested earlier in the thread. That will give you the name of the file. Once you have the name, Use the Everything software to quickly search your harddrive for it:
https://www.voidtools.com/downloads/
-
Oct 2nd, 2024, 09:26 PM
#10
Re: vb6 - run time error 76
If you post a zip file of the exe file I will take a look for you. If you do, after I download it you'll want to delete the attachment.
-
Oct 2nd, 2024, 10:18 PM
#11
Lively Member
Re: vb6 - run time error 76
so, going against ZANN's reply here...
VM's can be a B****.. trust me when i say this cause i brought back an old program with the original creator of his original program - (with both versions for free).. it's not fun or easy - (at least for what we did). don't believe me, check out:
https://dsgamemaker.online/vmrelease.html
and on top of that you need to have the files on hand to use them OR an ".OVA" file.. so, honestly.. other than something similar to what we did, VM's are NOT worth considering when it comes to simple vb apps!
and if the the .ova file is too big for some to dl in 1 shot.. you'll have to create multiple split files as we did:
https://dsgamemaker.online/splitfiles.html
so, no... a VM is NOT the way to go when it comes to VB apps!
Last edited by BlakeSheldon; Oct 2nd, 2024 at 10:49 PM.
-
Oct 2nd, 2024, 11:32 PM
#12
Thread Starter
Addicted Member
Re: vb6 - run time error 76
Originally Posted by OptionBase1
If you post a zip file of the exe file I will take a look for you. If you do, after I download it you'll want to delete the attachment.
Well I can do that in pm.
Newer programs I have include a manifest file in their directory, but I suppose that is n't enough - there have to be one or two lines of code as well.
One trick I have n't tried is to let it install in program files 86 as it does and then manually create a directory with the same name in program files.
I also borrowed a win 7 machine. It's an old laptop. The owner was not using it for years that's why it stayed with windows 7. There it runs I 'm told, would inform me. But I can't get it to start.
Maybe he gave me the wrong power cable. Fits but won't start !
-
Oct 3rd, 2024, 09:12 AM
#13
Re: vb6 - run time error 76
What does this software do? Just rewrite it.
Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.
-
Oct 3rd, 2024, 09:28 AM
#14
Thread Starter
Addicted Member
Re: vb6 - run time error 76
Originally Posted by Elroy
What does this software do? Just rewrite it.
I plan to do that, but I must remember the contents ! It's been a long time.
Now I managed to get it going using one of the tricks mentioned before.
But ...
It appears that for some strange reason it asks for verification code and the unlock software has disappeared.
Fiddlesticks.
We are now in the stage of having to hack our own software !
-
Oct 3rd, 2024, 09:48 AM
#15
Re: vb6 - run time error 76
If you have the .exe and the file name/folder was hardcoded then why not just open the .exe in a hex editor (eg Neo) and look for the file/folder name?
All advice is offered in good faith only. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/
C++23 Compiler: Microsoft VS2022 (17.6.5)
-
Oct 3rd, 2024, 10:19 AM
#16
Thread Starter
Addicted Member
Re: vb6 - run time error 76
Originally Posted by 2kaud
If you have the .exe and the file name/folder was hardcoded then why not just open the .exe in a hex editor (eg Neo) and look for the file/folder name?
It's a possible way what you say.
What I did eventually was allow it to install in program files x 86 as it wanted.
Then in program files I simply created an empty folder with the same name.
When I do this the program runs.
Apparently it has hard coded paths, that's why windows 10 does n't like it.
All this in order to study it and proceed to rewrite it.
But we ran into another problem.
It has an anti-piracy lock and we don't have the unlocker.
Lost. We have 10 similar unlockers but not this one.
So we have this problem now.
It appears you can't help with this because we must crack this thing now and how do you know it's ours ? Just because we say so ?
-
Oct 3rd, 2024, 10:33 AM
#17
Re: vb6 - run time error 76
What I would do is copy every file that the installer puts into the "Program Files (x86)\YourApp" folder into the "Program Files\YourApp" folder and actually run the executable from that folder. That might be enough to get it to work.
-
Oct 3rd, 2024, 11:23 AM
#18
Thread Starter
Addicted Member
Re: vb6 - run time error 76
Originally Posted by OptionBase1
What I would do is copy every file that the installer puts into the "Program Files (x86)\YourApp" folder into the "Program Files\YourApp" folder and actually run the executable from that folder. That might be enough to get it to work.
It actually does that but how to unlock it now ?
I don't even know why I put anti-piracy lock but I did. It was meant for internal use by a periodical, not for sales.
It starts but the opening screen says give your code number, a password essentially.
-
Oct 3rd, 2024, 03:21 PM
#19
Re: vb6 - run time error 76
You aren't going to get any help here cracking licensing related code, even if you wrote it yourself. It violates the site's TOS.
-
Oct 3rd, 2024, 11:47 PM
#20
Thread Starter
Addicted Member
Re: vb6 - run time error 76
Originally Posted by OptionBase1
You aren't going to get any help here cracking licensing related code, even if you wrote it yourself. It violates the site's TOS.
I know.
-
Oct 5th, 2024, 03:45 AM
#21
Re: vb6 - run time error 76
Maybe one last thing to try is to open the exe with Notepad. Maybe something will be in text. It is a VERY long shot, but what the heck.
Please remember next time...elections matter!
-
Oct 5th, 2024, 04:15 AM
#22
Thread Starter
Addicted Member
Re: vb6 - run time error 76
Originally Posted by TysonLPrice
Maybe one last thing to try is to open the exe with Notepad. Maybe something will be in text. It is a VERY long shot, but what the heck.
Ha'.
I can't prove it's mine.
Even the email mentioned in the product key screen is dead - that email site is gone !
Well, my name should be in the "about" screen but has to open for that to become visible.
The notepad shows hieroglyphics.
It can be done with a decompiler I believe but I don't have one.
If that recreates the source code then I can understand how the keys are made and it will be simple to make a key-opener.
-
Oct 5th, 2024, 05:16 AM
#23
Re: vb6 - run time error 76
If you don’t have a “key”, how did you manage to get it work on XP?
-
Oct 5th, 2024, 05:33 AM
#24
Thread Starter
Addicted Member
Re: vb6 - run time error 76
Originally Posted by Arnoutdv
If you don’t have a “key”, how did you manage to get it work on XP?
Twenty years ago I had !
The reason there is a key is -I suspect- my friend with the magazine was in talks with some other magazine and he wanted to show them stuff but not allow them to copy.
Now for one reason or another things get lost.
-
Oct 5th, 2024, 08:31 AM
#25
Thread Starter
Addicted Member
Re: vb6 - run time error 76
We were saved.
The other fellow found an edition without anti-piracy lock.
So it runs with the trick create a dummy folder in program files.
But I 'd like to have the decompiler. Does that return me the source code verbatim ?
-
Oct 5th, 2024, 10:20 AM
#26
Re: vb6 - run time error 76
Originally Posted by johnywalker
We were saved.
But I 'd like to have the decompiler. Does that return me the source code verbatim ?
Absolutely not.
-
Oct 5th, 2024, 11:13 AM
#27
Thread Starter
Addicted Member
Re: vb6 - run time error 76
Originally Posted by OptionBase1
Absolutely not.
What does it do ?
-
Oct 5th, 2024, 06:13 PM
#28
Re: vb6 - run time error 76
Originally Posted by johnywalker
What does it do ?
What does what do? You say "the decompiler" like there's some well known VB6 decompiler that we all use. There's not. I've seen a couple of "very partial" decompilers, but nothing that's ever seemed like it was worth spending much time with.
To do it correctly, you'd have to de-link (re-creating all the OBJ files), and then de-compile each of those OBJ files. To be done correctly, particularly from machine language, it would take a tremendous amount of work. And, AFAIK, it's never even been done even close. And even then, you'd still lose most of your variable names and ALL of your comments. So, it's unclear how much a complete de-compile would actually be worth.
Again, just rewrite it.
Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.
-
Oct 5th, 2024, 07:48 PM
#29
Re: vb6 - run time error 76
Originally Posted by johnywalker
What does it do ?
Whatever "it" is, it probably just spits out a casserole of nonsense.
-
Oct 6th, 2024, 03:40 AM
#30
Thread Starter
Addicted Member
Re: vb6 - run time error 76
Originally Posted by Elroy
What does what do? You say "the decompiler" like there's some well known VB6 decompiler that we all use. There's not. I've seen a couple of "very partial" decompilers, but nothing that's ever seemed like it was worth spending much time with.
To do it correctly, you'd have to de-link (re-creating all the OBJ files), and then de-compile each of those OBJ files. To be done correctly, particularly from machine language, it would take a tremendous amount of work. And, AFAIK, it's never even been done even close. And even then, you'd still lose most of your variable names and ALL of your comments. So, it's unclear how much a complete de-compile would actually be worth.
Again, just rewrite it.
There is this one:
https://www.vb-decompiler.org/
Only the downloadable demo edition does not allow you to do much.
-
Oct 6th, 2024, 09:30 AM
#31
Re: vb6 - run time error 76
Originally Posted by johnywalker
I've looked at that one in the past, but admittedly it's been a while. However, if they supposedly have that level of expertise but can't write a better demo with some kind of maybe 4 hour trial and/or maybe a no-save feature, then I wouldn't trust them.
Again, if we're just talking about a program with 3 or 4 UI forms and some kind of "crunching/storage/reporting" features, I'd just rewrite it. I've never lost source code like this, but I have rewritten things several times (typically without looking at the original source code). The second time I do it, it's typically much better because I've learned from all the mistakes I made the first time.
Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.
-
Oct 6th, 2024, 11:48 AM
#32
Thread Starter
Addicted Member
Re: vb6 - run time error 76
Originally Posted by Elroy
I've looked at that one in the past, but admittedly it's been a while. However, if they supposedly have that level of expertise but can't write a better demo with some kind of maybe 4 hour trial and/or maybe a no-save feature, then I wouldn't trust them.
Again, if we're just talking about a program with 3 or 4 UI forms and some kind of "crunching/storage/reporting" features, I'd just rewrite it. I've never lost source code like this, but I have rewritten things several times (typically without looking at the original source code). The second time I do it, it's typically much better because I've learned from all the mistakes I made the first time.
Yes ok, rewrite was on the cards from the beginning.
Now I can make it run so I can see what's in it.
But we seem to have ran into another problem.
Let me recap.
First I use the installer.
Installs in program files x86.
Try to run it, says "error 76" - that had to do with use of "program files" by the xp edition.
Use the trick of opennig an empty folder with the same name.
Now runs, no error 76.
But asks for product key and we have n't got those.
Next other fellow manages to find an edition without product key.
Looks like 15-20 years ago he was talking with some other people to make business and so a protected edition was made so they could see our work but not copy.
These negotiations did not lead anywhere so I forgot all about it.
But anyway two days ago he managed to find an edition without product key, makes mediafire link, sends it to me.
So I make it run.
But he can't !
He gets error 76 again.
Sends everything to his son he says, the same, error 76 !
But I have four machines here. Works in two of them, the other two are away for repair.
What could be the problem ?
I did something somewhat irregular.
The final exe file I 'm using, without protection, is an exe and I just copy-pasted it. It is not an installer.
Any explanations ?
Really when it starts there is no read-write from disk in the unprotected edition.
Only the protected edition does that and I 'm circumventing it with the trick.
It's baffling.
-
Oct 6th, 2024, 01:57 PM
#33
Re: vb6 - run time error 76
I mean, this is software you wrote, right? If you can't remember how it works or whatever, how do you possibly expect anyone here to have any idea what you did when you wrote it?
I gave you instructions on how to use Process Monitor to track down *exactly* what files/folders the program is attempting to access when those errors take place. If you are truly motivated to maybe get this working without a rewrite you will take the time to do that. If not, then you'll probably keep spinning your wheels.
Good luck.
-
Oct 6th, 2024, 02:30 PM
#34
Thread Starter
Addicted Member
Re: vb6 - run time error 76
Originally Posted by OptionBase1
I mean, this is software you wrote, right? If you can't remember how it works or whatever, how do you possibly expect anyone here to have any idea what you did when you wrote it?
I gave you instructions on how to use Process Monitor to track down *exactly* what files/folders the program is attempting to access when those errors take place. If you are truly motivated to maybe get this working without a rewrite you will take the time to do that. If not, then you'll probably keep spinning your wheels.
Good luck.
No.
I got it going.
I can see what's in it. I can rewrite it, will take 3-4 weeks but I can.
It's the other fellow who has a problem and cannot do his work.
Let me recap again.
We try to install - asks for product key - we don't have one.
He says "maybe I can find one installation without product key".
He did find he mails it but it's an exe, not an installer.
I dared copy-paste it and tried and it works.
I return to him and say this: Install using the installer - delete the exe because it asks for key - replace with this other exe of yours and we are ok.
But he can't get it going !
Returns error 76.
This error 76 corresponds to the edition with product key when "program files" is not circumvented.
In mine the edition with product key circumvents the error 76, after my trick in program files, but asks for key etc.
In mine again the edition without product key is fine works, in two laptops as well.
But the other fellow keeps getting error 76 and he cries.
-
Oct 6th, 2024, 02:44 PM
#35
Re: vb6 - run time error 76
Originally Posted by johnywalker
But the other fellow keeps getting error 76 and he cries.
Right. And error 76 is "Path Not Found". And the steps from my post from days ago would tell you/him/whoever what that path is. And so my post from earlier today stands.
-
Oct 6th, 2024, 02:57 PM
#36
Thread Starter
Addicted Member
Re: vb6 - run time error 76
Originally Posted by OptionBase1
Right. And error 76 is "Path Not Found". And the steps from my post from days ago would tell you/him/whoever what that path is. And so my post from earlier today stands.
Well ok.
I sort of escaped from "path not found" only to run into another problem.
Let's stick to that, forget the exe without product key.
I can escape and proceed so far as the product key request (and don't have one and so on).
Why can't he ?
Must he tamper with the pemissions maybe ?
Now let's go to the exe without product key.
You think there is some path situation other than product key causing error 76 that needs to be located ?
Not impossible.
But with this no product key exe I even deleted the false folder from program files and still works in my machines !
-
Oct 6th, 2024, 03:01 PM
#37
Re: vb6 - run time error 76
Originally Posted by johnywalker
Well ok.
I sort of escaped from "path not found" only to run into another problem.
Let's stick to that, forget the exe without product key.
I can escape and proceed so far as the product key request (and don't have one and so on).
Why can't he ?
Must he tamper with the pemissions maybe ?
Now let's go to the exe without product key.
You think there is some path situation other than product key causing error 76 that needs to be located ?
Not impossible.
But with this no product key exe I even deleted the false folder from program files and still works in my machines !
Path not found means Path not found. Whether or not it has anything to do with licensing or a product key, I have no way of knowing that.
Honestly, the more you say about this, the less you seem to know about how it works, and the more it sounds like this isn't anything you wrote and that you're just trying to hack some commercial software.
-
Oct 6th, 2024, 05:53 PM
#38
Thread Starter
Addicted Member
Re: vb6 - run time error 76
Originally Posted by OptionBase1
Path not found means Path not found. Whether or not it has anything to do with licensing or a product key, I have no way of knowing that.
Honestly, the more you say about this, the less you seem to know about how it works, and the more it sounds like this isn't anything you wrote and that you're just trying to hack some commercial software.
No it's you who don't know compatibility issues, apparently.
You could say "I don't know compatibility issues" instead of unfounded accusations.
I don't see the foundations of your accusation.
Even if it was commercial software we are talking about and was hacked, the issue is clearly one of compatibility and not how to hack.
So you are saying unfounded things now.
-
Oct 6th, 2024, 06:41 PM
#39
Re: vb6 - run time error 76
Maybe your program is hardcoded to look in C:\Program Files\AppFolder, and your buddy who can't run it has Windows installed on some drive letter other than C, who knows.
Have whoever is running in to issues with it run the Process Monitor related steps I outlined many posts earlier, and it will tell you what path it is looking for that isn't being found.
Whether or not that information provides a pathway to a viable workaround, who knows. Certainly not any of us here, since we didn't write the software.
Last edited by OptionBase1; Oct 6th, 2024 at 06:50 PM.
-
Oct 7th, 2024, 03:28 AM
#40
Thread Starter
Addicted Member
Re: vb6 - run time error 76
Originally Posted by OptionBase1
Maybe your program is hardcoded to look in C:\Program Files\AppFolder, and your buddy who can't run it has Windows installed on some drive letter other than C, who knows.
Have whoever is running in to issues with it run the Process Monitor related steps I outlined many posts earlier, and it will tell you what path it is looking for that isn't being found.
Whether or not that information provides a pathway to a viable workaround, who knows. Certainly not any of us here, since we didn't write the software.
That looks sensible.
But why does it work in mine and why in particular does it work even when I remove the dummy folder from program files ?
Now I don't know what happens when ones tries specific functions further down the road, the handling imported data files.
But the path not found situation in the beginning was skipped.
Could it be that during the trials something went to "Users" and activates from there and we think it's his installation that runs but it's not ?
In my "Users" there is nothing related.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|