Q108167: Unhandled Exception 0x80040707
Problem

This error might occur if there is a missing or invalid path in the registry. These registry entries need to be fixed in order for the installation to complete successfully.


Fix

Warning: These instructions involve modifying the Windows registry. Modifications to the Windows registry, if not done correctly, can cause serious problems to a Windows system. Consider backing up any registry keys you modify to a .reg file. For more information on backing up registry keys, see How Do I Back Up Registry Keys on My Computer?

The following steps attempt to correct the special paths stored in the registry. This was determined by trial and error and is not documented by Microsoft and involves updating the Windows registry. Follow these steps:

For Windows 95, 98, 98 SE, and ME Users

  1. Click Start > Run.
  2. Type Regedit.exe. Click OK.
  3. In the left panel, locate the key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Current Version\Explorer\Shell Folders.

    Check to see if this key contains (at least) the following values in the Name and Data columns.

    Name Data
    Windows 98, 98 SE & ME Windows 95
    Common Desktop C:\WINDOWS\All Users\Desktop C:\WINDOWS\Desktop
    Common Programs C:\WINDOWS\All Users\Start Menu\Programs C:\WINDOWS\Start Menu\Programs
    Common Startup C:\WINDOWS\All Users\Start Menu\Programs\Startup C:\WINDOWS\Start Menu\Programs\Startup
    Common Start Menu C:\WINDOWS\All Users\Start Menu C:\WINDOWS\Start Menu

    If any of these values are missing or point to an invalid path, the installation will fail to properly install. For example, if the Common Desktop pointed to C:\WINDOWS\All Users\My Documents instead of C:\WINDOWS\All Users\Desktop, the installation may fail.

    If a key is pointing to an invalid path, follow these steps to correct it:

    1. Right-click the registry key whose path is invalid and select Modify.
    2. In the Edit String dialog, type a valid path in the Value data field. For example, using the Common Desktop example above a valid path would be:

    3. Restart your computer.

    If a key is missing, follow these steps to create it:

    1. Right-click in an empty area of the right pane and select New > String Value.

    2. Type the name of the missing key, for example, Common Programs.
    3. Right-click the registry key you just created and select Modify.
    4. In the Edit String dialog, type a valid path in the Value data field.

    5. Restart your computer.

For Windows NT, 2000, and XP Users

  1. Click Start > Run.
  2. Type Regedt32.exe. Click OK.
  3. Locate the key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Current Version\Explorer\User Shell Folders.
    Check to see if this key contains (at least) the following values in the Name and Data columns.
    Name
    Data
    Windows XP & 2000
    Windows NT
    Common Desktop
    %ALLUSERSPROFILE%\Desktop
    %SystemRoot%\Profiles\All Users\Desktop
    Common Programs
    %ALLUSERSPROFILE%\Start Menu\Programs
    %SystemRoot%\Profiles\All Users\Start Menu\Programs
    Common Startup
    %ALLUSERSPROFILE%\Start Menu\Programs\Startup
    %SystemRoot%\Profiles\All Users\Start Menu\Programs\Startup
    Common Start Menu
    %ALLUSERSPROFILE%\Start Menu
    %SystemRoot%\Profiles\All Users\Start Menu
    If any of these keys are point to an invalid path, the installation will fail to properly install.  For example, if the Common Desktop pointed to %ALLUSERSPROFILE%\Start Menu\Programs instead of %ALLUSERSPROFILE%\Desktop, the installation may fail. Follow the instructions in If a key is pointing to an invalid path section above to create a valid path.
    If a key is missing, follow these steps to create it:
    1. Right-click in an empty area of the right pane and select New > Expandable String Value.
    2. Type the name of the missing key, for example, Common Programs.
    3. Right-click the registry key you just created and select Modify.
    4. In the Edit String dialog, type a valid path in the Value data field (see the figure of the Edit String dialog above.)
    5. Restart your computer.

Does Your Issue Still Exist?

This error might occur if the installation calls a function from within a DLL. If this is the case, changes must be made to the installation. Unfortunately, there is not much you can do at this point to complete the installation successfully; your software vendor needs to correct the problem. If after following these instructions your product failed to install, you'll need to contact your vendor. See the Who to Contact page for more information.


Glossary Terms and Related Topics
Q108362: regedt32.exe, regedit.exe
Q108358: Windows API
Q108161: What Is a DLL?
Q108211: What Is the Registry?
Q108237: Backing Up Registry Keys on Computer

Last Modified Date: 10-02-2007ID: Q108167