Skip to content Skip to main navigation Skip to footer

How to Run Multiple Imaging Operations Using Image for Windows and the Windows Task Scheduler

Image for Windows makes it easy to schedule any number of backups using the Windows Task Scheduler by providing a "Schedule Backup" button on the backup options screen.  By default, the /wait parameter is used, which allows Image for Windows to wait if another task is in progress. In the event that you prefer to manually create a scheduled task, you may refer to the article titled How to Schedule Image for Windows Backups Using Task Scheduler.

If, on the other hand, you wish to manually run or schedule multiple backup operations that run from a single script/task, you may use the Image for Windows batch process scripts. There are two ways to set this up. Each method will be explained below.

The remainder of this article assumes that you have downloaded the Image for Windows batch process scripts and have a general understanding of how they work.

  • Option 1: Configure the desired profiles, each in a separate copy of Profile.cmd, and then create a separate script to CALL each Profile.cmd in succession.  To run all the desired profiles, you would run the script you created.

  • Option 2: Create multiple profiles within a single copy of Profile.cmd.  To run all the desired profiles, you would simply run Profile.cmd as normal.
Option 1 - Running Separate Copies of Profile.cmd from a Script
  1. Configure a separate copy of Profile.cmd for each imaging operation you wish to perform, as explained in the ReadMe.txt document that is included with the Image for Windows batch process scripts.  The recommended approach is to give each copy of Profile.cmd a different name and to store all of the profiles in a single directory.

    Note: Be sure to use a different BackupParentDir setting for each profile or unexpected results could occur.

  2. Use a text editor to create a new script that will invoke each profile in turn.  This is done using one CALL statement for each profile.  Here is an example script:

    @echo off & cls & setlocal
    call "C:\Program Files\Image for Windows\Windows.cmd"
    call "C:\Program Files\Image for Windows\Data.cmd"
    call "C:\Program Files\Image for Windows\Media.cmd"
    :: End of script


    • The @echo off & cls & setlocal line isn't required, but is recommended.

  3. Save the script with the .CMD extension (e.g. FullDisk.cmd).

  4. If you wish to run the multiple profiles using the Windows Task Scheduler, create a new scheduled task and supply the path to the script you created above (e.g. FullDisk.cmd).  To run the profiles manually, simply run that script directly.
Option 2 - Creating Multiple Profiles Within a Single Copy of Profile.cmd
  1. After downloading and extracting the Image for Windows batch process scripts, open the script Profile.cmd in a text editor such as Notepad.

  2. You will need to duplicate a portion of Profile.cmd using the copy and paste functions.  Do this by selecting and copying everything beginning with (and including) this line:

    :: <---- START OF PROFILE ---->

    And ending with (and including) this line:

    :: <---- END OF PROFILE ---->

  3. Paste the content you just copied immediately below the last instance of this line:

    :: <---- END OF PROFILE ---->

    You should end up with the following general Profile.cmd content:

    :: <---- START OF FIRST PROFILE ---->
    (profile content, including SET commands, commented lines, and some other batch commands.)
    :: <---- END OF FIRST PROFILE ---->

    :: <---- START OF SECOND PROFILE ---->
    (profile content, including SET commands, commented lines, and some other batch commands.)
    :: <---- END OF SECOND PROFILE ---->

    Please note that, as shown above, you can manually enter identifying names for each profile (e.g. "FIRST", "SECOND").

  4. Repeat step 3 for each additional imaging operation you wish to carry out using the Image for Windows batch process scripts.  Each profile (i.e. each imaging operation) must have its own SET commands.

  5. Configure each profile accordingly.  Please refer to the documentation that is included with the batch process scripts (i.e. ReadMe.txt and ProfileHelp.txt) for more information on configuration.

    Note: Be sure to use a different BackupParentDir setting for each profile or unexpected results could occur.

  6. In the Windows Task Scheduler, create a new scheduled task and supply the path to the copy of Profile.cmd you just configured.  Please note that you can rename Profile.cmd, if desired, as long as you reference it correctly in Task Scheduler.  To run the profiles manually, simply run Profile.cmd.

Was This Article Helpful?

0