Working on an old VB6 application, asked to create an installer. Read around, thought I understood, but I guess not.
After getting the application from VSS, I'm able to run it on my development box just fine. Fire up the VS6.0 Package and Deployment Wizard, point it to my .vbp file, and hit the Package button.
Runs through the options windows just fine. When I click 'Finish', I immediately get a message that "Unexpected error 457 has occurred: This key is already associated with an element of this collection."
What key with what collection in what database? registry key? Some xml file?
After clicking OK, the wizard claims to be writing a 'setup.lst' file, but after 10 minutes, I figure it's not working and kill it.
Didn't find any help googling around, thought maybe a VB-specific forum might have some knowledge.
New to installers, so I easily could have taken a wrong turn earlier in the process. I just took the defaults all the way through, though.
Sounds as if you may have tried to include a dependency or other file more than once?
Collection keys are case-insensitive. The PDW probably uses the simple file name as a key so even if in different paths these names would need to be unique.
Last edited by dilettante; Mar 24th, 2009 at 10:22 AM.
dilettante gave me an idea. I started through the wizard, and when I got to the Included files, I removed everything I was allowed to. I figured maybe I'd get something built, then could start adding back in the items one at a time until it broke.
Hah!
The only things I'm left with are SETUP.EXE, SETUP1.EXE, ST6UNST.EXE, and VB6STKIT.DLL. After getting through the wizard, as soon as I hit 'Finish', same error 457.
So that was worth a try, but didn't pan out.
Maybe I'm approaching the problem incorrectly. We've got this VB6 thing that a couple of people are using. One of them reports she "cannot save reports to pdf", but so far hasn't responded to requests for details (i.e., does she not have the ability to, or does but it fails, or what).
Anyway, that was the idea of the installer--since the other person can save reports, we figured there's a difference in the two PCs, let's create an installer to ensure they're the same.
Maybe there's a different approach I should be taking (?).
I don't know of any save to PDF functionality in VB6. Must be using some 3rd party component or "print to PDF" printer driver?
That PDW behavior sounds very strange. I'd be thinking "reformat, reinstall everything" but I know that's no help. This isn't a PDW problem I've ever seen reported though and I can't find an MS KB article covering it.
Sorry, the 'save to pdf' comes out of Crystal Reports.
My suspicion is that this user is running an old version of the application, so that's why we were trying to build an install. No worries, I'll figure something out by manually installing the app, or building the app to a shared area and giving her a shortcut there, or something.
I had the same kind of problems and it seemed that it was caused by the following:
I had added some files that were located in a special install folder, dedicated to the project I was generating a package for.
Some of those file were also registered on my Windows XP PC in a different location than the install folder.
It turned out that those files were exactly the files that were causing the problems.
I created a new script and selected he files in the location tthat hey were registered in (use regedit to find them) and no longer used those files in the install folder. Then the package creation worked fine.
Make sure that the registered files are of the same version as the version that you need in your project.
You can also unregsiter the files (if youd don't need them) and select the files in the install directory.
It looks like the Package and Deployment wizard first looks in the registry to find some file locations and if they don't match ith the locations you specified in some sections of your PDM file, you will get the error 457.
In addition to my reply above, I also found out that, when you use Visual Source Safe too, and the file locations of the files that you added to the VSS project do not match the paths that yous use in the PDM file for that Visual Basic projects install package, you can also get error 457 or error 76 (file not found).