Overwriting Win system files under BIBM TBOSDT
Posted: Tue Apr 30, 2013 4:45 am
Really, two questions here.
1
=
I need to overwrite Windows system files as part of a registry restoration script to be run in TBOSDT. To do this, I'm assuming that I'll need to turn off read-only, system, and hidden in order to overwrite. Unfortunately, the code in tbexplo.tbs only deals with turning an attribute on, as far as I can tell, so the example there doesn't seem to apply. I just need to toggle the attributes off the way the DOS attrib command does, like this:
ATTRIB -r -s -h c:\windows\system32\SAM
If I'm correctly reading this code from setwindl.tbs...
"SetAttr(filepath, 0)"
...then passing in 0 as the second parameter of SETATTR() the command "SetAttr(filepath, 0)" will do what I need (indeed, more than I need) by removing all file attributes. I'd just like to get verification that my interpretation is correct.
2
=
I'm going to run my script on a BIBM boot floppy, outside Windows. So maybe I don't need to worry about the overwriting issue--do the standard attribute bits still apply under TBOSDT? I assume TBOSDT does observe FAT file attributes, especially since runs in Protected mode, but again, is that true? Because if not, then I don't need to worry about turning attributes off after all.
1
=
I need to overwrite Windows system files as part of a registry restoration script to be run in TBOSDT. To do this, I'm assuming that I'll need to turn off read-only, system, and hidden in order to overwrite. Unfortunately, the code in tbexplo.tbs only deals with turning an attribute on, as far as I can tell, so the example there doesn't seem to apply. I just need to toggle the attributes off the way the DOS attrib command does, like this:
ATTRIB -r -s -h c:\windows\system32\SAM
If I'm correctly reading this code from setwindl.tbs...
"SetAttr(filepath, 0)"
...then passing in 0 as the second parameter of SETATTR() the command "SetAttr(filepath, 0)" will do what I need (indeed, more than I need) by removing all file attributes. I'd just like to get verification that my interpretation is correct.
2
=
I'm going to run my script on a BIBM boot floppy, outside Windows. So maybe I don't need to worry about the overwriting issue--do the standard attribute bits still apply under TBOSDT? I assume TBOSDT does observe FAT file attributes, especially since runs in Protected mode, but again, is that true? Because if not, then I don't need to worry about turning attributes off after all.