In "Auditing File Ownership," March 2004, InstantDoc ID 41504, I talked about how to check a file's ownership to determine who created it. To ensure compatibility with Windows NT 4.0 systems, I used the Microsoft Windows NT Server 4.0 Resource Kit's Subinacl command-line tool. Recently, readers have been reporting problems using the latest version of Subinacl, which is available from the Microsoft Download Center (http://www.microsoft.com/downloads/details.aspx?FamilyID=e8ba3e56-d8fe-4a91-93cf-ed6985e3927b&displaylang=en). After spending many hours trying to isolate the source of the problem, I determined that Subinacl's output doesn't work correctly when it's piped to a Find command. This realization prompted me to redesign the script from the ground up, and I was pleasantly surprised by how much simpler the task became.
Removing Dependencies
When using command-line tools that we don't have immediate control over in our scripts, the biggest problem we face is that we rely on these tools' developers to provide a consistent output format. When we write scripts, we want to be able to reliably use a For command to parse the output and get only those fields in which we're interested. However, as newer versions of these tools become available, format changes can potentially break a script. For example, if one version of a command-line tool outputs a username as the third string of text on a line of output, but the subsequent version changes the username output to the fourth string of text, the script that looks for the username will no longer work. You'll have to rewrite it. . . .

