0

I run this command in windows command:

dtexec /f package.dtsx


wan't to run that command in windows app,more explain want to write windows application to run command prompt and in the command prompt run that command,how can i write code for that purpose?thank's all.

Mostafiz
  • 7,243
  • 3
  • 28
  • 42
behi behi
  • 137
  • 2
  • 3
  • 11

2 Answers2

2

You can use System.Diagnostics.Process

System.Diagnostics.Process.Start("cmd.exe","/C dtexec /f package.dtsx");
Mostafiz
  • 7,243
  • 3
  • 28
  • 42
-1

You can use like this code-

        string strCmdText;
        strCmdText = "/C Dir";
        System.Diagnostics.Process.Start("CMD.exe", strCmdText);

This code will work to run cmd command using C#.