Launch external app from menu item
John O'Brien
Hi all,I am having trouble trying to launch an external or batch file or exe with paramater from my new menu item in a have a C# rule.
Can anyone help me out?
Thanks,
John
Paolo Manfrin
Hi John,what's the problem you are having exactly?
Please could you post your code? Thanks paolo
John O'Brien
Hi Paolo,Managed it with the following code..
Didnt know if I needed something special to call the external exe or bat, but its all working now
Thanks,
John
try
{
if(SwissAddonFramework.UI.Dialogs.MessageBox.Show("Create Manual Store Picks", "OK", "Cancel", SwissAddonFramework.UI.Dialogs.MessageBox.Buttons.Button1) == SwissAddonFramework.UI.Dialogs.MessageBox.Buttons.Button1)
{
string fileName = @"C:\Runscript.bat";
System.Diagnostics.Process.Start(fileName);
}
}
catch(System.Exception exe)
{
MessageBox.Show("Error: " + exe.Message, "OK");
}
0
Please sign in to leave a comment.
Comments
0 comments