[ ax2012 ] called by Csharp

using System;

using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace WpfApplication1
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
}

private void button1_Click(object sender, RoutedEventArgs e)
{
// System.Diagnostics.Process process = new System.Diagnostics.Process();
// System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo();
// startInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
// startInfo.FileName = "cmd.exe";
// startInfo.Arguments = "C:/Program Files (x86)/Microsoft Dynamics AX/60/Client/Bin/Ax32.exe";
// process.StartInfo = startInfo;
// process.Start();

string str = @"C:\Program Files (x86)\Microsoft Dynamics AX\60\Client\Bin\Ax32.exe";
System.Diagnostics.Process process = new System.Diagnostics.Process();
process.StartInfo.FileName = str;
process.StartInfo.Arguments = @"-startupcmd=AutoRun_C:\csharp_prototype\XMLFile1.xml";
process.Start();

}

private void button2_Click(object sender, RoutedEventArgs e)
{
string str = @"C:\Program Files (x86)\Microsoft Dynamics AX\60\Client\Bin\Ax32.exe";
System.Diagnostics.Process process = new System.Diagnostics.Process();
process.StartInfo.FileName = str;
process.StartInfo.Arguments = @"-startupcmd=AutoRun_C:\csharp_prototype\XMLFile2.xml";
process.Start();
}
}
}
<?xml version="1.0" encoding="UTF-8"?>

<AxaptaAutoRun logFile="$HOME\axEXProd.log" version="4.0" exitWhenDone="false">

<Run name="SalesTableListPage" type="displayMenuItem"/>

</AxaptaAutoRun>

more info : http://msdn.microsoft.com/en-us/library/sysautorun.aspx

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s