BUG: Self-Extracting Setup Project Contains Incorrect Parameters (296633)



The information in this article applies to:

  • Microsoft Visual J++ 6.0, when used with:
    • the operating system: Microsoft Windows 2000

This article was previously published under Q296633

SYMPTOMS

A self-extracting setup project that uses the default command line option of <WinDir>\WJview.exe works fine on all operating systems except Windows 2000. On a Windows 2000-based computer, the setup project cannot find WJview.exe in the WinNT folder.

CAUSE

This problem occurs because WJview.exe is located in the System32 folder on computers that are running Windows 2000. On computers that are running Windows 95, Windows 98, Windows Millennium Edition, and Windows NT, WJview.exe is located in the associated <WinDir> folder.

RESOLUTION

To resolve this problem, create two self-extracting setup solutions for your project. Use the default solution for all operating systems. For Windows 2000, replace <WinDir> with <SysDir> for the command line option. This forces Windows 2000 to look in the System32 folder.

STATUS

Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

MORE INFORMATION

Steps to Reproduce Behavior

  1. In Visual J++, create an Empty Project called Sample.
  2. Add a new class file, Project.Add Class, to the project.
  3. Add the following code to the new file, Class1.java:
    import java.awt.*;
    
    public class Class1 extends Frame
    {
       public Class1()
       {
          setSize(100,100);
          setLayout(new BorderLayout());
       }
    
       public static void main(String args[])
       {
       Class1 frm;
          frm = new Class1();
          frm.show();
       }
    }
    					
  4. In the Project.Sample Properties dialog box, on the Output Format tab, select the Enable Packaging check box, click Self-extracting Setup (.EXE), and then click Advanced.
  5. In the Advanced Properties dialog box, select the Create an entry in the Start Menu check box. Notice that the default Command line Program option appears as <WinDir>\wjview.exe.
  6. Click OK twice to return to the Visual J++ Integrated Development Environment (IDE).
  7. Build the project to create the self-extracting setup executable.
  8. Copy project solution Sample.exe to a Windows 2000-based computer.
  9. Double-click Sample.exe, install the new application on the computer, and accept all of the default options.
  10. From the Start menu, point to Programs, and then click Sample.exe to start the new application. The Missing Shortcut dialog box appears as the computer tries to locate WJview.exe.
To apply the workaround, on a Windows 2000-based computer only, go back to step 5 in the preceding steps. In the Command line Program option, change <WinDir> to <SysDir>. Re-run the test on a Windows 2000-based computer. Notice that your new Frame is displayed.

To remove the program from your computer, use the Add/Remove Programs option in Control Panel.

REFERENCES

For support information about Visual J++ and the SDK for Java, visit the following Microsoft Web site:

Modification Type:MajorLast Reviewed:6/14/2006
Keywords:kbBug kbIDEProject kbnofix KB296633