Results 1 to 7 of 7

Thread: VB6 ActiveX EXE on Vista

  1. #1
    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

  2. #2
    Join Date
    Feb 2008
    Posts
    1,852

    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.

  3. #3
    Join Date
    May 2008
    Posts
    2,389

    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:

    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.

  4. #4
    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).

  5. #5
    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.

  6. #6
    Join Date
    May 2008
    Posts
    2,297

    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"

  7. #7
    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.

Similar Threads

  1. Vista and Quicktime 7.4 ActiveX control error 46
    By Actionguy in forum Windows Software
    Replies: 76
    Last Post: 27-12-2012, 03:49 PM
  2. What is difference between ActiveX DLL and ActiveX EXE
    By Pratap Gad in forum Software Development
    Replies: 3
    Last Post: 08-04-2009, 07:36 PM
  3. What is ActiveX and Types of ActiveX Components in VB?
    By REEMAD in forum Software Development
    Replies: 4
    Last Post: 27-02-2009, 08:19 PM
  4. How bad is ActiveX?
    By Joachim in forum Software Development
    Replies: 5
    Last Post: 07-11-2008, 07:10 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,565,800.71361 seconds with 17 queries