Microsoft KB Archive/296633

= BUG: Self-Extracting Setup Project Contains Incorrect Parameters =

Article ID: 296633

Article Last Modified on 6/14/2006

-

APPLIES TO


 * Microsoft Visual J++ 6.0 Standard Edition, when used with:
 * Microsoft Windows 2000 Standard Edition

-



This article was previously published under Q296633



SYMPTOMS
A self-extracting setup project that uses the default command line option of \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  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  with  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.



Steps to Reproduce Behavior
 In Visual J++, create an Empty Project called Sample. Add a new class file, Project.Add Class, to the project.  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; } }                   </li> 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.</li> 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.</li> Click OK twice to return to the Visual J++ Integrated Development Environment (IDE).</li> Build the project to create the self-extracting setup executable.</li> Copy project solution Sample.exe to a Windows 2000-based computer.</li> Double-click Sample.exe, install the new application on the computer, and accept all of the default options.</li> 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.</li></ol>

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.

<div class="references_section">