task scheduler working but no display ?

Discussion in 'Windows 7' started by cetipabo2, May 20, 2015.

  1. cetipabo2

    cetipabo2 MDL Member

    Feb 8, 2015
    240
    50
    10
    Hello,
    i have a win7 64bit machine in a domain, runing a batch file every 2 hours.
    the batch file is doing a ftp connexion to an as400, start a MSACCESS macro and makes another ftp connection to the as400.
    The account used to run the task is the actual account connected.

    when i start the batch manualy, i can see the command prompt window opening and all the commands runing, i see the ftp connection, and access opening and closing.
    But when i manualy run the task from the task scheduler, i don't see the command prompt, i don't see access. but in the task scheduler i can see the status = runing, and in the process exclorer i see that all the applications (ftp, access) are runing in the correct order, so it works but there is nothing on the screen ??

    what could be the problem ?

    Thanks for your help.
     
  2. RogerUK

    RogerUK MDL Novice

    Jan 16, 2010
    31
    10
    0
    From the task scheduler, it is more than likely running in session 0, so you won't see anything on your screen.

    You could try switching to session 0 yourself - rundll32 winsta.dll,WinStationSwitchToServicesSession

    to revert - rundll32 winsta.dll,WinStationRevertFromServicesSession

    You might have to introduce a delay in your task to give you time to do the switch once the task has started
     
  3. cetipabo2

    cetipabo2 MDL Member

    Feb 8, 2015
    240
    50
    10