Click here to Skip to main content
15,912,504 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I need some help. When i run this code below i need it to connect to a remote computer and pull information from an edm file. if i use the local host it works but when i put a machine(zachary) in stead of using a "." I get "Cannot create activeX component".

Please help...

VB
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

    Dim strComputer As String = TextBox1.Text
    objsh = CreateObject("WScript.Shell")

    ''# Get the Novadigm system folder
    StrSystemDir = GetIdm("system")

    ''# Use ASERVICE.EDM to read
    strObject = StrSystemDir & "Lib\SYSTEM\RADIA\SOFTSRVC\ASERVICE.EDM"

    Dim process = GetObject("winmgmts://zachary/root/novadigm:NVD_Agent")
    Dim method = process.Methods_("GetValue")
    Dim inParameters = method.inParameters.SpawnInstance_()
    inParameters.Path = strObject
    Dim outParameters = process.ExecMethod_("NumberOfInstances", inParameters)
    Dim StrHeaps = (outParameters.InstanceCount)
    num_TextBox.Text = StrHeaps
    For i = 0 To StrHeaps Step +1
        inParameters.Index = i

        inParameters.Property = "ZOBJNAME"
        outParameters = process.ExecMethod_("GetValue", inParameters)
        Dim Value1 As String = outParameters.Value

        inParameters.Property = "ZAVIS"
        outParameters = process.ExecMethod_("GetValue", inParameters)
        Dim Value2 As String = outParameters.Value

        ListView1.Items.Add(Value1).SubItems.Add(Value2)


    Next

End Sub
Posted

 
Share this answer
 
Comments
Espen Harlinn 9-Feb-12 9:07am    
5'ed!
What I did was copy the file to the local machine and edit the file and then when I'm finished it copies back to the machine. This works out great because we found out its better to edit a copy then replace it vice e dieting it directly.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900