Microsoft KB Archive/162961

= ODE97: Run-Time Application Cannot Find System.mdw After Setup =

Article ID: 162961

Article Last Modified on 1/19/2007

-

APPLIES TO


 * Microsoft Access 97 Standard Edition
 * Microsoft Office 97 Developer Edition

-



This article was previously published under Q162961



Moderate: Requires basic macro, coding, and interoperability skills.



SYMPTOMS
When you use the Microsoft Office 97 Developer Edition Tools (ODE Tools) Setup Wizard to create a setup image for a run-time application, you may receive the following error message when you run your Setup program on another computer:

Couldn't find file C:\Windows\System\System.mdw

NOTE: The path to System.mdw may be different in your error message; it will display the path to the Windows System folder on your computer.



CAUSE
When you created the setup image, you clicked to select the Workgroup and Run-Time check boxes when you let the Wizard create a command-line for your application's shortcut, but you did not include a workgroup information file with your application.



RESOLUTION
There are four methods to resolve this problem.

Methods 1 and 2 prevent the error from occurring by modifying the command line created by the Setup Wizard or by including a workgroup information file with your application's setup files.

Methods 3 and 4 fix the error after your application is already installed by modifying your application's shortcut or by moving the workgroup information file.

Method 1: Modifying the Wizard-Created Command Line
 Open your application's setup options in the Setup Wizard. Proceed to the "Add the shortcuts" screen in the Setup Wizard, and select your application's shortcut in the List Of Shortcuts box. Click to select the "I would like to specify my own custom command line" option.  Edit the text in the Command Line box to change the /wrkgrp command-line option. Change this portion of the command line   /wrkgrp $(WorkgroupFile) to:   /wrkgrp "$(FilePath)\System.mdw" Following is an example of how the modified shortcut will look with /runtime and /wrkgrp command-line options:   "msaccess.exe"  /runtime  /wrkgrp "$(FilePath)\System.mdw      "$(FilePath)\MyNewApp.mdb"                    </li> Proceed through the remaining screens of the Setup Wizard and create a new setup image for your application.</li></ol>

Method 2: Including a Workgroup Information File with Your Setup
<ol> Open your application's setup options in the Setup Wizard.</li> In the Add The Files screen in the Setup Wizard, click the Add button, and then add a workgroup information file.

NOTE: If you try to add the workgroup file to which you are currently joined, you receive the following errors when the Setup Wizard tries to create your setup image:

Permission denied

The creation of your custom Setup program was not completed successfully.

This error occurs because the workgroup file is in use by you. Use the Workgroup Administrator to temporarily join another workgroup file before you run the Setup Wizard, or include a different workgroup file in your setup image.</li> Proceed through the remaining screens of the Setup Wizard and create a new setup image for your application.</li></ol>

Method 3: Modifying Your Application's Shortcut
After your run-time application is installed, you can modify the shortcut to your application so that it looks for the workgroup information file in the correct location.

In Microsoft Windows 95 or Microsoft Windows NT version 4.0
<ol> Click the Start button on the taskbar, point to Settings, and then click Taskbar.</li> In the Taskbar Properties dialog box, click the Start Menu Programs tab, and then click the Advanced button.</li> Locate your application's folder and the application shortcut in Windows Explorer.</li> Using the right mouse button, click the shortcut, and then click Properties on the shortcut menu that appears.</li> In the Properties dialog box, click the Shortcut tab.</li>  Modify the command line in the Target box so that the /wrkgrp option is followed by the correct path to the System.mdw file. For example, change this portion of the command line <pre class="fixed_text">  /wrkgrp C:\Windows\System\System.mdw to: <pre class="fixed_text">  /wrkgrp "C:\My Application\System.mdw" Note that you must place quotation marks around the path and file name if it contains any spaces. </li> Click OK in the Properties dialog box, and then close Windows Explorer and the Taskbar Properties dialog box.</li></ol>

In Microsoft Windows NT version 3.51
<ol> Open your application group in Program Manager.</li> Select your application's icon by clicking it once.</li> On the File menu, click Properties.</li>  In the Program Item Properties dialog box, modify the command line in the Command Line box so that the /wrkgrp option is followed by the correct path to the System.mdw file. For example, change this portion of the command line <pre class="fixed_text">  /wrkgrp C:\Windows\System\System.mdw to: <pre class="fixed_text">  /wrkgrp "C:\My Application\System.mdw" </li> Click OK in the Program Item Properties dialog box.</li></ol>

Method 4: Moving the Workgroup Information File
After your application is installed, the shortcut looks for the System.mdw file in the Windows System folder by default. Your Setup program installed the System.mdw in your application's main folder. If you copy or move the System.mdw file to the Windows System folder, the shortcut will work correctly as is.

<div class="status_section">

STATUS
Microsoft has confirmed this to be a problem in Microsoft Office 97 Developer Edition Tools.

<div class="moreinformation_section">

MORE INFORMATION
The Workgroup Administrator, Wrkgadm.exe, is included with your run-time application by the Setup Wizard. If you do not include a workgroup information file (called System.mdw by default) with your setup files, the Workgroup Administrator automatically creates one when you run Setup for your application. Workgroup Administrator creates the System.mdw file in the folder where your application is installed. However, the Setup Wizard incorrectly sets the /wrkgrp command-line option to look for System.mdw in the Windows System folder when it creates your application's shortcut. This only happens when you indicate to the Setup Wizard that you want to include the Workgroup command-line option in your application's shortcut, but you do not include your own workgroup information file.

Steps to Reproduce Problem

 * 1) Start the ODE Tools Setup Wizard.
 * 2) In the first screen of the Setup Wizard, click "Create a new set of setup options for my application's custom Setup program," and then click Next.
 * 3) In the "Add the files" screen of the Setup Wizard, click the Add button, and then add the sample database Northwind.mdb. Click to select the "Set as Application's Main File" check box, and then click Next.
 * 4) In the Add The Shortcuts screen of the Setup Wizard, click the Add button. The Setup Wizard automatically creates a new shortcut for Northwind.mdb. Type Northwind Test in the Description box for the new shortcut.
 * 5) Click the Database Shortcut Properties tab, and then click Workgroup and Run-Time under Database Command-Line Options.
 * 6) Click Next, answer Yes when prompted to include the Microsoft Access run-time executable file, and then click OK when prompted about including a workgroup information file.
 * 7) Click Next until you get to the final screen in the Setup Wizard, "Where do you want the Setup Wizard to copy the files for your custom Setup program?". Select a folder for the setup files, and click to select a check box for the kind of distribution disks you want to create.
 * 8) Click Finish and let the Setup Wizard create your setup image. You do not need to save the current Setup template when prompted.
 * 9) After the Setup Wizard finishes, run Setup for this custom application on a computer that does not have Microsoft Access installed. Then start the Northwind Test application and note that you receive the error message mentioned in the "Symptoms" section of this article.

<div class="references_section">