Article ID: 299332 - Last Review: April 19, 2007 - Revision: 2.7

Error Message: Wininit.exe Cannot Be Run from Within Windows

This article was previously published under Q299332
Important This article contains information that shows you how to help lower security settings or how to turn off security features on a computer. You can make these changes to work around a specific problem. Before you make these changes, we recommend that you evaluate the risks that are associated with implementing this workaround in your particular environment. If you implement this workaround, take any appropriate additional steps to help protect your system.
Expand all | Collapse all

SYMPTOMS

When you start your computer, you may receive the following error message:
Wininit.exe cannot be run from within Windows

CAUSE

This issue can occur if your computer is infected with a virus. The Win32.Weird and Bymer viruses are known to cause this issue.

RESOLUTION

Microsoft does not provide software that can detect or remove computer viruses. If you suspect or confirm that your computer is infected with a virus, obtain current antivirus software. For a list of antivirus software manufacturers, click the following article number to see the article in the Microsoft Knowledge Base:
49500  (http://support.microsoft.com/kb/49500/EN-US/ ) List of Antivirus Software Vendors
Warning This workaround may make your computer or your network more vulnerable to attack by malicious users or by malicious software such as viruses. We do not recommend this workaround but are providing this information so that you can implement this workaround at your own discretion. Use this workaround at your own risk.

Note An antivirus program is designed to help protect your computer from viruses. You must not download or open files from sources that you do not trust, visit Web sites that you do not trust, or open e-mail attachments when your antivirus program is disabled.

For additional information about computer viruses, click the following article number to view the article in the Microsoft Knowledge Base:
129972  (http://support.microsoft.com/kb/129972/ ) Computer viruses: description, prevention, and recovery
As a temporary workaround, you can edit the Win.ini file to disable the "load=" line which contains the virus entry:
  1. Click Start, point to Search, and then click Files or Folders.
  2. In the Named box. type win.ini.
  3. In the Look in box, click Local hard drives.
  4. Click Search or Find Now.
  5. Double-click the Win.ini file. It opens in Notepad.
  6. Find the line that begins with "load=", and then type a semicolon (;) at the beginning of this line.
  7. Click Close, and then click Yes to save the file when you are prompted.
  8. Restart your computer.

MORE INFORMATION

The Wininit file is an .ini file that lists all of the changes to be made to Windows when you restart the computer after installing a program. The Wininit.exe file is the program file that starts the .ini file. It can be run only when the computer restarts so that the changes can be made while Windows is not running. The virus adds the program file to the "load=" line in the Win.ini file, but because Windows is already started, it is unable to run.

If you continue to receive the error message after you remove the virus from your computer, manually remove and restore Wininit.exe. To do so, follow these steps:
  1. Start your computer to a command prompt.

    To do so in Windows 95, when the "Starting Windows 95" message appears, press the F8 key, and then select Command Prompt Only from the Startup menu.

    To do so in Windows 98, press and hold down the CTRL key after your computer completes the Power On Self Test (POST), and then select Command Prompt Only from the Startup menu.

    To do so in Windows Millennium Edition, insert the Windows Millennium Edition Startup disk in drive A, restart your computer, when the Microsoft Windows Millennium Editon Startup menu appears, select Start Computer With CD-ROM Support, at the command prompt, type: C:, and then press ENTER.
  2. At the command prompt, type the following commands (press ENTER after each command):
    cd windows
    del wininit.exe
  3. Press CTRL+ALT+DELETE to restart your computer.
  4. Extract new copies of Wininit.exe files from your Windows CD-ROM.

    For additional information about how to extract files, click the following article number to view the article in the Microsoft Knowledge Base:
    129605  (http://support.microsoft.com/kb/129605/EN-US/ ) How to Extract Original Compressed Windows Files

APPLIES TO
  • Microsoft Windows Millennium Edition
  • Microsoft Windows 98 Second Edition
  • Microsoft Windows 98 Standard Edition
  • Microsoft Windows 95
Keywords: 
kberrmsg kbprb kbvirus KB299332
 

Article Translations