VB6 Command() doesn't work in Win2008 Task Scheduler RRS feed

  • Question

  • Hi,

    I am evaluating Win2008 R2 Standard to work on our system.

    We have many .exe written in VB6 and using Command() to gather the input argument to the exe.

    On Win2008 R2 Standard, e.g. \\\schedule\ASch 123 (ASch is the exe and 123 is the argument and ASch.exe simply return the input argument)

    - if we execute above using command prompt, it works fine. Return: 123

    - but, if we execute the .exe under Task Scheduler, it fails. It cannot get the input argument correctly. Return: "\\\schedule\ASch" 123

    - however, if we change to user D:\schedule\ASch 123 in Task Scheduler, it works fine! Return: 123

    Can this be fixed or workaround? Our exe are not always under the local drive!

    Thanks a lot.


    Thursday, June 24, 2010 8:06 AM


  • Luckily that problem is resolved.

    On Task Scheduler,

    - Put ONLY the exe name in "Program/script" without the full path (ASch )

    - Put required arguments as usual in "Add arguments" (123 )

    - Put the program path in "Start in" (\\\schedule\ )

    Then it works!

    Hope this is the correct way on configuring a scheduled job.



    • Marked as answer by L.Joe Thursday, June 24, 2010 10:27 AM
    Thursday, June 24, 2010 10:27 AM