Jump to content

Text to GUI


rwright142
 Share

Recommended Posts

OK, this is something that should be obvious to any newby but for some reason it's eluding me. I'm a tech on a help desk and many times I need some basic info from my users like their computer name, IP address, etc. in order for me to troubleshoot them. I wrote a script that gathers is and displays it in a MsgBox but I want to clean it up and display it in a nice sectioned GUI screen. For some reason, I cannot figure out how to display the text in a group.

For example, I would like to create a GUI and in this screen have sections for User Information, Computer Information, and then Network Information. They launch the program and it gathers the info and displays it in their own separate groups.

Here's the code for the MsgBox display:

$mem = MemGetStats()

$varCN = EnvGet("COMPUTERNAME")

$varLogonServer = EnvGet("LOGONSERVER")

$varLS = StringRight($varLogonServer, stringlen($varLogonServer)-2) ;Remove the \\ before the server name for presentation.

$varHomeDrive = EnvGet("HOMEDRIVE")

$varHomeShare = EnvGet("HOMESHARE")

$varHomeFolder = $varHomeDrive & "\" & StringRight($varHomeShare, stringlen($varHomeShare)-2)

$varUserName = EnvGet("USERNAME")

$varUserDomain = EnvGet("USERDOMAIN")

MsgBox(0, "Client Information", "Total physical RAM (MB): " & int($mem[1]/1000) & @CRLF & _

"Available physical RAM (MB): " & int($mem[2]/1000) & @CRLF & _

"Computer Name: " & $varCN & @CRLF & "Logon Server: " & $varLS & @CRLF & _

"Home Folder: " & $varHomeFolder & @CRLF & _

"User Name: " & $varUserName & @CRLF & _

"User Domain: " & $varUserDomain)

I can create the groups but don't know how to display the data in their specific groups.

Thanks in advance for your help.

Edited by rwright142
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...