water Posted November 6, 2014 Posted November 6, 2014 (edited) Looks like a lot has changed since the original script has been written. A lot of methods and properties in the object model no longer exist or have been changed. Details can be found here. Edited November 7, 2014 by water My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
leighlandwhitehead Posted November 7, 2014 Author Posted November 7, 2014 Hi Water thank you for getting back to me i have tried the following but i am having no luck : Local $oRemoteMedia = ObjCreate("Wmplayer.OCX", $sRemoteComputer,$sRemoteUsername,$sRemotePassword) thanks
water Posted November 7, 2014 Posted November 7, 2014 Take the following script, compile it and run the exe on your local machine. If it works, take the exe to the remote machine. If it works there too, we know the problem is somehow related to the remote execution part. Else it is a remote installation problem. #include <MsgBoxConstants.au3> ; First install our own Error Handler Global $g_nCOMError = 0, $g_oErrObj = ObjEvent("AutoIt.Error", "MyErrFunc") ; Open MediaPlayer Local $oRemoteMedia = ObjCreate("MediaPlayer.MediaPlayer") If @error Then MsgBox($MB_SYSTEMMODAL, "Remote ObjCreate Test", "Failed to open remote Object. Error code: " & Hex(@error, 8)) Exit EndIf ; ------------------------ ; My custom error function Func MyErrFunc() Local $sHexnum = Hex($g_oErrObj.number, 8) MsgBox($MB_SYSTEMMODAL, "", "We intercepted a COM Error!!" & @CRLF & @CRLF & _ "err.description is: " & $g_oErrObj.description & @CRLF & _ "err.windescription is: " & $g_oErrObj.windescription & @CRLF & _ "err.lastdllerror is: " & $g_oErrObj.lastdllerror & @CRLF & _ "err.scriptline is: " & $g_oErrObj.scriptline & @CRLF & _ "err.number is: " & $sHexnum & @CRLF & _ "err.source is: " & $g_oErrObj.source & @CRLF & _ "err.helpfile is: " & $g_oErrObj.helpfile & @CRLF & _ "err.helpcontext is: " & $g_oErrObj.helpcontext _ ) $g_nCOMError = $g_oErrObj.number EndFunc ;==>MyErrFunc , My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
leighlandwhitehead Posted November 7, 2014 Author Posted November 7, 2014 Hi Water , no error message given on either machine many thanks
water Posted November 7, 2014 Posted November 7, 2014 I had another look at your OP. The dash in the following line is correct? Local $sRemoteUsername = "leighlandwtest-\leighland" ; Change this to your username on the remote computer Means: The name of your domain ends with a dash? My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
leighlandwhitehead Posted November 7, 2014 Author Posted November 7, 2014 Hi Water this is correct the machine is a VM and is called "leighlandwtest-" does the remote object work with yourself ? thanks
water Posted November 7, 2014 Posted November 7, 2014 So the user is a local user on this machine, not a domain user? My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
water Posted November 7, 2014 Posted November 7, 2014 does the remote object work with yourself ? I tried and connected to my own computer (the computer where the script was running) and it worked. But I do not know if Windows/AutoIt takes a shortcut in this case. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
leighlandwhitehead Posted November 7, 2014 Author Posted November 7, 2014 So the user is a local user on this machine, not a domain user? yeah the user is local thanks
leighlandwhitehead Posted November 7, 2014 Author Posted November 7, 2014 I tried and connected to my own computer (the computer where the script was running) and it worked. But I do not know if Windows/AutoIt takes a shortcut in this case. ah okay no problem
water Posted November 7, 2014 Posted November 7, 2014 I'm sure you have tried if you can reach the remote computer at all by using Ping or WMI or something like that? My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
leighlandwhitehead Posted November 7, 2014 Author Posted November 7, 2014 I'm sure you have tried if you can reach the remote computer at all by using Ping or WMI or something like that? Hi Water , yeah i can ping the machine and i can remote desktop to the VM
water Posted November 7, 2014 Posted November 7, 2014 Last try (because I have run out of ideas). According to the help file the second subparameter should be the objecttype. Most of the time this is "application". SO could you please try: Local $oRemoteMedia = ObjCreate("MediaPlayer.Application", $sRemoteComputer, $sRemoteUsername, $sRemotePassword) My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
leighlandwhitehead Posted November 7, 2014 Author Posted November 7, 2014 Hi Water sorry i get the following : We intercepted a COM Error!! err.windescription is: invalid class string err.scriptline is: 24 err.number is: 800401f3
water Posted November 7, 2014 Posted November 7, 2014 I just tried on my Windows 7 VM and I get the same error. Strange. Used code: #include <Debug.au3> _DebugSetup() _DebugCOMError() Global $sRemoteComputer = @ComputerName Global $sRemoteUsername = $sRemoteComputer & "\user" Global $sRemotePassword = "password" Local $oRemoteMedia = ObjCreate("Shell.application", $sRemoteComputer, $sRemoteUsername, $sRemotePassword) My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
leighlandwhitehead Posted November 7, 2014 Author Posted November 7, 2014 I just tried on my Windows 7 VM and I get the same error. Strange. Used code: #include <Debug.au3> _DebugSetup() _DebugCOMError() Global $sRemoteComputer = @ComputerName Global $sRemoteUsername = $sRemoteComputer & "\user" Global $sRemotePassword = "password" Local $oRemoteMedia = ObjCreate("Shell.application", $sRemoteComputer, $sRemoteUsername, $sRemotePassword) yeah its weird could this be a possible bug ?
water Posted November 7, 2014 Posted November 7, 2014 It is strange that this line works. But I'm not sure where it is being executed. Local $oRemoteMedia = ObjCreate("Shell.application", $sRemoteComputer) My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
leighlandwhitehead Posted November 7, 2014 Author Posted November 7, 2014 (edited) It is strange that this line works. But I'm not sure where it is being executed. Local $oRemoteMedia = ObjCreate("Shell.application", $sRemoteComputer) Hi Water this seems to run on the local machine regardless of the remote pc as the dllhost.exe file runs never mind doesn't look like it is this process Edited November 7, 2014 by leighlandwhitehead
water Posted November 7, 2014 Posted November 7, 2014 So now I'm out of ideas I searched the forum but didn't find anything useful. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
leighlandwhitehead Posted November 7, 2014 Author Posted November 7, 2014 when i run the script to play a sound it runs locally but not remotely with just the pc name specified because when i deleted the file on my local pc the sound didn't play
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