Knowledge Base Glossary       Exit
(how to) Search  

Browse by Category
Knowledge Base > Archive > Products > IFD/IFL/IFW - Version 1 > Image for Windows Fails to Run when Invoked by the Windows Task Scheduler

Image for Windows Fails to Run when Invoked by the Windows Task Scheduler

Please note: This article applies to version 1 product(s) only.

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't seem to run at all.  Or, the process starts, but Image for Windows (imagew.exe) seems to hang indefinitely.

Cause:

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.

Solution:

Use the Image Auto Response option of the IFW environment variable, as outlined in the Image for Windows PDF manual.  The recommended method for doing this is to run Image for Windows from a command script, using commands similar to the following:

setlocal
set IFW=IAR:Y

  • The setlocal command serves to localize the environment variable to the script being run.  That is, any environment variables specified after the setlocal command will not be in effect anywhere on the system but the script itself, and only when the script is running.  This is an important consideration if you run Image for Windows interactively, and might not want the environment variable to be in effect.  You can, if desired, explicitly specify the endlocal command, which will end script localization.  If you do not supply the endlocal command, it will be implied automatically when the script is terminated.

  • The set IFW=IAR:Y command will establish the Image Auto Response option, so that prompts will be replied to automatically.

  • If you are using the Image for Windows batch process scripts provided, you do not need to specify setlocal on your own.  The scripts already include this command.  The scripts also provide a location for setting the IAR option.  Please read the documentation included with the scripts.
If you are using the PHYLock add-on with Image for Windows, you may want to configure the Image Auto Response option to handle potential Unable to obtain a lock [Abort/Ignore/Retry] prompts.  This is done simply by adding either an A (to Abort), an I (to Ignore), or an R (to Retry) to the IAR option.  For example:

setlocal
set IFW=IAR:YA

Generally, if you are running Image for Windows (with PHYLock) non-interactively, you will either want to use A (to Abort) or I (to Ignore).  If you specify A, the imaging process will abort if an Unable to obtain a lock [Abort/Ignore/Retry] prompt occurs.  If you specify I, the imaging process will proceed, but without the use of PHYLock.

Please also note that if you have experienced the issue addressed by this article, there may be applicable imagew.exe and/or cmd.exe process(es) running in the background.  If this is the case, you may either terminate these process(es) using Task Manager, or simply reboot.

How helpful was this article to you?


powered by Lore