Starting Navision as scheduled Task

Laser5000Laser5000 Member Posts: 8
Hi,
i like to start some Navision as Scheduled Task but after Navision is starting i have a grey Navision Window. Not even the blue Window bar or the Menu is displayed!?
The goal is to start some jobs with AutoIt v3. But the problem have nothing to do with AutoIT because i test to start only Navision over a Scheduled Task and got the same problem...

br,
Mathias

Comments

  • Marc5150Marc5150 Member Posts: 9
    Hi,

    I think you need to add a few commands for opening the right company, servername, nettype, etc.

    Greetz,
    Marc
  • matttraxmatttrax Member Posts: 2,309
    Are you saying it's opening a gray scree as in the client opens, but no company is loaded?

    Try a pointer to the NAV executable like this:

    "Drive:\Path\finsql.exe" servername=MyServer, database=MyDatabase, company=MyCompany
  • Laser5000Laser5000 Member Posts: 8
    Hi,
    hui... very fast reply! thanks! ;-)

    I tried the task with and without this comments: servername=FFAICSMB4011:2403, nettype=tcp

    If i start the task on the the logged on user everything is working normally but if the task starts in the background (if the windows-session is locked for example) i have this grey window. I found out that it is only possible to press ESC and then i have the Menubar and can sign in but the Database Logon Window looks very bad. I try to make a screenshot... maybe i should mention that the black squares are NOT painted from me!

    We use the native Database at the moment!

    br,
    Mathias
  • matttraxmatttrax Member Posts: 2,309
    I know there is a bug in NAV that after you've been away for a while or if you lock your computer and come back, the NAV window will be grayed out. If you minimize and maximize the window it will go back to normal.

    Does that sound like the problem you are having?
  • Laser5000Laser5000 Member Posts: 8
    Hm.... a little bit....
    after i press ESC i can't use the Menubar for Login in... only after i Minimize and Maximize the Window the Menubar is working and i can klick everything to get the nice Login-Window.. but i don't think i that the Login will working.
    Principle the start of navision as scheduled Task is probably minimized?!
    We use Client Version 4 SP2. Is a Patch existing for this problem?

    Mathias
  • Marc5150Marc5150 Member Posts: 9
    Try adding "USER=..." or "ntauthentication=yes" to the command line for running the task as a certain user.
  • Laser5000Laser5000 Member Posts: 8
    no this helps not really...
  • Laser5000Laser5000 Member Posts: 8
    Hi,
    i found it.... i can now start the task without a logged on User.
    The Problem was that i have to use ControlSend in my AutoIT Script and not Send because a Scheduled Task can't interact with the Screen.

    Example Script for a Backup with AutoIT:
    run("C:\Program Files\Microsoft Business Solutions-Navision\Client402\fin.exe servername=FFAICSMB4011:2403, nettype=tcp")
    Sleep(2000) 
    Opt("WinTitleMatchMode",2)
    Controlsend("Microsoft Business Solutions-Navision","","","Benutzer{ENTER}Kennwort{ENTER}{ENTER}")
    Controlsend("Microsoft Business Solutions-Navision","","","!a{ESC}{ESC}")
    Controlsend("Microsoft Business Solutions-Navision","","","!xs")
    $sicherung = "Bauvision 402 " & @YEAR & "_" & @MON & "_" & @MDAY
    Controlsend("Microsoft Business Solutions-Navision","","",$sicherung)
    Controlsend("Microsoft Business Solutions-Navision","","","{TAB}")
    Controlsend("Microsoft Business Solutions-Navision","","","\\ffaicsmb4004\navisionsicherung\Bauvision " & @YEAR & "_" & @MON & "_" & @MDAY & "_1.fbk")
    Controlsend("Microsoft Business Solutions-Navision","","","{ENTER}{ENTER}")
    

    if i log on to the user while the backup is running i see nothing (the grey navision screen) like before but it works...

    br,
    Mathias
  • garakgarak Member Posts: 3,263
    @Laser:

    If i understand you shell source correct, u whish to create a backup.
    For this exists, for example, the hotcopy.exe (on product CD) (here a gui for it http://www.mibuso.com/dlinfo.asp?FileID=749 <- need hotcopy.exe, or this little navision internal script viewtopic.php?t=21430 or this tool http://www.mibuso.com/dlinfo.asp?FileID=879

    Regards
    Do you make it right, it works too!
  • Laser5000Laser5000 Member Posts: 8
    Hi,
    backup is only one task... next week i try to make another task for a automated report...

    br
  • garakgarak Member Posts: 3,263
    Laser5000 wrote:
    Hi,
    backup is only one task... next week i try to make another task for a automated report...

    br

    Ok, but why do you use the fbk option and not the Hotcopy option.
    Are u use native or sql?
    Do you mean with "automated report" start a report at, for exampe 11:00pm and print it out? When yes, why do you not use the NAS?
    Do you make it right, it works too!
Sign In or Register to comment.