4

I am using a Vista but I would like the answer for XP, Vista and Windows 7.

I am writing a program where I want to count the Important or Essential files of the Windows PC. It looks like the Essential files would be located somewhere in C:/Windows and after some research I found that some Essential files are located in C:/Windows/winsxs.

What and where are the Essential files for a Windows PC? Is there a folder or set of folders that contain the essential files? Are all the files in C:/Windows/winsxs Essential?

Essential Definition: Absolutely necessary; extremely important; Edit: Files that should generally not be messed with, changed or removed; The files that make up basic Windows OS functions and are not related to the users Programs or Documents.

2
  • What are you trying t do? What the end game here? More detail will help us give you a good answer. Define essential. Cause there are many fines that are required for the OS. Such a vague question. This would never fly at stack overflow.
    – surfasb
    Jul 1, 2011 at 19:34
  • @surfasb I have updated my question.
    – Dorothy
    Jul 1, 2011 at 20:41

4 Answers 4

1

For all 3 OS's, most of the essential OS files are in %SYSTEMROOT%.

1

well, sxs is for 32 bit libraries in 64 bit systems - the 32 bit versions don't have it. In general, system and system32 in %SYSTEMROOT% can be considered essential.

1
  • 1
    WinSxS contains system components on both 32 and 64 bit systems, far more than just libraries. It's new to Vista, though some XP systems will have it because MS started using the WinSxS system for some libraries that could be redistributed on XP. Read more about it at blogs.msdn.com/b/e7/archive/2008/11/19/disk-space.aspx
    – afrazier
    Jul 1, 2011 at 15:15
1

There is no good answer to that. It really depends on what someone does with their computer. If you have a specific question about certain files, usually do a Google search of "Can I delete...?" will give you the answer. I would say if the answer is no, then it is essential.

You can also do a search for files that are hidden or system files. That might be the closest to your answer.

4
  • 1
    As the others said, I would consider everything in c:\windows essential, unless you can definitively rule it out, like .log files.
    – KCotreau
    Jul 1, 2011 at 15:10
  • What about C:\Windows\Temp? Would this contain essential files or is this more like C:\Users\<user>\AppData\Local\Temp?
    – Dorothy
    Jul 1, 2011 at 15:41
  • They may be essential for that Windows session, yes. A program or installer might place a log file in there for debugging, or as part of a deferred call to replace another file when the system restarts.
    – afrazier
    Jul 1, 2011 at 15:45
  • 1
    Long term, the files in that folder can be deleted, making that another exception.
    – KCotreau
    Jul 1, 2011 at 16:18
0

One way to find out which files are "most important" would be to look at what's protected by System File Protection.

Another would be to do a clean install of the OS with as few options as possible and/or remove as many components as the OS will readily let you after the fact. What's left is generally going to be essential.

You could also profile the boot sequence (particularly on a clean install). Every file that gets touched must be used for the boot sequence in some way.

Finally, you could realize that trying to randomly remove files (or downplay their importance on a given system without further analysis) from %SystemRoot% and %ProgramFiles% (and %ProgramFiles(x86)% on 64-bit systems) is a really bad idea, and can only lead to undereducated users breaking their systems by trying to "optimize" things based on bad advice.

7
  • I am not planning on having the program "randomly remove files". The essential file count is to give to user an idea of what percentage of their total file count is the backbones of windows.
    – Dorothy
    Jul 1, 2011 at 15:38
  • @Dorothy: To what end? It doesn't really matter how many files my programs install, nor how much space they consume. If I need the program, then I need the program. If they take up too much space, then I either need more space, need a smaller alternative, or need to do without. Also, you have to be cognizant of the fact that the contents of WinSxS are densely hardlinked to other places in the system, so WinSxS by itself doesn't take up that much space in reality. (Or the rest of the system doesn't use much space, it's all in WinSxs, depending on how you'd like to view it.)
    – afrazier
    Jul 1, 2011 at 15:44
  • What is your question?
    – Dorothy
    Jul 1, 2011 at 16:09
  • My question is: What is the information you intend to calculate good for?
    – afrazier
    Jul 1, 2011 at 17:01
  • Maybe you would not find the number useful but if the average user finds that they have 300,000 files on their PC then it may be helpful for them to know that 80,000 of them are important, so many are temporary, so many are program files and so many are their personal documents. It's hard to provide too much data.
    – Dorothy
    Jul 1, 2011 at 20:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.