Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 13-01-2009
Member
 
Join Date: Nov 2008
Posts: 45
VB6 ActiveX EXE on Vista

Hello , We are now planning to migrating our VB6 developed software to MS Vista RC1, but are receiving the error

"Unexpected error; quitting"

After doing a lot of searching around I discovered that this is being caused because the software is set up as a ActiveX EXE so i can perform external scripting. However after changing the software to a Standard EXE the above error message no longer appears.I know that right clicking a going "Run as administrator" sorts this issue out, but I was hoping Microsoft would have a better work around than this.I have played around with .exe.manifest files a bit, but have not had any luck avoiding the Unexpected error using this angle.If anyone has any suggestions that would be awesome, because Vista is due for release fairly soon and we need to be prepare our customers for this.

thanks
Reply With Quote
  #2  
Old 13-01-2009
Member
 
Join Date: Feb 2008
Posts: 1,848
Re: VB6 ActiveX EXE on Vista

actually , Visual basic 6 need the DCOM Server Process Launcher service to remain active (which it is by default) in order to load. Some setups normally disable this service for security reasons, and there are even other programs out there which will disable it (or allow you to disable it), such as DCOMBobulator . You can use DCOMbobulator to allow it to restart, or you can go to the Services control panel and restart it there.
Reply With Quote
  #3  
Old 13-01-2009
Member
 
Join Date: May 2008
Posts: 2,383
Re: VB6 ActiveX EXE on Vista

There are two known casues for this error:

Visual Basic cannot find one of the following two files needed to run:
  • MSO97RT.DLL
  • MRT7ENU.DLL

You are trying to run Visual Basic from a network "Administrator" setup.

For the first situation, the two files listed in the "Cause" section can be located on the Visual Basic installation CD in the \OS\System directory.

These two files need to be copied into one of the following directories in order to resolve the issue:

Quote:
C:\Program Files\Common Files\Microsoft Shared\VBA

-or-

C:\Program Files\Common Files\MsApps\VBA
For the second situation, install Visual Basic locally. The Visual Basic product is not designed to run in a shared mode, so network Administrtator setups are unsupported. Please see the "References" section for more information.
__________________
The FIFA Manager 2009 PC Game
Reply With Quote
  #4  
Old 13-01-2009
Member
 
Join Date: May 2008
Posts: 115
Re: VB6 ActiveX EXE on Vista

I would advise you to check to see if the history.dbf file is in that place.If not, then try running the setup as admin, again by right clicking on it and select run as admin (or via the properties dialogue for the application --> right click and select properties, then Advanced, then check run as admin).
Reply With Quote
  #5  
Old 13-01-2009
Member
 
Join Date: Nov 2005
Posts: 1,323
Re: VB6 ActiveX EXE on Vista

you can Try to repair your Visual basic 6 installation using a Visual basic 6 CD or re - install it after uninstalling then restart I'm not sure what is the problem, you may be able to get rid of it.
Reply With Quote
  #6  
Old 13-01-2009
Member
 
Join Date: May 2008
Posts: 2,293
Re: VB6 ActiveX EXE on Vista

If you are able run as in windows as administrator and your are not facing any difficulty in application . Then elevating to administrator is the only option unless you can redesign the application to run as a standard user. To give you an idea of what your application is trying to access as administrator, use standard user analyzer in your testing. To have your application elevate to administrator a manifest is recommended. Embedded manifests are the best. You can embed a manifest with the MT.exe tool from the platform SDK. External manifests sometimes take a while to be picked up by the vista indexing service. One way to “speed up” the detection of the external manifest is to copy the manifest and exe to a different folder. You will no the manifest to elevate is working if a shield appears on the icon of your application. The simplest manifest schema to use with your application to elevate is: MyAppName.exe.manifest

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges>
<requestedExecutionLevel
level="requireAdministrator"/>
</requestedPrivileges>
</security>
</trustInfo>
</assembly>

UAC will block the installation of ActiveX controls on For Standard Users, I assume this is what you mean by "a ActiveX EXE so we can perform external scripting"
Reply With Quote
  #7  
Old 13-01-2009
Member
 
Join Date: Nov 2008
Posts: 45
Re: VB6 ActiveX EXE on Vista

Thanks you very much for your suggestions guys, finally i have found the sloution If you are using an ActiveX EXE and having an "Unexpected error; quitting" message on Vista this solution is for you!

On the first execution of ActiveX EXE's, it will update the registry with any public classes you have exposed. However under Vista if your software is not running in administrator mode you will receive the error I mentioned above.

So what do you do? What we ended up doing was registering the ActiveX EXE's classes on install. We're using Inno Setup over here and the solution was to update the deployment script to run

Application.exe /regserver

The /regserver switch is apparently in-built into all ActiveX EXE's and will register all its classes without running your application. You can also run

Application.exe /unregserver

to remove these classes.

I searched the internet long and hard for a solution but could find nothing I suspect since Vista hasn't been officially released yet! Anyway I'm posting my finding in the hope that others will find it as useful as I have.
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "VB6 ActiveX EXE on Vista"
Thread Thread Starter Forum Replies Last Post
Vista and Quicktime 7.4 ActiveX control error 46 Actionguy Windows Software 76 27-12-2012 03:49 PM
What is difference between ActiveX DLL and ActiveX EXE Pratap Gad Software Development 3 08-04-2009 07:36 PM
What is ActiveX and Types of ActiveX Components in VB? REEMAD Software Development 4 27-02-2009 08:19 PM
How bad is ActiveX? Joachim Software Development 5 07-11-2008 07:10 PM


All times are GMT +5.5. The time now is 09:52 AM.