Want to run Command Prompt from Navision.

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;

Process = DotNnet System.Diagnostics.Process.‘System, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089’
StartupInfo = System.Diagnostics.ProcessStartInfo.‘System, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089’

Check out this link


Just in parameter pass


Calling inside Command will be a different topic.