#!/bin/sh
# wintool is a doc wrapper for chntpw

# where the chntpw tool is located
CHNTDIR=/opt/beezix/chntpw

# wait for enter key then exit w/good status
goodexit ()
{
    echo
    echo "Smite the enter key to continue."
    read
    echo
    exit 0
}

# wait for enter key then exit w/bad status
badexit ()
{
    echo
    echo "Whack the enter key to continue."
    read
    echo
    exit 1
}

cat <<DOC_HERE

Welcome.  wintool is just a thin documentation wrapper
for the chntpw tool.  chntpw can be used to change or
reset a windows password or edit the registry.

chntpw is a command-line only tool.  After mounting the
desired windows partition read-write (with capive-ntfs),
navigate to the appropriate windows directory, and invoke
thusly:

    chntpw <stuff>

Documentation - such as it is - is found in $CHNTDIR.

I'll invoke the program here to display its help info.
Jab the enter key to do so:

DOC_HERE

read

$CHNTDIR/chntpw

echo
echo "Please open a root shell window to actually use chntpw"

goodexit