subina Posted November 2, 2016 Share Posted November 2, 2016 I am trying to connect to a remote computer. first thing i want the script to do is check that the computer is on the system. i verified that it does by using Ping and the computer name. which gives me the ip address. i used the following code for that, but it returned the error message that the compute could not be located. any ideas on why, as the ping give me a valid ip address. also once this done how do i code the script to connect $ipaddress (found from ping command, not listed here for security reasons) $oWMIService = ObjGet("winmgmts:\\" & $ipAddress & "\root\CIMV2") If Not IsObj($oWMIService) Then MsgBox(48, "ERROR", "Couldn't locate the computer. Please make sure you've selected the correct computer and try again.") Return EndIf Link to comment Share on other sites More sharing options...
spudw2k Posted November 3, 2016 Share Posted November 3, 2016 Try adding a COM Error Handling function to see if you get an actual error code and see what the error code means. Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX BuilderMisc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retreive SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose ArrayProjects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalcCool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF Link to comment Share on other sites More sharing options...
subina Posted November 30, 2016 Author Share Posted November 30, 2016 ty Link to comment Share on other sites More sharing options...
subina Posted December 3, 2016 Author Share Posted December 3, 2016 ty Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now