Open session navision

KlaasFeenstraKlaasFeenstra Member Posts: 35
Hello, anyone knows a solution to open navision automaticaly using Database identification and automaticaly insert username and password.
I was trying with Batch files and JScript.

When navision is opened and the active window, this script is working to insert the username and password.

var WshShell = WScript.CreateObject("WScript.Shell");
WScript.Sleep(2000);
WshShell.SendKeys("%{TAB}");
WScript.Sleep(1000);
WshShell.SendKeys("U");
WScript.Sleep(1000);
WshShell.SendKeys("S");
WScript.Sleep(1000);
WshShell.SendKeys("E");
WScript.Sleep(1000);
WshShell.SendKeys("R");
WScript.Sleep(1000);
WshShell.SendKeys("{TAB}");
WScript.Sleep(1000);
WshShell.SendKeys("P");
WScript.Sleep(1000);
WshShell.SendKeys("A");
WScript.Sleep(1000);
WshShell.SendKeys("S");
WScript.Sleep(1000);
WshShell.SendKeys("S");
WScript.Sleep(1000);
WshShell.SendKeys("W");
WScript.Sleep(1000);
WshShell.SendKeys("O");
WScript.Sleep(1000);
WshShell.SendKeys("R");
WScript.Sleep(1000);
WshShell.SendKeys("D");
WScript.Sleep(1000);
WshShell.SendKeys("{ENTER}");
WScript.Sleep(1000);
WshShell.SendKeys("{ENTER}");
WScript.Sleep(1000);

The situation is that to make a backup of the server, all applications are closed. Now I want to reopen a Navision session for executing some scheduled jobs.

Thanks!

Answers

  • ara3nara3n Member Posts: 9,256
    Is there a reason why you are not using hotcopy to make copy of the db for backup?

    Also for scheduled jobs, you can use NAS. it comes with one free license.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • KlaasFeenstraKlaasFeenstra Member Posts: 35
    Thank you, our client is taking care of the backup and preferes not to make the Hotcopy. I resolved the problem by rescheduling the jobs and close the application before the backup starts. (NAS is also available for version 2.6?)
  • ara3nara3n Member Posts: 9,256
    Yes. Nas is available in 2.6
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
Sign In or Register to comment.