Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: How Do You Create a "Protected Operating System File"?


08 Dec 2009   #1

Windows 7 RC (Build 7100)
 
 
How Do You Create a "Protected Operating System File"?

Hey all,

This is a weird question, but I've been trying to figure out how to CREATE a "protected operating system file/folder." For example, "desktop.ini" is one.

My story is that I accidentally deleted a junction (the C:\Documents and Settings junction which maps to C:\Users for backwards compatibility). I created a new one using the command-line mklink tool, but the folder is not marked as a "protected operating system file", so when I turn the option on to hide those, it still shows up.

The only thing I can find online that is special about these files is that they have the System and Hidden attributes both turned on. I have turned these on, but it still shows up, so there seems to be another flag behind the scenes that marks files as "protected" files.

Any search turns up a million tutorials for how to go into the Folder Options GUI and turn on/off the "show..." option. Does anyone know how to do this? Let me know if I need to elucidate.

My System SpecsSystem Spec
.

08 Dec 2009   #2
Microsoft MVP

64-bit Windows 8.1 Enterprise
 
 

Hello Jim,

You might see if using this command in a elevated command prompt, then restart the computer may work. It should make it a hidden system file.

attrib +s +h full folder path /S /D

or

attrib +s +h full folder path /S /D /L

Hope this helps some,
Shawn
My System SpecsSystem Spec
08 Dec 2009   #3

Windows 7 RC (Build 7100)
 
 

Ah! Got it! It was the /L. It must've been setting the properties of Users instead of Docs and Settings every time I used +h +s. Thanks for the help; I was really scratching my head about it.
My System SpecsSystem Spec
.


08 Dec 2009   #4
Microsoft MVP

64-bit Windows 8.1 Enterprise
 
 

You're most welcome.
My System SpecsSystem Spec
23 Jun 2012   #5

Windows 7 Home Premium 64 Bit
 
 

So how would you do the reverse, make a "protected operating system file" unprotected so it shows up as normal?
I have some mp3's that for some reason are not showing up in my music folder until I uncheck the "Hide protected operating system files" box.
Any suggestions?
My System SpecsSystem Spec
23 Jun 2012   #6
Microsoft MVP

64-bit Windows 8.1 Enterprise
 
 

Hello grande007, and welcome to Seven Forums.

You can use the command below in a elevated command prompt to do so.

attrib -S -H "Full Path of File with extension"

Hope this helps,
Shawn
My System SpecsSystem Spec
07 Oct 2013   #7

Windows 7 Home Premium 64bit SP1
 
 

Quote   Quote: Originally Posted by Brink View Post
attrib +s +h full folder path /S /D /L
Hey there I just tried using this command and it will not work for some reason... I was trying to mark 3 folders as protected since they should be and it didn't work. Anything else I can try?
My System SpecsSystem Spec
07 Oct 2013   #8
Microsoft MVP

64-bit Windows 8.1 Enterprise
 
 

Hello Radical,

Did it give you an error message?

Did you do this in an elevated command prompt?

Hope this helps for now.
My System SpecsSystem Spec
07 Oct 2013   #9

Windows 7 Home Premium 64bit SP1
 
 

Quote   Quote: Originally Posted by Brink View Post
Hello Radical,

Did it give you an error message?

Did you do this in an elevated command prompt?

Hope this helps for now.
Yeah I used an elevated command prompt and it didn't give me an error... I typed them in exactly like this:

attrib +s +h "C:\Recovery" /S /D /L
attrib +s +h "C:\MSOCache" /S /D /L
attrib +s +h "C:\NST" /S /D /L

I also tried without quotes... it seems to take a while or something in command prompt because it never goes back to showing C:\Windows\system32> and so I have to close off command prompt and enter in the next full line.
My System SpecsSystem Spec
07 Oct 2013   #10
Microsoft MVP

64-bit Windows 8.1 Enterprise
 
 

Usually it should only take a brief moment after each command before the prompt appears again.

Do you have ownership and "full control" access rights of these folders and their content?
My System SpecsSystem Spec
Reply

 How Do You Create a "Protected Operating System File"?




Thread Tools




Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 03:10 AM.
Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33