Microsoft KB Archive/330314

= PRB: Your Computer Does Not Restart After You Install a Microsoft Visual Basic 6.0 Application That Includes a MSVCRT.dll File =

Article ID: 330314

Article Last Modified on 8/4/2003

-

APPLIES TO


 * Microsoft Visual Basic 6.0 Professional Edition

-



This article was previously published under Q330314



SYMPTOMS
After you install the Microsoft Visual Basic 6.0 application that is packaged with the Package and Deployment Wizard, you receive one of the following errors when you start your computer:  Microsoft Windows NT 4.0:

STOP: c000021a {Fatal System Error}

The Windows Logon Process System process terminated unexpectedly with a status of 0x00000080 (0x00000000 0x00000000).

The system has been shut down.

 Microsoft Windows 2000:

Setup cannot continue because some system files are out of date on your system. Click OK if you would like setup to update these files for you now. You will need to restart Windows before you can run setup again. Click cancel to exit setup without updating system files.

When Windows 2000 restarts and then you start the installation again, you receive the error message again. Microsoft Windows 98:

The MSVCRT.dll file is linked to missing export NTDLL.dll: RtlGetNTVersionNumbers.

After you receive this error, you receive a Stop dialog box with the following message:

A device attached to the system is not functioning.





CAUSE
You receive an error because your setup package installs a version of the MSVCRT.dll file on your computer that is incompatible with your operating system. This typically occurs because MSVCRT.dll is listed as a dependency in a dependency file (.dep) for one of the components that your Visual Basic application uses, and you include the application on a newer operating system, such as Microsoft Windows XP.



Windows NT 4.0
To repair a Windows NT 4.0 operating system that runs the file allocation table (FAT) file system, boot the computer to a command prompt, and then manually replace MSVCRT.dll in the C:\WINNT\System32 folder with a copy of the file from the Windows NT 4.0 CD or with a copy of the file from a computer that is successfully running the Windows NT 4.0 operating system.

To repair a Windows NT 4.0 computer that runs the NTFS file system (NTFS), boot the computer by using an Emergency Repair Disk (ERD). For additional information about this topic, click the following article number to view the article in the Microsoft Knowledge Base:

103280 Using an Emergency Repair Disk Created by Windows NT

Windows 98
To repair a Windows 98 operating system, you must boot the computer to a command prompt by using a startup disk. Next, manually replace MSVCRT.dll in the C:\Windows\System folder with a copy of the file from the Windows 98 CD or with a copy of the file from a computer that is successfully running Windows 98.

Prevent Redistribution of MSVCRT.dll
To prevent the problem from occurring in the future, do not redistribute MSVCRT.dll with your setup package. MSVCRT.dll is in the Microsoft C Runtime Library, and MSVCRT.dll is installed with the operating system. Only update MSVCRT.dll by using operating system service packs.

When you use the Package and Deployment Wizard to package your application, remove MSVCRT.dll from the list of files to be included in the package. Alternatively, if you have a setup package that is already assembled and you want to modify the setup package to prevent MSVCRT.dll from being installed, follow these steps:
 * 1) Open the Setup.lst file by using Notepad or by using another text editor.
 * 2) Check the [Bootstrap Files] section and check the [Setup1 Files] section to determine whether MSVCRT.dll is included.
 * 3) Remove the File= line for MSVCRT.dll, and then renumber the lines that remain in that section.
 * 4) Save the file.

The next time you run Setup.exe, Setup.exe will not try to install MSVCRT.dll.



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 the Behavior
  Open the dependency file for Scrrun.dll. Notice the following entries:

<pre class="fixed_text">[scrrun.dll]

Dest=$(WinSysPath)

Register=$(DLLSelfRegister)

Version=4.0.0.2926

Uses1=MSVCRT.dll

CABFileName=ScrRun.cab

CABDefaultURL=http://activex.microsoft.com/controls/vb6

CABINFFile=ScrRun.inf

[MSVCRT.dll] Dest=$(WinSysPathSysFile)

Uses1= </li> Create a Standard EXE project in Visual Basic 6.0.</li> On the Project menu, click References.</li> Click Microsoft Scripting Runtime library, and then click OK.</li> Save the project, and then create a compiled EXE.</li> Use the Package and Deployment Wizard to create a setup package by using the default settings.</li> From the Package folder, open the Setup.lst file in Notepad.</li>  Under Setup1 Files, notice the following entry:

<pre class="fixed_text">File1=@msvcrt.dll,$(WinSysPathSysFile),,,8/29/02 5:41:08 AM,323072,7.0.2600.1106 This entry shows that a newer version of MSVCRT.dll is being redistributed with the setup package. At this point, if you install this package to a computer that runs on the Windows 98 operating system or if you install this package to a computer that runs on the Windows NT 4.0 operating system, you receive one of the errors mentioned in the &quot;Symptoms&quot; section of this article. If you install this package to a computer that runs on the Windows 2000 operating system, the setup prompts you to permit it to update system files and then to restart. When Windows 2000 restarts and then you start the installation again, you receive the error message again. </li></ol>

Keywords: kbprb KB330314

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.