Results 1 to 1 of 1
  1. #1
    Super Moderator bbearren's Avatar
    Join Date
    Dec 2009
    Polk County, Florida
    Thanked 424 Times in 338 Posts

    Automate TeraByte's Image for Windows with Task Scheduler

    TeraByte's Image for Windows has scripting and a commandline utility that make automating drive/partition images via Task Scheduler pretty painless. The GUI itself will write the basic script which can be copied and edited to make this service fit your unique needs. This is covered in the IFW-User's Guide in the section "Running Image for Windows from the Command Line".

    Start by opening Image For Windows and going through the GUI to make your selections for a drive/partition image. The last screen before the Summary/Start screen captures the script for your selections. Note the "Show Command" button near the bottom.

    Click the "Show Command" button and the selections you've made are seen in script:

    Put a check in the "Save as file" checkbox, click on "OK", and the script becomes highlighted, ready to copy and save in the "\Program Files (x86)\TeraByte Drive Image Backup and Restore Suite" folder. Click "OK" and the "Save as" dialog box opens in that folder, ready to save as a Batch File. Give it a name you prefer and click "Save". I have three partitions that I image regularly, so I have gone through the procedure once for each partition, and saved each as a separate batch file, named accordingly.

    In "Running Image for Windows from the Command Line" in the User's Guide one can find the necessary command structure to edit a batch file. Navigate to your "TeraByte Drive Image Backup and Restore Suite" folder, right-click your batch file and select "Edit". In my case I've edited three files to create a folder on the target drive for my drive images then name the folder and image files using the naming convention to which I am accustomed. I have a dedicated HDD for image files and an existing folder structure for my dual boot desktop and my laptops. The batch file creates a new subfolder in one of these primary folders named YYYY-MM-DD, another subfolder named for the partition being imaged, and the name of the image file itself beginning with MM-DD-YYYY followed by the partition name. Here is one:

    start "" "U:\Program Files (x86)\TeraByte Drive Image Backup and Restore Suite\imagew64.exe" /wait /b /d:w1@0x1 /priority:4 /md /f:"K:\DH87RL10A\$~YYYY$-$~MM$-$~DD$\Win10ProA\$~MM$-$~DD$-$~YYYY$-Win10ProA" /vb

    Commands are separated by either a space or a :

    "/wait" is necessary because I'm going to call three batch files, and each needs to wait until the running batch file finishes
    "/b" is the command to create an image file
    "/d:w1" identifies the HDD where the partition is located
    "@0x1" identifies the partition
    "/priority:4" is the command to use high priority
    "/md" is the command to create a folder
    "/f" is the command to specify the target to store the image file
    "K:\DH87RL10A\" is the target drive\primary folder
    the rest specifies the naming for the newly created folder, subfolder and the image file.
    "/vb" is the command to validate byte-for-byte

    Next I wrote a simple batch file named "Backup10A" to call all three of my partition image batch files (renamed .txt here).

    Call BackupWin10ProA.txt
    Call BackupProg10A.txt
    Call BackupUsers10A.txt

    Each batch file calls for creating a subfolder and naming it YYYY-MM-DD, but after the first batch file creates that subfolder, the next batch file recognizes it and doesn't create a copy, it simply navigates to that folder and completes.

    For automating my drive/partition imaging with Task Scheduler, I followed the basic steps outlined in Setting up Disk Cleanup in Task Scheduler for "Create task", then in the Actions tab in "Start a program" I have "U:\Program Files (x86)\TeraByte Drive Image Backup and Restore Suite\Backup10A.BAT".

    I have it scheduled for weekly drive images of my OS, Programs, and Users partitions. It works very well. Just remember to delete older, outdated image files to maintain enough free disk space for your new image files.
    Last edited by bbearren; 2016-10-13 at 13:49.
    Create a fresh drive image before making system changes, in case you need to start over!

    "The problem is not the problem. The problem is your attitude about the problem. Savvy?"—Captain Jack Sparrow "When you're troubleshooting, start with the simple and proceed to the complex."—M.O. Johns "Experience is what you get when you're looking for something else."—Sir Thomas Robert Deware.
    Unleash Windows

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts