{"id":295,"date":"2006-07-26T12:15:00","date_gmt":"2006-07-26T19:15:00","guid":{"rendered":"https:\/\/kb.terabyteunlimited.com\/kb-articles\/how-to-run-multiple-imaging-operations-using-image-for-windows-and-the-windows-task-scheduler\/"},"modified":"2021-09-07T15:05:32","modified_gmt":"2021-09-07T22:05:32","slug":"how-to-run-multiple-imaging-operations-using-image-for-windows-and-the-windows-task-scheduler","status":"publish","type":"lsvr_kba","link":"https:\/\/www.terabyteunlimited.com\/kb\/kb-articles\/how-to-run-multiple-imaging-operations-using-image-for-windows-and-the-windows-task-scheduler\/","title":{"rendered":"How to Run Multiple Imaging Operations Using Image for Windows and the Windows Task Scheduler"},"content":{"rendered":"<p>Image for Windows makes it easy to schedule any number of backups using the Windows Task Scheduler by providing a &quot;Schedule Backup&quot; button on the backup options screen.&nbsp; 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&nbsp;scheduled task, you may refer to the article titled <strong><a href=\"https:\/\/www.terabyteunlimited.com\/kb\/?p=271\" target=\"_blank\" rel=\"noopener\">How to Schedule Image for Windows Backups Using Task Scheduler<\/a><\/strong>.<\/p>\r\n  <p>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 <a href=\"http:\/\/www.terabyteunlimited.com\/downloads\/ifwbatv3.zip\">Image for Windows batch process scripts<\/a>. There are two ways to set this up. Each method will be explained below.<br \/><br \/><em>The remainder of this article assumes that you have downloaded the <a href=\"http:\/\/www.terabyteunlimited.com\/downloads\/ifwbatv3.zip\">Image for Windows batch process scripts<\/a> and have a general understanding of how they work.<\/em><br \/><\/p>\r\n  <ul>\r\n    <li><strong>Option 1:<\/strong> Configure the desired profiles, each in a separate copy of <font face=\"Courier New\">Profile.cmd<\/font>, and then create a separate script to <font face=\"Courier New\">CALL<\/font> each <font face=\"Courier New\">Profile.cmd<\/font> in succession.&nbsp; To run all the desired profiles, you would run the script you created.<br \/><br \/><\/li>\r\n    <li><strong>Option 2:<\/strong> Create multiple profiles within a single copy of <font face=\"Courier New\">Profile.cmd<\/font>.&nbsp; To run all the desired profiles, you would simply run <font face=\"Courier New\">Profile.cmd<\/font> as normal.<br \/><\/li>\r\n  <\/ul><strong>Option 1 - Running Separate Copies of Profile.cmd from a Script<\/strong><br \/>\r\n  <ol>\r\n    <li>Configure a separate copy of <font face=\"Courier New\">Profile.cmd<\/font> for each imaging operation you wish to perform, as explained in the <font face=\"Courier New\">ReadMe.txt<\/font> document that is included with the <a href=\"http:\/\/www.terabyteunlimited.com\/downloads\/ifwbatv3.zip\">Image for Windows batch process scripts<\/a>.&nbsp; The recommended approach is to give each copy of <font face=\"Courier New\">Profile.cmd<\/font> a different name and to store all of the profiles in a single directory.<br \/><br \/><font color=\"#ff0000\"><strong>Note:<\/strong><\/font> Be sure to use a different <font face=\"Courier New\">BackupParentDir<\/font> setting for each profile or unexpected results could occur.<br \/><br \/><\/li>\r\n    <li>Use a text editor to create a new script that will invoke each profile in turn.&nbsp; This is done using one <font face=\"Courier New\">CALL<\/font> statement for each profile.&nbsp; Here is an example script:<br \/><br \/><font color=\"#0000ff\" face=\"Courier New\">@echo off &amp; cls &amp; setlocal<br \/>call &quot;C:&#92;Program Files&#92;Image for Windows&#92;Windows.cmd&quot;<br \/>call &quot;C:&#92;Program Files&#92;Image for Windows&#92;Data.cmd&quot;<br \/>call &quot;C:&#92;Program Files&#92;Image for Windows&#92;Media.cmd&quot;<br \/>:: End of script<\/font><br \/><br \/>\r\n      <ul type=\"disc\">\r\n        <li>The <font color=\"#0000ff\" face=\"Courier New\">@echo off &amp; cls &amp; setlocal<\/font> line isn't required, but is recommended.<\/li>\r\n      <\/ul><br \/>\r\n    <\/li>\r\n    <li>Save the script with the <font face=\"Courier New\">.CMD<\/font> extension (e.g. <font face=\"Courier New\">FullDisk.cmd<\/font>).<br \/><br \/><\/li>\r\n    <li>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. <font face=\"Courier New\">FullDisk.cmd<\/font>).&nbsp; To run the profiles manually, simply run that script directly.<br \/><\/li>\r\n  <\/ol><strong>Option 2 - Creating Multiple Profiles Within a Single Copy of Profile.cmd<\/strong><br \/>\r\n  <ol>\r\n    <li>After downloading and extracting the <a href=\"http:\/\/www.terabyteunlimited.com\/downloads\/ifwbatv3.zip\">Image for Windows batch process scripts<\/a>, open the script <font face=\"Courier New\">Profile.cmd<\/font> in a text editor such as Notepad.<br \/><br \/><\/li>\r\n    <li>You will need to duplicate a portion of <font face=\"Courier New\">Profile.cmd<\/font> using the copy and paste functions.&nbsp; Do this by selecting and copying everything beginning with (and including) this line:<br \/><br \/><font color=\"#0000ff\" face=\"Courier New\">:: &lt;---- START OF PROFILE ----&gt;<\/font><br \/><br \/>And ending with (and including) this line:<br \/><br \/><font color=\"#0000ff\" face=\"Courier New\">:: &lt;---- END OF PROFILE ----&gt;<\/font><br \/><br \/><\/li>\r\n    <li>Paste the content you just copied immediately below the last instance of this line:<br \/><br \/><font color=\"#0000ff\" face=\"Courier New\">:: &lt;---- END OF PROFILE ----&gt;<\/font><br \/><br \/>You should end up with the following general <font face=\"Courier New\">Profile.cmd<\/font> content:<br \/><br \/><font color=\"#0000ff\" face=\"Courier New\">:: &lt;---- START OF FIRST PROFILE ----&gt;<br \/><em>(profile content, including SET commands, commented lines, and some other batch commands.)<\/em><br \/><\/font><font color=\"#0000ff\" face=\"Courier New\">:: &lt;---- END OF FIRST PROFILE ----&gt;<br \/><br \/><\/font><font color=\"#0000ff\" face=\"Courier New\">:: &lt;---- START OF SECOND PROFILE ----&gt;<br \/><em>(profile content, including SET commands, commented lines, and some other batch commands.)<\/em><br \/><\/font><font color=\"#0000ff\" face=\"Courier New\">:: &lt;---- END OF SECOND PROFILE ----&gt;<\/font><br \/><br \/>Please note that, as shown above, you can manually enter identifying names for each profile (e.g. &quot;FIRST&quot;, &quot;SECOND&quot;).<br \/><br \/><\/li>\r\n    <li>Repeat step 3 for each additional imaging operation you wish to carry out using the Image for Windows batch process scripts.&nbsp; Each profile (i.e. each imaging operation) must have its own <font face=\"Courier New\">SET<\/font> commands.<br \/><br \/><\/li>\r\n    <li>Configure each profile accordingly.&nbsp; Please refer to the documentation that is included with the batch process scripts (i.e. <font face=\"Courier New\">ReadMe.txt<\/font> and <font face=\"Courier New\">ProfileHelp.txt<\/font>) for more information on configuration.<br \/><br \/><font color=\"#ff0000\"><strong>Note:<\/strong><\/font> Be sure to use a different <font face=\"Courier New\">BackupParentDir<\/font><strong> <\/strong>setting for each profile or unexpected results could occur.<br \/><br \/><\/li>\r\n    <li>In the Windows Task Scheduler, create a new scheduled task and supply the path to the copy of <font face=\"Courier New\">Profile.cmd<\/font> you just configured.&nbsp; Please note that you can rename <font face=\"Courier New\">Profile.cmd<\/font>, if desired, as long as you reference it correctly in Task Scheduler.&nbsp; To run the profiles manually, simply run <font face=\"Courier New\">Profile.cmd<\/font>.<br \/><\/li>\r\n  <\/ol>","protected":false},"excerpt":{"rendered":"<p>Image for Windows makes it easy to schedule any number of backups using the Windows Task Scheduler by providing a &quot;Schedule Backup&quot; button on the backup options screen.&nbsp; 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 [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"lsvr_kba_cat":[1796],"lsvr_kba_tag":[2121],"class_list":["post-295","lsvr_kba","type-lsvr_kba","status-publish","hentry","lsvr_kba_cat-general-information-image-for-windows","lsvr_kba_tag-image-for-windows"],"_links":{"self":[{"href":"https:\/\/www.terabyteunlimited.com\/kb\/wp-json\/wp\/v2\/lsvr_kba\/295","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.terabyteunlimited.com\/kb\/wp-json\/wp\/v2\/lsvr_kba"}],"about":[{"href":"https:\/\/www.terabyteunlimited.com\/kb\/wp-json\/wp\/v2\/types\/lsvr_kba"}],"author":[{"embeddable":true,"href":"https:\/\/www.terabyteunlimited.com\/kb\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.terabyteunlimited.com\/kb\/wp-json\/wp\/v2\/comments?post=295"}],"version-history":[{"count":1,"href":"https:\/\/www.terabyteunlimited.com\/kb\/wp-json\/wp\/v2\/lsvr_kba\/295\/revisions"}],"predecessor-version":[{"id":6403,"href":"https:\/\/www.terabyteunlimited.com\/kb\/wp-json\/wp\/v2\/lsvr_kba\/295\/revisions\/6403"}],"wp:attachment":[{"href":"https:\/\/www.terabyteunlimited.com\/kb\/wp-json\/wp\/v2\/media?parent=295"}],"wp:term":[{"taxonomy":"lsvr_kba_cat","embeddable":true,"href":"https:\/\/www.terabyteunlimited.com\/kb\/wp-json\/wp\/v2\/lsvr_kba_cat?post=295"},{"taxonomy":"lsvr_kba_tag","embeddable":true,"href":"https:\/\/www.terabyteunlimited.com\/kb\/wp-json\/wp\/v2\/lsvr_kba_tag?post=295"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}