BUG: Bad Default Start Menu Program in Setup Projects

ID: Q199033


The information in this article applies to:
  • Microsoft Visual J++, version 6.0


SYMPTOMS

When you wrap a Visual J++ 6.0 application project in a self-extracting executable that has an entry on the Start menu and the Start menu is set to the default properties, the following error occurs when you try to run the program from the Start menu:

WJView Error
ERROR: Could not execute Form1: The system cannot find the file specified.


CAUSE

When you select the Create an entry in the Start Menu check box, the default properties for a self-extracting setup project are as follows:


Command line program=<WinDir>\wjview.exe
Argument= /p /cp:p "<APPDIR>" Form1 
The problem occurs because Visual J++ 6.0 does not modify the project's target start location to point to ProjectXX.exe. Visual J++ 6.0 should point to ProjectXX.exe if you specify Windows EXE as the project packaging type. The launch dialog box, as well as any setup project deploying this type of project, always refers to the startup class independent of the packaging type.


RESOLUTION

To make your setup project create an entry in the Start menu when Windows binaries are deployed, change the default setup properties as follows:


Command line program=<AppDir>\AppName.exe
Argument="" 
NOTE: AppName is the name of the Windows application. For example, Project1 is the application name in the example in the MORE INFORMATION section of this article.


STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article.


MORE INFORMATION

Steps to Reproduce Behavior

  1. Start Visual J++ 6.0. In the New Project dialog box, click Windows Application to create a new Windows application project. Click Open. Project1 is created by default.


  2. In the Project Explorer window, right-click Project1, and click Project1 Properties....


  3. In the Project1 Properties dialog box, click the Deployment tab, select Windows Binaries in the Outputs of type list, and click OK.


  4. From the File menu, click New Project. In the New Project dialog box, expand the Visual Studio folder and click the Distribution Units folder. Click Self-Extracting Setup to create a new self-extracting setup project. Setup1 is created by default. Make sure that the location of Setup1 is the same as Project1, and click Add to current solution.


  5. In the Project Explorer window, right-click Setup1, click Add Project Outputs..., click Project1, and click OK.


  6. In the Project Explorer window, right-click Setup1, and click Setup1 Properties....


  7. On the Target tab in the Setup1 Properties dialog box, select the Create an entry in the Start Menu check box and click OK.

    NOTE: The default properties are set as follows:
    
    Command line program=<WinDir>\wjview.exe
    Argument= /p /cp:p "<APPDIR>" Form1 


  8. In the Project Explorer window, right-click Solution and click Rebuild Solution to create Project1.exe and Setup1.exe.


  9. Go to the folder that contains Setup1.exe. Double-click Setup1.exe to install the program.


  10. Click Start, Programs, and Setup1.


RESULT: The error message occurs.


REFERENCES

For the latest Knowledge Base articles and other support information on Visual J++ and the SDK for Java, please see the following pages on the Microsoft Technical Support site:

http://support.microsoft.com/support/visualj/

http://support.microsoft.com/support/java/

© Microsoft Corporation 1998, All Rights Reserved.
Contributions by Adele Hunter, Microsoft Corporation

Additional query words:

Keywords : kbide kbInternet kbJava kbVJ600 kbVJ600bug
Version : WINDOWS:6.0
Platform : WINDOWS
Issue type : kbbug


Last Reviewed: November 16, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.