Contributions
Re: WMI-WbemScripting.SwbemLocator problem
Hello Barbara, Thank you for getting back to me. I am using TestComplete 8 Enterprise edition Version 8.70.727.7. Here are other things I have done so far to try and get it to work, still there is no luck. 1 I granted DCOM remote launch and activation permissions for group 2 I granted DCOM remote access permissions 3. In the Control Panel, I clicked Security and then clicked Windows Firewall. 4. I then clicked Change Settings and then clicked the Exceptions tab. 5. In the Exceptions window, I selected the check box for Windows Management Instrumentation (WMI) to enable WMI traffic through the firewall. Egbe1.7KViews0likes0CommentsWMI-WbemScripting.SwbemLocator problem
Hello everyone. I am writing script that will monitor remote machine (Server) memory usage from my local PC. However, the following line of code is giving me nightmares in that, it will return null object. Set objSWbemLocator = CreateObject("WbemScripting.SWbemLocator") I have enabled enabled WMI service. I have also allow Security for Root\CIMV2 by enabling Remote permission in both my local machine and remote server and it still not creating object. I will appreciate any advice and suggestion to overcome this problem. Without creating object, I cannot move forward to connect to the remote server as shown. Set objWMIService = objSWbemLocator.ConnectServer(Computer, _ "root\CIMV2", _ Login, _ Password, _ "MS_409", _ "NTLMDomain:" + strDomain) I will like to add that my Client PC is Windows 7 and Remote Machine is Windows 2008r2 Server. Thank you, Egbe.20KViews0likes3Comments- 12 years agoPlace QAComplete QuestionsQAComplete Questions7.3KViews0likes0Comments
Re: Closing IE or Omitting Warnings from Logs
I am a novice in web services and I am trying to write script in TestComplete to read mail from mail web server. I am at lost at what to do and I will appreciate any help I can get. Below is my code I have so far, and not able to access the Mail Web Server. When I used bugger to look at what is going on, I see an error that says "Could not convert varient of type(olestr) into type (Dispatch) " and the Logfile is all garbage. Please the attached file Thanks for your help. Function ReceiveEMail() Dim objXmlHttp Dim oXmlHttp Dim xmlDOMParams Dim xmlDOMParamsAttachement Dim xmlNdLstDonation, xmlNdLstDonation1 Dim PropstatNodes,xmlGetEmailSubject Dim HrefNodes,XMLBody,XMLResponse Dim StatusNode,NewerVersion Dim str, RdHeader Dim browserVersion Dim NewerbVersion, OlderbVersion '****Client Access Server ***** Const strUrl = "https://mail.sciemetric.com/exchange/ts/inbox" 'URL to CAS Const strUser = "sciemetric\Bob001" 'Domain and Username to authenticate with Const strPassword = ""myExchangeUSeRsP4ssw0rd" ' Const strEmailAddress = "" 'Mailbox that you want to read data from NewerbVersion = "HigherVersion" OlderbVersion = "LowerVersion" Delay(2000) 'Get Browers type and version browserVersion = GetBrowsers() intCompare = StrComp(browserVersion, NewerbVersion, vbTextCompare) if intCompare = 0 Then 'code for IE7+, Firefox, Chrome, Opera, Safari 'xmlhttp=new XMLHttpRequest(); Set objXmlHttp = CreateObject("MSXML2.XMLHTTP") else 'Create An XMLHTTP Object for for IE6, IE5 'objXmlHttp =new ActiveXObject("Microsoft.XMLHTTP") objXmlHttp = CreateObject("Microsoft.XMLHTTP") End if ' MSXML2.ServerXMLHTTP40 Set xmlDOMParams = Sys.OleObject("Msxml2.DOMDocument.4.0") ' Set objXmlDoc = CreateObject("MSXML2.DOMDocument.6.0") 'this will parse the response for us ''****Open and read all the mails of inbox*************' '*.open("PROPFIND", ConnectingURL, False, UserName, PWD) '*.open("DELETE", strurl, False, UserName, PWD) '*.open("GET", strattachmentUrl, False, UserName, PWD) '*.open("X-MS-ENUMATTS", strUrl, False, UserName, PWD) '*******************************************************' Delay(2000) ' objXmlHttp.open "GET",strUrl,False,strUser,strPassword objXmlHttp.open "GET",strUrl,False,strUser,strPassword 'objXmlHttp.setRequestHeader "Depth","1" objXmlHttp.setRequestHeader "Content-Type","xml" objXmlHttp.setRequestHeader "Depth","1" objXmlHttp.send() While objXmlHttp.readyState <> 4 objXmlHttp.waitForResponse 1000 Wend ' if ((objXmlHttp.status = 200) Or (objXmlHttp.status = 0)) Then XMLBody = objXmlHttp.responseBody Log.Message(objXmlHttp.responseBody) Delay(2000) Set XMLResponse = objXmlHttp.responseXML Debug.Write(objXmlHttp.responseXML) 'Get the Attachment str = objXmlHttp.responseText Log.Message(str) 'Load the read mails into XML document''' xmlDOMParams.LoadXml(str) set xmlNdLstDonation1 = xmlDOMParams.GetElementsByTagName("a:href") Log.Message( xmlNdLstDonation1.Item(0)) RdHeader = objXmlHttp.getResponseHeader("Content-Type") Log.Message("Email Header: " & RdHeader) '''Get the list of text descriptions of all the mails''' set xmlNdLstDonation = xmlDOMParams.GetElementsByTagName("e:textdescription") Log.Message(xmlNdLstDonation.Item(0)) '''Get the List of Subjects of all the mails''' set xmlGetEmailSubject = xmlDOMParams.GetElementsByTagName("d:subject") Log.Message(xmlGetEmailSubject.Item(0)) ' else ' End if 'Reset Object to null to free up objects Set objXmlHttp = Nothing Set xmlDOMParams = Nothing End Function1.2KViews0likes0CommentsRe: CDO Configuration error in Windows 7
What is the final solution to this problem report, because I am having the same problem. I got the following error Error: The requested property or feature, while supported, is not available at this time or in this context. Please see the attached screenshot1.3KViews0likes0CommentsCommandline input parameter
Hello Everyone, I am trying to execute the following command line arguments in vbscript that I generally run via the cmd prompt C:\>"C:\Program Files (x86)\Sciemetric\QualityWorX\Archive\Archive.exe" -r "c:\Test001.saj". Here is my how I implemented it in vbscript and it throws the error message "The system cannot find the file specified" Set WshShellExecObj = WshShellObj.Exec("C:\%Program Files (x86)%\Sciemetric\QualityWorX\Archive\Archive.exe"" -r ""C:\Test001.saj") I will appreciate it, if anyone can point out what I am doing wrong or give me a hint either by the correct code how I can accomplish this. I am appended herein a a portion of my code ..... Set WshShellObj = Sys.OleObject("WScript.Shell") getOSType = FindApplicationPath() Log.Message(getOSType) CmdPara = WshShellObj.Run("cmd.exe") If (Sys.Process("cmd").Exists = True) Then Set CmdDialog = Sys.Process("cmd") Set WshShellExecObj = WshShellObj.Exec("C:\%Program Files (x86)%\Sciemetric\QualityWorX\Archive\Archive.exe"" -r ""C:\Test001.saj") End If If WshShellExecObj.Status = 1 Then Do While WshShellExecObj.Status = 1 'WScript.Sleep 100 Delay(100) WshShellExecObj.StdErr.Write(WshShellExecObj.StdErr.ReadAll()) Loop Exit Function else Do While WshShellExecObj.Status = 0 Delay(100) WshShellExecObj.StdOut.Write(WshShellExecObj.StdOut.ReadAll()) Loop End if ..... Thanking you in advance. Egbe.14KViews0likes1Comment