Switch to full style
User discussion and information resource forum for scripting of TeraByte products using script lanugages such as TBScript, VBScript, Batch Files, and more.
Forum rules
Post a reply

Overwriting Win system files under BIBM TBOSDT

Mon Apr 29, 2013 9:45 pm

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.

Re: Overwriting Win system files under BIBM TBOSDT

Tue Apr 30, 2013 8:36 am

schmibble wrote:
> 1
> ...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.

Yes. Passing 0 to SetAttr() will remove all the file attributes.

> 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.

If you overwrite a file using the copy command of TBOSDT with the /y switch (while accessing the target partition using 0: or not), then you don't need to take care of the file attributes of the file being erased.

Re: Overwriting Win system files under BIBM TBOSDT

Thu May 02, 2013 12:53 pm

Excellent! Thanks very much.
Post a reply