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

Article translations Article translations
Article ID: 330314 - View products that this article applies to.
This article was previously published under Q330314
Expand all | Collapse all

On This Page

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.

RESOLUTION

System Recovery

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.

MORE INFORMATION

Steps to Reproduce the Behavior

  1. Open the dependency file for Scrrun.dll. Notice the following entries:
    [scrrun.dll]
    Dest=$(WinSysPath)Register=$(DLLSelfRegister)Version=4.0.0.2926
    Uses1=MSVCRT.dllCABFileName=ScrRun.cabCABDefaultURL=http://activex.microsoft.com/controls/vb6CABINFFile=ScrRun.inf
    
    [MSVCRT.dll]
    Dest=$(WinSysPathSysFile)Uses1=
  2. Create a Standard EXE project in Visual Basic 6.0.
  3. On the Project menu, click References.
  4. Click Microsoft Scripting Runtime library, and then click OK.
  5. Save the project, and then create a compiled EXE.
  6. Use the Package and Deployment Wizard to create a setup package by using the default settings.
  7. From the Package folder, open the Setup.lst file in Notepad.
  8. Under Setup1 Files, notice the following entry:
    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 "Symptoms" 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.

Properties

Article ID: 330314 - Last Review: August 4, 2003 - Revision: 1.0
APPLIES TO
  • Microsoft Visual Basic 6.0 Professional Edition
Keywords: 
kbprb KB330314

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com