Hi all,
I have one .exe file this file i have running through command prompt, But I need to run this file through navision. So basically I need how to run Command prompt through Navision.
NAV Version = 2016. Please Help.
Hi all,
I have one .exe file this file i have running through command prompt, But I need to run this file through navision. So basically I need how to run Command prompt through Navision.
NAV Version = 2016. Please Help.
This is not too easy.
First, be aware that the code will most probably run at the server and, depending on the user the NAV Services runs with, might have insufficient rights to perform the actions you want.
StartupInfo := StartupInfo.ProcessStartInfo(CommandLine, Arguments);
Process := Process.Start(StartupInfo);
WHILE NOT Process.WaitForExit(10000) DO;
EXIT(Process.ExitCode);
Process = DotNnet System.Diagnostics.Process.‘System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089’
StartupInfo = System.Diagnostics.ProcessStartInfo.‘System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089’
Check out this link
https://rockwithnav.wordpress.com/2017/02/16/off-the-topic-shutdown-machine-from-nav/
Just in parameter pass
Process.Start("calc");
Calling inside Command will be a different topic.