I am trying to automate an inventory program so that information can be retrieved from a remote PC then instered into a form to update the information.
On the form I have a textbox and a button currently and what I want to do is have the user supply the host name then click the button to launch a script that launches MSINFO32 on the client side to buid a file for the remote PC. The file will be in XML format and after the file is generated I will use code behind to read the information I want into the form. The issue is getting the script to launch and save the file. Below is one of the ways that I have attempted and seems the most promising but it just does not launch MSINFO32 correctly to start the process of retriving the remote PC's information. I am using the current logged in user for the file name and the file is generated on a network share.
Protected Sub btn_SysInfo_Click(sender As Object, e As System.EventArgs) Handles btn_SysInfo.Click Dim varTargetComputer As String Dim ClientUserName As String Dim oShell As Object varTargetComputer = TB_RemoteComputerName.Text ClientUserName = Page.User.Identity.Name.Replace("Domain\", "") oShell = CreateObject("Wscript.Shell") oShell.Run("MsInfo32.Exe /nfo \\SERVERNAME\Folder\SubFolder\" & ClientUserName & ".xml /Computer " & varTargetComputer) End Sub