mirror of
https://github.com/reactos/reactos.git
synced 2024-12-03 16:33:37 +08:00
[SETUPLIB] Don't flag freeldr.ini as read-only during installation.
CORE-19575 For the time being, don't add read-only attribute for ease of testing and modifying files, but it won't always stay this way. For example, Windows sets its boot.ini (as well as NTLDR, NTDETECT.COM etc.) as read-only (+ hidden and system) during its 1st-stage setup. 2nd-stage setup makes some adjustments in boot.ini but doesn't restore its read-only attribute. Windows tools that can modify boot.ini (i.e. msconfig.exe, bootcfg.exe, and sysdm.cpl) **ALL** know how to remove the read-only attribute for modifying boot.ini, before restoring it if needed.
This commit is contained in:
parent
cf9f7548d5
commit
a7cbb60ebf
@ -860,7 +860,13 @@ CloseIniBootLoaderStore(
|
||||
|
||||
/* Re-protect the INI file */
|
||||
FileAttribs = ProtectAttribs;
|
||||
/*Status =*/ ProtectFile(BootStore->FileHandle, ProtectAttribs, &FileAttribs);
|
||||
if (BootStore->Header.Type == FreeLdr)
|
||||
{
|
||||
// NOTE: CORE-19575: For the time being, don't add READONLY for ease
|
||||
// of testing and modifying files, but it won't always stay this way.
|
||||
FileAttribs &= ~FILE_ATTRIBUTE_READONLY;
|
||||
}
|
||||
/*Status =*/ ProtectFile(BootStore->FileHandle, FileAttribs, &FileAttribs);
|
||||
Status = STATUS_SUCCESS; // Ignore the status and just succeed.
|
||||
|
||||
Quit:
|
||||
|
Loading…
Reference in New Issue
Block a user