Microsoft KB Archive/266769

= ACC2000: Error Starting Microsoft Access with Custom Profile =

Article ID: 266769

Article Last Modified on 1/26/2005

-

APPLIES TO


 * Microsoft Access 2000 Standard Edition

-



This article was previously published under Q266769



Advanced: Requires expert coding, interoperability, and multiuser skills.

This article applies only to a Microsoft Access database (.mdb).

Important This article contains information about modifying the registry. Before you modify the registry, make sure to back it up and make sure that you understand how to restore the registry if a problem occurs. For information about how to back up, restore, and edit the registry, click the following article number to view the article in the Microsoft Knowledge Base:

256986 Description of the Microsoft Windows Registry



SYMPTOMS
When you start Microsoft Access 2000 or a run-time application with a custom profile, you receive the following error message:

An error occurred and this feature is no longer functioning properly. Would you like to repair this feature now?

After you click Yes or No, you receive the following error message:

Microsoft Access couldn't find file 'system.mdw'. This file is required for startup.



CAUSE
Microsoft Access is unable to locate a workgroup file (System.mdw) during startup. This occurs when all of the following conditions are true:
 * 1) The workgroup file is not located in the same folder as Msaccess.exe.
 * 2) The shortcut that you are using to start Microsoft Access does not contain a /Wrkgrp switch that points to a valid workgroup file.
 * 3) The custom profile that you are using does not contain a Jet subkey that points to a valid workgroup file.



RESOLUTION
Either use the /Wrkgrp switch in the shortcut to point to a workgroup file or include a Jet subkey in the custom profile that points to a workgroup file.

Note You must also make sure that the Everyone and the TERMINAL SERVER USER groups have full permission on the  registry key. To do so, follow these steps:

WARNING: If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk.  On the Start menu, click Run. In the Run box, type Regedt32, and then click OK. In Registry Editor, locate the following registry key:

 On the Security menu, click Permissions. In the Permissions for 9.0 dialog box, under Security, locate the Everyone and the TERMINAL SERVER USER groups and verify that both of them have full control.

Note If the Everyone and the TERMINAL SERVER USER groups do not exist, add both the groups, and then provide them full control. Click OK, and then exit the Registry Editor.</li></ol>

Use the /Wrkgrp Switch to Specify a Workgroup File
The easiest approach to resolve the problem is to include a /Wrkgrp switch in the shortcut that points to a valid workgroup file. For example, create a shortcut on the desktop with the following command-line.

NOTE: The paths to Msaccess.exe and the System.mdw file may be different on your computer. Make sure the paths in your shortcut accurately reflect the location of Msaccess.exe and System.mdw on your computer. <pre class="fixed_text">  &quot;C:\Program Files\Microsoft Office\Office\MSACCESS.EXE&quot; /Wrkgrp  &quot;C:\MyApplication\System.mdw&quot; /Profile Test For additional information about using command-line switches with Microsoft Access, click the article number below to view the article in the Microsoft Knowledge Base:

209207 ACC2000: How to Use Command-Line Switches in Microsoft Access

For additional information about writing macros and switches for shortcuts in the Package and Deploy Wizard, click the article number below to view the article in the Microsoft Knowledge Base:

236519 MOD2000: How to Write Macros and Switches for Shortcuts in the Package and Deployment Wizard

Include a Jet Subkey in Your Custom Profile
WARNING: If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk.

To create a Jet subkey in your custom profile to specify the path to the workgroup file, follow these steps: <ol> Create a custom profile and a shortcut by following the steps in the &quot;Creating a Custom Profile to Use with Microsoft Access&quot; section later in this article.</li>  In Registry Editor, locate the following key: <pre class="fixed_text">  HKEY_LOCAL_MACHINE\Software\Test\MyApp\1.0 </li>  Create the following subkeys <pre class="fixed_text">  Jet\4.0\Engines to create the following key: <pre class="fixed_text">  HKEY_LOCAL_MACHINE\Software\Test\MyApp\1.0\Jet\4.0\Engines </li>  Under the subkey Engines, create the following string value: <pre class="fixed_text">  SystemDB </li> Set the value of the SystemDB string value to the path of your workgroup file, for example, C:\Workgroup\System.mdw </li></ol>

NOTE: If your application requires any other Jet-specific modifications, such as loading the installable ISAMs, you must create the appropriate subkeys or values (or both) under the Jet key of your custom profile.

<div class="status_section">

STATUS
This behavior is by design.

<div class="moreinformation_section">

MORE INFORMATION
When you open a database (.mdb) file in Microsoft Access, the Jet database engine requires a workgroup file (System.mdw) in order to start. To determine the path to the workgroup file to use, Microsoft Access goes through several steps.

If the shortcut contains a /Wrkgrp switch that points to a valid workgroup file, Microsoft Access uses that workgroup file. If the shortcut does not contain a /Wrkgrp switch, Microsoft Access searches the Windows registry and uses the location specified in the Jet subkey of the profile in use.

When you use a custom profile to start your application, Microsoft Access does not use the default Access profile found at HKEY_LOCAL_MACHINE\Software\Microsoft\Office\9.0\Access when it starts. Instead, it uses the subkeys of the custom profile that you created. If the profile does not contain a Jet subkey with the path to the workgroup file, Microsoft Access searches the folder where Msaccess.exe is located (for example, C:\Program Files\Microsoft Office\Office). If Microsoft Access still cannot locate a workgroup file, it returns the errors that are mentioned in the &quot;Symptoms&quot; section of this article.

This issue is more likely to occur on computers where Microsoft Access 2000 SR-1 was installed from CD, instead of on computers that were upgraded to SR-1. This is because the default location for the workgroup file (System.mdw) changed in SR-1 and is not in one of the paths mentioned earlier. Therefore, if you use a custom profile to start Microsoft Access 2000 SR-1 on a computer and do not include the /Wrkgrp switch, you will receive the errors that are mentioned in the &quot;Symptoms&quot; section of this article.

Creating a Custom Profile to Use with Microsoft Access
The following steps demonstrate how to create a custom profile to use with Microsoft Access. This example uses the TitleBar string value in the custom profile to customize the titlebar of the application window when Microsoft Access starts. <ol> Click Start, and then click Run.</li> In the Run box, type Regedit, and then click OK.</li>  In Registry Editor, expand the following key: <pre class="fixed_text">  HKEY_LOCAL_MACHINE\Software\Microsoft\Office\9.0\Access\Profiles NOTE: If the Profiles key is not listed under the Access key, you must create it. To create the Profiles key, right-click the Access key, point to New, and then click Key. Rename the new key to Profiles. </li> After you click the Profiles key in the left pane, right-click in the right pane, point to New, and then click String Value.</li> Under the Profiles key, create a new string value named Test .</li> Set the value of the Test string value to Software\Test\MyApp\1.0 .</li>  Locate the following registry key: <pre class="fixed_text">  HKEY_LOCAL_MACHINE\Software </li>  Create the following subkeys <pre class="fixed_text">  Test\MyApp\1.0\Run-Time Options to create the following key: <pre class="fixed_text">  HKEY_LOCAL_MACHINE\Software\Test\MyApp\1.0\Run-Time Options </li>  Under the subkey Run-Time Options, create the following string value: <pre class="fixed_text">  TitleBar </li> Set the value of the TitleBar string value to My Application .</li> <li>Quit Registry Editor.</li> <li> On the desktop, create a shortcut with the following command line.

NOTE: The path to Msaccess.exe may be different on your computer. Make sure the path in your shortcut accurately reflects the location of Msaccess.exe on your computer. <pre class="fixed_text">  &quot;C:\Program Files\Microsoft Office\Office\MSACCESS.EXE&quot; /Profile Test </li></ol>

Steps to Reproduce the Behavior

 * 1) Create a new folder on your computer named C:\Workgroup.
 * 2) Move your current workgroup file (System.mdw) from its current location to the C:\Workgroup folder. If you do not know the current location of your current workgroup file, you can use the Workgroup Administrator (Wrkgadm.exe) utility to locate it.
 * 3) After moving the workgroup file, use the Workgroup Administrator utility to rejoin the workgroup.
 * 4) Start Microsoft Access, and then open any database (.mdb) file to verify that Access is functioning correctly.
 * 5) Quit Microsoft Access.
 * 6) Create a custom profile and a shortcut by following the steps in the &quot;Creating a Custom Profile to Use with Microsoft Access&quot; section earlier in this article.
 * 7) Double-click the shortcut to start Microsoft Access. Note that Microsoft Access starts with &quot;My Application&quot; in the titlebar.
 * 8) Open any database (.mdb) file.

Note that you receive the error messages that are mentioned in the &quot;Symptoms&quot; section of this article.

<div class="references_section">