Excecute a MSDOS command from NAV


Is there any way to excute an MSDOS command with parameters (.NET Console Application) form a Dynamis NAV 5.0 form?

ie. “C:\SMSServer\sendSMS 555632050 Excelltia DEMO TEXT FROM SMSSERVER”

Thank you ver much!


Hi Carlos,

Use the SHELL command

Thanks Dave! Will try !

Hi Carlos,

Like Dave suggests you can use the SHELL command.
I’ve had some issues with it though, so i always use Windows Script Host Object Model.

If you define a variable of type Automation:
WshShell - Automation - ‘Windows Script Host Object Model’.WshShell
It has a method called RUN, that takes 3 parameters.

  1. is the path to the executable or what ever you want to run.
    (Note to prevent security warnings you have to put the path of the file in a text-var)

Try to search for WshShell in the forum, and i’m sure you’ll find a lot of threads on this.