Running a Windows Application through InfoPath - InfoPath Dev
in

InfoPath Dev

Running a Windows Application through InfoPath

Last post 07-31-2007 04:31 AM by galliumarsenide. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 07-02-2007 11:39 AM

    Running a Windows Application through InfoPath

    I am looking for a way to run a windows app. through JScript code in InfoPath.  I know this can be done through using a fully trusted form, but the way I have my form set up will mess up things if I change it to a fully trusted form.  My form is a domain level secure form, and so the code will need to work for that.  If anyone knows some code that I can write to open this application up through InfoPath that would be greatly appreciated.  Thanks very much for your time and input.
  • 07-02-2007 04:01 PM In reply to

    Re: Running a Windows Application through InfoPath

    Well, the domain level settings were designed explicitly to prevent you from doing want you want so if you find a way you will essentially expose a security bug in InfoPath! :)

    Having said that, I once faced a similar problem where I needed to open a URL on a button click. I tried doing this in code by doing a shell exec and it failed miserably with a security exception. The workaround I found was to use a hyperlink instead of a button. A sort of an ugly workaround could be inserting a hyperlink in your solution (pointing to your application) and asking the user to click it. The fact that the user has to take an explicit action makes it a tiny little bit more secure I guess :)

     I don't think you can get a link to open up automatically, though, there has to be user action. It's probably either this or full-trust.

    David Airapetyan / Software Services Architect
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 07-03-2007 06:37 AM In reply to

    Re: Running a Windows Application through InfoPath

    Here is some code to run an app. through InfoPath using JScript on a fully trusted form.

     

    var shell = new ActiveXObject("WScript.Shell")

    var path = "\"C:Program Files\\Folder\\Folder\\Program.exe";

    var oExec = shell.run(path); 

     

    Hope this helps anyone. 

     

  • 07-31-2007 04:31 AM In reply to

    Re: Running a Windows Application through InfoPath

    wow, thanks mhudsonjr.. that really helped. :D
Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.