Machine Name and IP Address in InfoPath Form - InfoPath Dev
in

InfoPath Dev

Machine Name and IP Address in InfoPath Form

Last post 03-27-2006 01:20 PM by wood. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 03-27-2006 08:35 AM

    • wood
    • Not Ranked
    • Joined on 03-27-2006
    • Posts 2

    Machine Name and IP Address in InfoPath Form

    I'm relatively new to InfoPath and am trying to create a form for helpdesk reporting whereby certain fields such as Machine Name and IP address would be populated when the form is opened. I'm not sure where to begin with this.
    Could anyone offer assistance on this?
  • 03-27-2006 09:09 AM In reply to

    Re: Machine Name and IP Address in InfoPath Form

    Hi wood and welcome to the Forum!

    This sounds like it would require a Full Trust form. Once you have this, you should be able to run command line programs such as ipconfig /all that would give you the information you need. To call the command line programs you will probably need to instantiate a WScript object.
    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 03-27-2006 01:20 PM In reply to

    • wood
    • Not Ranked
    • Joined on 03-27-2006
    • Posts 2

    Re: Machine Name and IP Address in InfoPath Form

    Thanks Matt,

    I've updated the form as Full Trust as suggested and included the following code in the OnLoad function:

    var shell = WScript.CreateObject("WScript.Shell");

    var exec = shell.Exec("ipconfig /all");
    WScript.StdOut.Write(exec.StdOut.ReadAll());

    I'd like the IP Address to output to an expression box but do not know how to do so. Any help would be appreciated.
Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.