External Commands from POS, eg calc.exe

NeilCNeilC Member Posts: 7
edited 2009-07-13 in Navision Attain
Hi Folks,

Hoping someone can help me here, I want to run an external command from one of my tills, something like Calc.exe for example, or services.msc.

I think i need to use a shell command but how do i do this from the POS menu?

regards

NeilC

Comments

  • garakgarak Member Posts: 3,263
    edited 2009-07-10
    You need to run an external application from NAV :?:

    If yes, search the forum for WSH.run or WSH.execute

    viewtopic.php?f=5&t=12417


    Regards
    Do you make it right, it works too!
  • ara3nara3n Member Posts: 9,256
    You can use RUNOBJECT command and in parameters specify the CU Number you need to run on POS menu setup.

    Then program you CU to do what it needs to do.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • garakgarak Member Posts: 3,263
    ara3n wrote:
    You can use RUNOBJECT command and in parameters specify the CU Number you need to run on POS menu setup.

    Then program you CU to do what it needs to do.


    :-k

    mhm, i think he will run an external application like calc.exe or notepad.exe ......
    Do you make it right, it works too!
  • NeilCNeilC Member Posts: 7
    ara3n wrote:
    You can use RUNOBJECT command and in parameters specify the CU Number you need to run on POS menu setup.

    Then program you CU to do what it needs to do.

    It's not a CU. What I want to do is set up a button on the tills in my remote sites that will bring them to a citrix login, (which will auto login to my HO) and look at a form which will enable them the see stock levels in all other stores.
  • garakgarak Member Posts: 3,263
    you will start a citrix session from NAV ?
    Do you make it right, it works too!
  • NeilCNeilC Member Posts: 7
    That's the plan......... or should i hang my head in shame? :whistle:
  • garakgarak Member Posts: 3,263
    i say nothing .... :whistle:

    Try this:

    Name	DataType	Subtype	Length
    FileRec	Record	File	
    WSHShell	Automation	'Windows Script Host Object Model'.WshShell	
    MyApp	Text		30
    MyID	Text		30
    
    MyApp := 'Citrix Head Quarter'; //<- it's the name of your citrix App Icon name
    MyID := 'oy6frkiy'; //<- this u find in the folder C:\Document & Settings\Username\Application Data\ICAClient file oy6frkiy.idx without idx ;-) in your system the idx file has not the id oy6frkiy, it has a other name ....
    
    //how to find the file whith using system tabe FILE you know. (File.setrange())
    //now we run citrix:
    
    if isclear(WShShell) then
      create(WSHShell);
    wshShell.exec ('C:\Program Files\Citrix\ICA Client\pn.exe /APP ' + MyApp + ' /PNI ' + MyAppID); //if your pn.exe is in this path
    

    To open there ever on logon a specific form, u can add on CU in Function CompanyOpen the call to the form like:

    UserSetup.get(Userid);
    IF UserSetup."Autorun Form Object ID" <> 0 THEN
    FORM.RUN(UserSetup."Autorun Object ID");

    Regards
    Do you make it right, it works too!
  • NeilCNeilC Member Posts: 7
    garak wrote:
    i say nothing .... :whistle:

    Try this:

    Name	DataType	Subtype	Length
    FileRec	Record	File	
    WSHShell	Automation	'Windows Script Host Object Model'.WshShell	
    MyApp	Text		30
    MyID	Text		30
    
    MyApp := 'Citrix Head Quarter'; //<- it's the name of your citrix App Icon name
    MyID := 'oy6frkiy'; //<- this u find in the folder C:\Document & Settings\Username\Application Data\ICAClient file oy6frkiy.idx without idx ;-) in your system the idx file has not the id oy6frkiy, it has a other name ....
    
    //how to find the file whith using system tabe FILE you know. (File.setrange())
    //now we run citrix:
    
    if isclear(WShShell) then
      create(WSHShell);
    wshShell.exec ('C:\Program Files\Citrix\ICA Client\pn.exe /APP ' + MyApp + ' /PNI ' + MyAppID); //if your pn.exe is in this path
    

    To open there ever on logon a specific form, u can add on CU in Function CompanyOpen the call to the form like:

    UserSetup.get(Userid);
    IF UserSetup."Autorun Form Object ID" <> 0 THEN
    FORM.RUN(UserSetup."Autorun Object ID");

    Regards


    Thanks Garak,

    I'll give that a try.
  • garakgarak Member Posts: 3,263
    on my systems it works .....
    Do you make it right, it works too!
Sign In or Register to comment.