{"id":337,"date":"2007-10-03T12:05:00","date_gmt":"2007-10-03T19:05:00","guid":{"rendered":"https:\/\/kb.terabyteunlimited.com\/kb-articles\/image-for-windows-fails-to-run-when-invoked-by-the-windows-task-scheduler-2\/"},"modified":"2021-09-07T15:25:31","modified_gmt":"2021-09-07T22:25:31","slug":"image-for-windows-fails-to-run-when-invoked-by-the-windows-task-scheduler-2","status":"publish","type":"lsvr_kba","link":"https:\/\/www.terabyteunlimited.com\/kb\/kb-articles\/image-for-windows-fails-to-run-when-invoked-by-the-windows-task-scheduler-2\/","title":{"rendered":"Image for Windows Fails to Run when Invoked by the Windows Task Scheduler"},"content":{"rendered":"<p><strong><font color=\"#ff5500\">Problem:<\/font><\/strong><\/p>\r\n  <p>While attempting to run Image for Windows using the Windows Task Scheduler <em>without<\/em> the applicable user logged on (i.e. the user under whose context the task is running), the process doesn't seem to run at all.&nbsp; Or, the process starts, but Image for Windows (<font face=\"Courier New\">imagew.exe<\/font>) seems to hang indefinitely.<\/p>\r\n  <p><strong><font color=\"#ff5500\">Cause:<\/font><\/strong><\/p>\r\n  <p>Image for Windows is waiting for user input, but the prompt is not visible due to the process having been invoked by the Task Scheduler.<\/p>\r\n  <p><font color=\"#ff5500\"><strong>Solution:<\/strong><br \/><\/font><br \/>If you are running Image for Windows&nbsp;non-interactively, you will want to have Image for Windows automatically respond to <strong>Yes<\/strong>\/<strong>No<\/strong>, <strong>Abort<\/strong>\/<strong>Retry<\/strong>\/<strong>Ignore<\/strong>, and <strong>OK<\/strong>\/<strong>Cancel<\/strong> prompts that may appear. &nbsp;This can be done&nbsp;using the unattended backup command line parameters supported by Image for Windows (as outlined in the <a href=\"http:\/\/www.terabyteunlimited.com\/downloads\/ifw_en_manual.pdf\">Image for Windows PDF manual<\/a>).<br \/><br \/>Some examples of prompts that could appear and need to be handled by an automatic response:<br \/><\/p>\r\n  <ul>\r\n    <li><strong>Unable to obtain a lock<\/strong> [Abort\/Retry\/Ignore] <\/li>\r\n    <li><strong>Overwrite file?<\/strong> [Yes\/No] <\/li>\r\n  <\/ul>\r\n  <p>A usage example:<br \/><br \/><font color=\"#0000ff\" face=\"Courier New\">imagew.exe \/b \/un \/ui&nbsp;\/d:w0@0x1 \/f:&quot;D:&#92;BACKUP&quot;<\/font><br \/><\/p>\r\n  <p>Where:<\/p>\r\n  <ul>\r\n    <li><font color=\"#0000ff\" face=\"Courier New\">\/un<\/font>&nbsp;instructs Image for Windows to automatically respond <strong>No<\/strong> to all <strong>Yes<\/strong>\/<strong>No<\/strong> prompts, <strong>Cancel<\/strong> to all <strong>OK<\/strong>\/<strong>Cancel<\/strong> prompts, and <strong>Abort<\/strong> to all <strong>Abort<\/strong>\/<strong>Retry<\/strong>\/<strong>Ignore<\/strong> prompts.<br \/><br \/><\/li>\r\n    <li><font color=\"#0000ff\" face=\"Courier New\">\/ui<\/font>&nbsp;instructs Image for Windows to automatically respond <strong>Ignore<\/strong> to all <strong>Abort<\/strong>\/<strong>Retry<\/strong>\/<strong>Ignore<\/strong> prompts. &nbsp;This overrides the effect of the <font color=\"#0000ff\" face=\"Courier New\">\/un<\/font> parameter for&nbsp;<strong>Abort<\/strong>\/<strong>Retry<\/strong>\/<strong>Ignore<\/strong> prompts only.<br \/><\/li>\r\n  <\/ul>\r\n  <p>Another example:<br \/><br \/><font color=\"#0000ff\" face=\"Courier New\">imagew.exe \/b \/uy&nbsp;\/d:w0 \/f:&quot;D:&#92;BACKUP&quot;<\/font><br \/><\/p>\r\n  <p>Where:<\/p>\r\n  <ul>\r\n    <li><font color=\"#0000ff\" face=\"Courier New\">\/uy<\/font>&nbsp;instructs Image for Windows to automatically respond&nbsp;<strong>Yes<\/strong> to all <strong>Yes<\/strong>\/<strong>No<\/strong> prompts,&nbsp;<strong>OK<\/strong> to all <strong>OK<\/strong>\/<strong>Cancel<\/strong> prompts, and&nbsp;<strong>Ignore<\/strong> to all <strong>Abort<\/strong>\/<strong>Retry<\/strong>\/<strong>Ignore<\/strong> prompts.<br \/><br \/><\/li>\r\n  <\/ul>\r\n  <p>Using <font color=\"#0000ff\" face=\"Courier New\">\/ui<\/font>&nbsp;with <font color=\"#0000ff\" face=\"Courier New\">\/uy<\/font>&nbsp;is not necessary, as the use of<font color=\"#0000ff\" face=\"Courier New\">\/uy<\/font> alone results in <strong>Ignore<\/strong> being selected for <strong>Abort<\/strong>\/<strong>Retry<\/strong>\/<strong>Ignore<\/strong> prompts. In other words, <font color=\"#0000ff\" face=\"Courier New\">\/uy<\/font>&nbsp;and <font color=\"#0000ff\" face=\"Courier New\">\/uy<\/font><font color=\"#0000ff\"><font face=\"Courier New\"> <\/font><\/font><font color=\"#0000ff\" face=\"Courier New\">\/ui<\/font> are equivalent.<\/p>\r\n  <p>Please also note that if you have experienced the issue addressed by this article, there may be&nbsp;<font face=\"Courier New\">imagew.exe <\/font>and\/or <font face=\"Courier New\">cmd.exe<\/font> process(es) left running in the background. If this is the case, you may either terminate these process(es) using Task Manager or simply reboot.<\/p>","protected":false},"excerpt":{"rendered":"<p>Problem: While attempting to run Image for Windows using the Windows Task Scheduler without the applicable user logged on (i.e. the user under whose context the task is running), the process doesn&#8217;t seem to run at all.&nbsp; Or, the process starts, but Image for Windows (imagew.exe) seems to hang indefinitely. Cause: Image for Windows is [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"lsvr_kba_cat":[1782],"lsvr_kba_tag":[2127,2147,2145,2144,2146],"class_list":["post-337","lsvr_kba","type-lsvr_kba","status-publish","hentry","lsvr_kba_cat-nt-2k-xp-2003","lsvr_kba_tag-windows","lsvr_kba_tag-windows-2003","lsvr_kba_tag-windows-2k","lsvr_kba_tag-windows-nt","lsvr_kba_tag-windows-xp"],"_links":{"self":[{"href":"https:\/\/www.terabyteunlimited.com\/kb\/wp-json\/wp\/v2\/lsvr_kba\/337","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=337"}],"version-history":[{"count":1,"href":"https:\/\/www.terabyteunlimited.com\/kb\/wp-json\/wp\/v2\/lsvr_kba\/337\/revisions"}],"predecessor-version":[{"id":6111,"href":"https:\/\/www.terabyteunlimited.com\/kb\/wp-json\/wp\/v2\/lsvr_kba\/337\/revisions\/6111"}],"wp:attachment":[{"href":"https:\/\/www.terabyteunlimited.com\/kb\/wp-json\/wp\/v2\/media?parent=337"}],"wp:term":[{"taxonomy":"lsvr_kba_cat","embeddable":true,"href":"https:\/\/www.terabyteunlimited.com\/kb\/wp-json\/wp\/v2\/lsvr_kba_cat?post=337"},{"taxonomy":"lsvr_kba_tag","embeddable":true,"href":"https:\/\/www.terabyteunlimited.com\/kb\/wp-json\/wp\/v2\/lsvr_kba_tag?post=337"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}