Link to home
Start Free TrialLog in
Avatar of mojava
mojava

asked on

How to reinstall notepad.exe?

I lost my notepad.exe to a trojan/virus & there was no other thing I could do but delete the corrupted file.

I would like to reinstall notepad.exe but don't have a clue where to start or how to extract it from my xp disk. SP1

Any help is appreciated.

Mojava
ASKER CERTIFIED SOLUTION
Avatar of SheharyaarSaahil
SheharyaarSaahil
Flag of United Arab Emirates image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I would guess the easiest is to get that notepad.exe file from any other machine and place it in
c:\windows\system32 directory..
Go to start/Run and type in   msconfig and hit enter.
click on the Expand file  button in bottom right of window.
Fill in the blanks.
Avatar of mojava
mojava

ASKER

I appreciate your quick responses....it seems that  SheharyaarSaahil's answer did the trick.

Sunray's was very simple & straight to the point.

centerv was helpful but not explicit enough for less saavy pc persons as myself since I could not find the cab file nor the place to pull it from my winxp disk.

Mojava
What if you dont have the cd? I have a sony laptop with just the restore cd. It didnt come with the OS.
To put in with a windows CD
To install the loss opponents, that's okay
To add to all of the above

You should have an i386 folder on your drive which is essentially your xp cd.
When a cd is called for, you can redirect to that folder.

Here MS's way of replacing system files

http://www.microsoft.com/resources/documentation/Windows/XP/all/reskit/en-us/Default.asp?url=/resources/documentation/windows/xp/all/reskit/en-us/prgg_det_pvfh.asp

Extracting Files from the Operating System CD
It is usually recommended that you use Add or Remove Programs in Control Panel to install and uninstall components, applications, and support software from the Windows XP Professional operating system CD. If system files are missing or damaged, you can run Windows XP Professional Setup from the operating system CD and choose the option to repair your existing installation. In some cases, however, you might need to extract a system or startup file directly from the operating system CD.

Important

If you install incorrect versions of system or startup files or if you install files to incorrect locations, your system might not operate as expected or might not start. Use the method described in this section only if your product support representative indicates that it is necessary to manually retrieve a compressed file from your operating system CD.
The /i386 folder on your Windows XP Professional operating system CD contains system and startup files in compressed form. If you need to replace a file in your Windows XP Professional installation, you can use the copy or expand command in Recovery Console to extract the needed file from the operating system CD. Use the copy command unless you are extracting a file from a .cab file, such as Driver.cab. When extracting a file from a .cab file, use the expand command.

When you use Recovery Console to extract a compressed file from the operating system CD, you must use exact file names for the compressed and uncompressed files. Table A.6 illustrates compressed and uncompressed file names.

Table A.6   Compressed and Uncompressed File Names

Compressed File Name  Uncompressed File Name  
Ntoskrnl.ex_ Ntoskrnl.exe
Hal.dl_ Hal.dll

Using the Copy Command in Recovery Console
If a file is not within a .cab file, you can use the copy command in Recovery Console to extract the file from the operating system CD and place it on your local disk in a Windows XP Professional installation. When you use the copy command to extract a file to a destination on your local disk, the file is automatically uncompressed. For more information about running Recovery Console, including how to add it to your startup options, see "Troubleshooting Startup" in this book.

Use the copy command with the following syntax:

copy source [destination]
Table A.7 describes the parameters that you can use with the copy command.

Table A.7   Parameters for the Copy Command

Parameter Description
Source Specifies the file to be copied.
Destination Specifies the directory and/or file name for the new file.  

Source can be removable media, any directory within the System32 directory of the current Windows installation, the root of any drive, the local installation sources, or the Cmdcons folder. (The C:\Cmdcons folder is the Recovery Console installation folder.)

Destination can be any directory within the System32 directories of the current Windows installation, the root of any drive, the local installation sources, or the Cmdcons folder. If you do not specify a destination, the command defaults to the current directory. The copy command prompts you if the destination file already exists. The destination cannot be removable media.

The copy command does not support replaceable parameters (wildcards).

Using the Expand Command in Recovery Console
To extract a file from a .cab file on the operating system CD and place it on your local disk in a Windows XP Professional installation, start Recovery Console and use the expand command. When you use the expand command to extract a file to a destination on your local disk, the file is automatically uncompressed. For more information about running Recovery Console, including how to add it to your startup options, see "Troubleshooting Startup" in this book.

Use the expand command with the following syntax:

expand source [/f:filespec] [destination] [/y] [/d]
Tables A.8 describes the parameters that you can use with the expand command.

Table A.8   Parameters for the Expand Command

Parameter Description
source Specifies the file that you want to expand. Cannot include wildcards.
destination Specifies the directory for the new file; the default is the current directory.  
/y Suppresses the overwrite prompt when you expand or extract files.
/f:filespec If the source contains more than one file, this parameter is required to identify the specific file or files that you want to expand. Can include wildcards.
/d Lists the files contained in the cabinet file without expanding it or extracting from it.

The destination can be any folder within the System32 folder of the current Windows installation, the root of any drive, the local installation sources, or the Cmdcons folder.
The destination cannot be removable media.
The destination file cannot be read-only. Use the Attrib command to remove the read-only attribute.
If the destination file already exists, the expand command prompts you for confirmation to overwrite the file unless you include the /y parameter.



Here's an article from PC Mag


If an essential Windows file gets whacked by a virus or otherwise corrupted, restore it from the Windows CD. Search the CD for the filename, replacing the last character with an underscore; for example, Notepad.ex_. If it’s found, open a command prompt and enter the command EXPAND, followed by the full pathname of the file and of the desired destination: EXPAND D:\SETUP\NOTEPAD.EX_ C:\Windows\NOTEPAD.EXE. If either pathname contains any spaces, surround it with double quotes.

If the file isn’t found, search on the unmodified filename. It will probably be inside a CAB file, which Win XP treats as a folder. Simply right-drag and copy the file to the desired location. In other Windows platforms, search for a file matching *.cab that contains the filename. When the search is done, open a command prompt and enter EXTRACT /L followed by the desired location, the full pathname of the CAB file, and the desired filename; for example: EXTRACT /L C:\Windows D:\I386\Driver.cab Notepad.exe. Again, if the destination or CAB file pathname contains spaces, surround it with double quotes.


Find the best option that works for you.
Not all options work for every pc every time.
Good luck



http://www.spywareinfo.com/~merijn/winfiles.html

copy to: Windows XP: C:\WINDOWS and C:\WINDOWS\System32
hope this help
I got it thanks all of you...