Avatar of zmau
zmau
 asked on

Protecting Disk from writing (On Windows)

Hi!

I would like to protect a disk/partition from being written (for sudden loss of electricity).
In "Windows Embedded"  there is such a feature.

Is there any other way to achive this goal  (without "Windows Embedded") ?
1) In Windows XP ?
2) In Windows 7 ?


thanks
zmau
HardwareOperating SystemsWindows OS

Avatar of undefined
Last Comment
pritamdutt

8/22/2022 - Mon
pritamdutt

I am not aware of this features on Windows Embedded but in Window XP , 7 it is possible through command line tool
DISKPART

Open in new window


Since it is interactive command I would suggest you to read further @ http://technet.microsoft.com/en-us/library/cc766465(WS.10).aspx

Steps to be followed (as system administrator):

- Run DISKPART

DISKPART> LIST DISK
DISKPART> SELECT DISK <chosen disk number from previous output>
DISKPART> ATTRIBUTES DISK  <Command to view current attributes>
DISKPART> ATTRIBUTES DISK SET READONLY -- Set DISK READONLY 
DISKPART> ATTRIBUTES DISK CLEAR READONLY -- Set DISK WRITABLE

Open in new window


Hope this helps
zmau

ASKER
Looks greate.
Does it work on the OS partition ?
zmau

ASKER
In "Windows Embedded"   SW can "write" to the disk. It just does not do any thing......


Thanks
zmau
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
pritamdutt

Yes you can use for individual partition as well..
Partition is referred as VOLUME in this tool


Commands would look like...
- Run DISKPART

DISKPART> LIST VOLUME
DISKPART> SELECT VOLUME <chosen disk number from previous output>
DISKPART> ATTRIBUTES VOLUME  <Command to view current attributes>
DISKPART> ATTRIBUTES VOLUME  SET READONLY -- Set DISK READONLY 
DISKPART> ATTRIBUTES VOLUME  CLEAR READONLY -- Set DISK WRITABLE

Open in new window


Hope this helps..
pritamdutt

Which version of Windows Embedded are you referring here?
zmau

ASKER
pritamdutt,

1) I think that All versions of Windows Embedded have these features.
    I am sure about XP embedded and later versions.
2) DISKPART of Windows XP does not seem to have the "ATTRIBUTES" command.
3) Somehow I feel that Windows will not let you protect the "OS partition". I Will check.


Thanks
zmau
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
pritamdutt

zmau, it would not be logical to set OS partition read only considering, there is frequent need for temporary files and paging files..


As regards to  XP Embedded, it does offer DISKPART command, but not the functionality of Attributes is not available
pritamdutt

Any updates? Is your query resolved?
zmau

ASKER
pritamdutt,

I had a long vacation....
I just came back.

it would not be logical to set OS partition read only considering, there is frequent need for temporary files and paging files..
-->> this is what I was afraid of.... But this feature is a MUST.

One more question : I wondel what is the level in which the attributes are set ?
In other words : what will be the outcome of the following scenario :
1) You set a disk to readOnly using "ATTRIBUTES VOLUME  SET READONLY" command.
2) you take the disk to another computer.
Is it stil write protected ?


Thanks
zmau
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
ASKER CERTIFIED SOLUTION
pritamdutt

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question