Errors when deploying application
Hi,
Ok heres the problem. I've developed an application in VB6.0 on Windows XP SP2. I've done all the testing and is working fine on my PC. I've compiled the s/w and tested that on 2 PC (One XP and one Vista) on which VB and visual studio is not present.
When the software opens in Vista i get the following error:
Run time error '372'
Failed to load control 'CommonDialog' from wiaaut.dll. Your version of wiaaut.dll may be outdated. Make sure you are using the version of the control that was provided with your application.
What version of wiaaut.dll will run on both XP & vista? On XP i'm not getting this error.
Another error. While using some features in the application i get runtime error 6 overflow and for others run time error 13.
What i don't understand, is that how can it work perfectly on the development machine and not on the users machine. If the error was coming from my codes i would have debugged that. But it works fine on my PC. :confused:
Any idea? :(
Regards,
Krishley
Re: Errors when deploying application
I would start by not deploying the commondialog control, just use api calls
http://www.planet-source-code.com/vb...d=699&lngWId=1
There are a lot of loops to jump thru running apps on Vista_Win 7. I would start by setting up a stand user account on xp(Non-Admin) and testing.
I would also move this thread to the deployment forum
Re: Errors when deploying application
As far as i know... the CommonDialog is not in the wiaaut.dll but in the comdlg32.ocx
Also yes, its best to use APIs.
Also do you have the Admin rights / Manifest file in Vista etc...?
Re: Errors when deploying application
Yes i have admin rights.
The commondialog that its refering here is not that found in comdlg32.ocx. Here it is that used by the Windows Image Acquisition library (WIA). In XP it works ok but i think Vista uses another version. I came across Windows Portable Devices but can't find any link to download the dll. Looks like it supports WIA in windows vista.
Regards,
Krishley
Re: Errors when deploying application
I do not have wiaaut.dll on my xp pc,
but on win 7 its version 6.1.7600.16385 532 kb
Vista version 6.0.6001.18000 535 kb
Did you install by rightclicking and run as admin
Have you Right-clicked to open the app as admin ?
My installer has a manifest to require Admin
My exe has a manifest to run as invoker so as to not be prompted for admin.
Hope this helps
Re: Errors when deploying application
I think WIA is not shipped with XP. Only with Vista and Win 7. The WIA version that i distribute with my application is version 5.1.2600.1106 (Downloaded on MS website). So i think this is what is causing the problem. I can't find the version you mentionned on microsoft website.
Are these found in the system32 folder in vista and win7?
I use InnoSetup so i just double click on it and it starts installation.
Re: Errors when deploying application
Quote:
Originally Posted by
Krishley
I think WIA is not shipped with XP. Only with Vista and Win 7. The WIA version that i distribute with my application is version 5.1.2600.1106 (Downloaded on MS website). So i think this is what is causing the problem. I can't find the version you mentionned on microsoft website.
Are these found in the system32 folder in vista and win7?
I use InnoSetup so i just double click on it and it starts installation.
Both are in the system32 folder Vista and win 7
Re: Errors when deploying application
I think while installing that on vista, i've overwritten the already existing wiaaut.dll.
isnoend07, please check ur PM.
Regards,
Krishley
Re: Errors when deploying application
Quote:
Originally Posted by
Krishley
I think while installing that on vista, i've overwritten the already existing wiaaut.dll.
isnoend07, please check ur PM.
Regards,
Krishley
Not a good idea to overwrite dll's can cause other programs to fail. I set my installer to not overwrite if they exist. I will check the PM
Re: Errors when deploying application
Moved To Application Deployment
Re: Errors when deploying application
Yes WIA 2.0 version 6.x.x.x is already part of Vista and Windows 7. The downloadable redist version in the WIA SDK is meant to be installed into WinXP SP1 (or later) and Win2003 Server R2.
The WIA CommonDialog control is different from the VB6 CommonDialog control you might be used to. It is used for acquiring images from imaging devices (cameras, scanners, etc.) and other related operations.
You can't overwrite this library in Vista. Vista will aggressively protect such system files.
The 6.x and 5.x versions are binary compatible except that some functionality was removed in the 6.x versions related to video content. This was probably part of the effort to lock down DRM in Vista.
I just tested this again, using a few other things in WIA but not the CommonDialog. On Windows XP the Vista version of the DLL won't work. On Vista the XP version won't work.
Your setup process should detect that WIA is already on Vista though and not try to replace the DLL. How are you trying to install your application? If you don't follow the right process you might get the XP version written into a virtualized System32 location.
Re: Errors when deploying application
Hi dilettante,
Yes you're are right, the dll in sys32 on vista and win7 were not overwritten. But if they are still present there (which i've checked) why can't my application use them?
I don't know but maybe its because i've referenced V5.0 (Redist) to be used. If i put that dll in my application folder and reference it from there. Then my software won't use those in sys32 on vista but will use the 5.0 version in my application folder. Will this work on vista?
Thanks
Krishley
Re: Errors when deploying application
All I can verify right now is that a program compiled on Vista using a ref. to the 6.x library will run ok on XP with the 5.x library (without being recompiled).
I have found a number of cases (other Microsoft libraries) where this seems to be true: a program created under Vista works on XP or Windows 7, but an XP program won't work on Vista or Win7. The other case I have in mind is the DHTMLEdit control, which was dropped from Vista but a new redistributable one can be downloaded and used with XP through Win7 (and I believe Win2K too). I know why this is true: Microsoft was plugging a security hole.
What I can't figure out is why an XP program compiled against WIA 5.x won't work on Vista. It sure seems like it ought to. I don't have any XP machines with VB6 installed right now though.
Re: Errors when deploying application
Quote:
Originally Posted by
Krishley
I don't know but maybe its because i've referenced V5.0 (Redist) to be used. If i put that dll in my application folder and reference it from there. Then my software won't use those in sys32 on vista but will use the 5.0 version in my application folder. Will this work on vista?
The 6.x versions have changes, some features were deleted. The reasons make me think Microsoft probably dropped the APIs that WIA 5.x calls for these things too. So even if you could get around the fact that the registry is pointing to the 6.x library a 5.x library probably won't work on Vista.
Vista should have prevented you from actually registering the 5.x library, since those WIA class IDs are protected. But you might try looking in the registry on the Vista machine to see what happened.
What sort of installation process did you use on the Vista machine?
Is there a 5.x wiaaut.dll located in the VirtualStore?
C:\Users\<user profile name>\AppData\Local\VirtualStore\Windows\System32
Re: Errors when deploying application
Hi,
I use InnoSetup to install my application and basically, Inno just tries to copy WIAAUT.DLL (5.0) to sys32 folder. But as you said, since on vista this is a system file, the 6.0 version already present on Vista was not overwritten by the 5.0.
I will try to see if i can load the 6.0 version for vista on XP.
Thanks
Krishley
Re: Errors when deploying application
No, the 6.0 version will not run on Windows XP. I already verified that.
I don't use InnoSetup and frankly I don't trust it because it seems to a large extent to be little more than a script engine that will only do what you tell it to (whether right or wrong). So there is no telling what your setup script did on Vista without seeing it, and determining that would require somebody very intimate with using InnoSetup.
Other packagers can be just as dangerous, but generally have a "default path" of installation rules for things like COM DLLs and OCXs that is usually correct, making it less likely a novice will do something bad.
For all I know your problem here is Inno. It may be trying to copy the 5.x DLL into System32 and having go into the disk VirtualStore, or it might be running elevated and then Vista spoofs it into thinking it wrote the 5.x DLL into the actual System32 (but Vista doesn't let it). Beyond that InnoSetup may be creating a bogus component registration for this 5.x DLL that Vista is diverting to the registry VirtualStore.
This would mean when you try to run your program under the user who "installed" it, the program would see the virtualized registry entries pointing to a virtualized wiaaut.dll 5.x which will not run on Vista.
Installation can be as complex as programming itself. This is even more true when you're trying to install VB6 programs on newer versions of Windows, because Microsoft isn't keeping the VB6 tools up to date in a way that helps people install VB6 programs without knowing a lot about what is going on. Then when you add in factors like component libraries that are tailored to specific versions of Windows things get even more complicated.
Microsoft could have helped with all of this, but they chose not to. VB6 programs that have been written and packaged for installation naively are only "supported" in newer Windows versions in a limited "compatibility mode" fashion. Beyond that we are on our own and continue using VB6 at our own risk.
While I won't try to blame InnoSetup, you're really supposed to be using Visual Studio 6.0 Installer 1.1 for packaging VB6 programs. This was the last packaging tool Microsoft released to support VB6 programs. Normally Microsoft would supply a new library like WIA 2.0 for Windows XP in the form of an Installer Merge Module. This not only contains the DLL itself but also the rules for where and when to install it (i.e. only on XP and 2003 Server). Sadly, you can't seem to get VSI 1.1 anymore from Microsoft.
But in this case WIA 2.0 was never made available in merge module form anyway. Instead you needed to know the "rules of the road" and implement the necessary conditional logic in your setup packages. This is true whether you use VSI 1.1, InstallShield, InnoSetup, or anything else.
My guess then is that your setup package has "trashed" that Vista machine, at least for that user when trying to use wiaaut.dll in a program. Fixing this will probably require cleaning up the registry VirtualStore location for the WIA class IDs.
You can try tracking this down and doing it manually via regedit. However one more thing you might try first is:
- Log on as the same user(s) who ran your setup on the Vista machine. This would need to be done for each such user.
- Copy wiaaut.dll 5.x from the XP package into some folder, even the desktop is fine - maybe easiest.
- Open a command prompt, unelevated.
- Enter: CD desktop
- Enter: regsvr32 /u wiaaut.dll
- Exit the command prompt.
- Delete wiaaut.dll from the Desktop.
After following the steps above it is possible your already-installed program will run on Vista using the system copy (6.x).
Beyond this you'll probably need to change your InnoSetup script so that it only tries to install wiaaut.dll if the OS version is 5.1 to 5.2, but I have no idea how you do this. Somebody else may though.
You can also test the process above first, by creating a new setup package that doesn't try to install WIA at all. Then run that setup on Vista.
Re: Errors when deploying application
Quote:
Originally Posted by
dilettante
You can also test the process above first, by creating a new setup package that doesn't try to install WIA at all. Then run that setup on Vista.
I sent an executable with wiaaut.dll v5.0 referenced in it to isnoend07 who tried that for me on his Win 7 PC and still the same error is displayed telling that the wiaaut.dll is outdated.
How can i get my software to use the 6.0 version present on Vista and Win 7?:confused:
I've been trying different things for 2 weeks now but in vain.
Krishley
Re: Errors when deploying application
Quote:
Originally Posted by
Krishley
I sent an executable with wiaaut.dll v5.0 referenced in it to isnoend07 who tried that for me on his Win 7 PC and still the same error is displayed telling that the wiaaut.dll is outdated.
How can i get my software to use the 6.0 version present on Vista and Win 7?:confused:
I've been trying different things for 2 weeks now but in vain.
Krishley
I just replied to your email and it was returned by yahoo:
MailEnable: Message could not be delivered to some recipients.
The following recipient(s) could not be reached:
The last file you sent did not have a exe and when testing you have not sent me a install-setup program.
Did you get the wrapper for the common dialog /
Re: Errors when deploying application
Quote:
Originally Posted by
Krishley
I sent an executable with wiaaut.dll v5.0 referenced in it to isnoend07 who tried that for me on his Win 7 PC and still the same error is displayed telling that the wiaaut.dll is outdated.
How can i get my software to use the 6.0 version present on Vista and Win 7?:confused:
I've been trying different things for 2 weeks now but in vain.
Krishley
Another link may interest you: http://blogs.msdn.com/coding4fun/arc...31/912546.aspx
Re: Errors when deploying application
I got your mail. The setup program will just copy the exe to your desktop and will not register or install wiaaut.dll since its already on win 7. Thats why i only sent the exe. But i think now only API will solve this problem.
Krishley
Re: Errors when deploying application
Re: Errors when deploying application
Ok i've written a code without using the commondialog and its working fine on XP. Will send that to you immediately by mail. Check it and let me know. Thanks
Re: Errors when deploying application
Quote:
Originally Posted by
Krishley
Will try that. Thanks
Been reading around the web and have seen a few indications of problems the dll, but not a definite fix, example:
FIX: FileIOException on startup due to bad registration of wiaaut.dll is properly handled. Gotta sleep try your code tommorrow on win 7