.Net Framework error upon windows 7 startup: Could not find file 'C:\Windows\system32\links2.txt'.__File name: 'C:\Windows\system32\links2.txt'

I am getting a Microsoft .NET Framework error upon starting windows. I would like to know what I need to do to fix this problem.

This is what is in the detail section:

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.IO.FileNotFoundException: Could not find file 'C:\Windows\system32\links2.txt'.
File name: 'C:\Windows\system32\links2.txt'
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
   at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize)
   at System.IO.StreamReader..ctor(String path, Boolean detectEncodingFromByteOrderMarks)
   at Keygen.Form1.Form1_Load(Object sender, EventArgs e)
   at System.EventHandler.Invoke(Object sender, EventArgs e)
   at System.Windows.Forms.Form.OnLoad(EventArgs e)
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl()
   at System.Windows.Forms.Control.WmShowWindow(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/mscorlib.dll
----------------------------------------
GTA Keygen
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Users/Public/Public%20Documents/Windows%20Movie%20Player/player.exe
----------------------------------------
Microsoft.VisualBasic
    Assembly Version: 8.0.0.0
    Win32 Version: 8.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.VisualBasic/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
----------------------------------------
System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Runtime.Remoting
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Runtime.Remoting/2.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
----------------------------------------
System.Xml
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Configuration
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.


 

Question Info


Last updated July 2, 2018 Views 20,152 Applies to:
Answer

Hi WGreg,

Welcome to Microsoft Answers.

I would suggest you to follow the below mentioned methods and check after using each method if the issue gets resolved –

Method 1:

Steps to perform a SFC scan:

1.      Click Start, click All Programs, click Accessories, right-click Command Prompt, and then click Run as administrator. If you are prompted for an administrator password or for a confirmation, type the password, or click Allow

2.      Type the following command, and then press ENTER:

sfc /scannow 

A message will appear stating that 'The system scan will begin'. Be patient because the scan may take some time

3.      If any files require a replace SFC will replace them. You may be asked to insert your Win7 DVD for this process to continue

4.      If everything is okay you should, after the scan, see the following message "Windows resource protection did not find any integrity violations" 

5.      After the scan has completed, close the command prompt window, restart the computer and check.

The sfc /scannow command scans all protected system files and replaces incorrect versions with correct Microsoft versions.

Method 2:

Refer to the below mentioned link for free virus or malware scan of your computer -

http://www.microsoft.com/Security_Essentials/

Method 3:

Perform a clean boot follow the below mentioned steps:

 

  1. Log on to the computer by using an account that has administrator rights.

 

  1. Click Start, type msconfig.exe in the Start Search box, and then press ENTER to start the System Configuration Utility.
    If you are prompted for an administrator password or for confirmation, type your password, or click Continue.

 

  1. On the General tab, click Selective Startup, and then click to clear the Load startup items check box. (The Use Original Boot.ini check box is unavailable.)

 

  1. On the Services tab, click to select the Hide all Microsoft services check box, and then click Disable all.

 

  1. Click OK, and then click Restart.

 Check if the issue is resolved. If the issue is resolved check which third party is causing  the problem, referring the link given below:

        http://support.microsoft.com/kb/929135

 After you have finished troubleshooting, follow these steps to reset the computer to start as usual:

  1. Click Start, type msconfig.exe in the Start Search box, and then press ENTER.

If you are prompted for an administrator password or for confirmation, type your password, or click Continue.

  1. On the General tab, click the Normal Startup option, and then click OK.
  2. When you are prompted to restart the computer, click Restart.

Method 4:

If the above methods do not fix the issue do a startup repair:

1.      Remove all floppy disks, CDs, and DVDs from your computer, and then restart your computer using the computer's power button.

2.      Do one of the following:

o    If your computer has a single operating system installed, press and hold the F8 key as your computer restarts. You need to press F8 before the Windows logo appears. If the Windows logo appears, you need to try again by waiting until the Windows logon prompt appears, and then shutting down and restarting your computer.

o    If your computer has more than one operating system, use the arrow keys to highlight the operating system you want to repair, and then press and hold F8.

3.      On the Advanced Boot Options screen, use the arrow keys to highlight Repair your computer, and then press Enter. (If Repair your computer isn't listed as an option, then your computer doesn't include preinstalled recovery options use the disc to do the repair as mentioned below, or your network administrator has turned them off.)

4.      Select a keyboard layout, and then click Next.

5.      On the System Recovery Options menu, click a tool to open it.

 

To open the System Recovery Options menu using a system repair disc or a Windows 7 installation disc

If your computer's system is severely damaged and you cannot access the System Recovery Options menu on your computer, you can access it using the Windows 7 installation disc or a system repair disc you created earlier.

To use this method, you need to restart (boot) your computer using the disc.

1.      Insert the disc.

2.      Restart your computer using the computer's power button.

3.      If prompted, press any key to start Windows from the installation disc.

o    If your computer isn't configured to start from a CD or DVD, check the information that came with your computer. You may need to change your computer's BIOS settings. For more information, see BIOS: frequently asked questions.

4.      Choose your language settings, and then click Next.

5.      If you are using the Windows installation disc, click Repair your computer.

6.      Select the Windows installation you want to repair, and then click Next.

7.      On the System Recovery Options menu, click a tool to open it.

Follow the below mentioned link for system recovery using the repair option:

http://windows.microsoft.com/en-US/windows7/What-are-the-system-recovery-options-in-Windows-7

Thanks,
Hope this helps. Let us know the results.
Meghmala – Microsoft Support

Visit our Microsoft Answers Feedback Forum and let us know what you think

Did this solve your problem?

Sorry this didn't help.

Great! Thanks for marking this as the answer.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this response?

Thanks for your feedback.