I'm working on automating several aspects of Navision system maintenance. The work is progressing nicely. However I'm having serious trouble getting a navision client started using ScheduledTasks.
In the past we have been using the tools from ExpandIt. These are just not flexible enough. So after some research I discovered AutoIt v3. This nice, well documented scripting language enables me to do anything I want.
So I now have several scripts which can be used to control some batch processing. These all work flawlessly when started from within explorer or a command window. However they won't function when initiated from the ScheduledTasks (Microsoft Windows 2000 [Version 5.00.2195]).
Any one, any idea? I've been struggling to find out what goes wrong but the only thing I can detect is that the Navision client will be started but seems to hang shortly after that. Could this be caused by lack of a controlling tty? (still having difficulty to forget my UNIX background
)
Any suggestions to solve this riddle?
Comments
What you could also use (I use it quite often with AutoIt) is Sanur: it makes it possible to use runas without the need of typing a password. You can download it here: http://www.commandline.co.uk/sanur/
However, I am afraid this isn't the cause of the problem. Like stated in previous mail; the scripts run flawlessly when initiated from commandline or explorer. The user-id I use for scheduled-tasks is the exact same as the one I use to login on the machine and run commandline or explorer.
So as far as I can see, UID's are identical. Further more, the problem is not in getting the navision session up and running but in getting it to terminate after the job is completed.
Still wondering my head off :x
Eric Wauters
MVP - Microsoft Dynamics NAV
My blog