473,385 Members | 1,392 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

"Automation server can't create Objects" error while accessing the WMI scripts from Linux box

I have an implementation issue with WMI scripts to check the user
machine processor. The implementation is working fine in the local
machine (Windows XP operating system). It is throwing script error in
the DEV environment (Application deployed in the linux box).

Following is the javascript code to detect the processor,

function detectProcessor()
{
var locator = new ActiveXObject
("WbemScripting.SWbemLocator");
var service = locator.ConnectServer(".");
var properties = service.ExecQuery(" SELECT * FROM
WIN32_Processor");
var e = new Enumerator (properties);
for (;!e.atEnd();e.moveNext ())
{
var processor = e.item ();
alert("Processor : " +processor.Name);
}
return processor.Name;
}
When the application is deployed in the linux environment, and the
application invokes the detectProcessor() method, the browser throws an
error message as "Error : Automation server can't create object". (It
fails at the time of ActiveX creation) The above implementation is not
able to create the activeX component in the client machine.

I tried an alternate way as follows:
<object id='locator'
classid='clsid:76A64158-CB41-11D1-8B02-00600806D9B6'>
</object>

The above class id is for the built-in activeX
("WbemScripting.SWbemLocator") in the client windows OS Machine
function detectProcessor(){
var service = locator.ConnectServer();
var properties = service.ExecQuery(" SELECT * FROM
WIN32_Processor");
var e = new Enumerator (properties);
for (;!e.atEnd();e.moveNext ())
{
var processor = e.item ();
alert("Processor : " +processor.Name);
}
return processor.Name;
}
This time the browser throws an exception that "the object doesn't have
the method or support the functionality". This time, the activeX
reference is pointed by the system. It failed to create the service. I
copied the view source code of the browser and saved into a
TestWin.html file. When I opened the html file in the local system, the
function executed without any problems.

Please reply if you know any resolution on this.
Thanks in advance
Krishnakumar

Jul 17 '06 #1
1 14732
I got a fix on that. This was not related with linux - windows problem.
It was security related problem in the IE. The activeX's were not able
to create their instances in the client side because of the IE security
settings. By default, IE doesnt allow to create the active-X
components(eg WBEMLocator) written in winscripts.

we have to make the url as "Trusted". In the menu, Tools -->
InternetOptions --Security --TrustedSites. Click "Sites" and enter
the url in the text box , click add. Now the winscript will executed in
the client machine without any error.

Thanks
Krishnakumar

dr*******@gmail.com wrote:
I have an implementation issue with WMI scripts to check the user
machine processor. The implementation is working fine in the local
machine (Windows XP operating system). It is throwing script error in
the DEV environment (Application deployed in the linux box).

Following is the javascript code to detect the processor,

function detectProcessor()
{
var locator = new ActiveXObject
("WbemScripting.SWbemLocator");
var service = locator.ConnectServer(".");
var properties = service.ExecQuery(" SELECT * FROM
WIN32_Processor");
var e = new Enumerator (properties);
for (;!e.atEnd();e.moveNext ())
{
var processor = e.item ();
alert("Processor : " +processor.Name);
}
return processor.Name;
}
When the application is deployed in the linux environment, and the
application invokes the detectProcessor() method, the browser throws an
error message as "Error : Automation server can't create object". (It
fails at the time of ActiveX creation) The above implementation is not
able to create the activeX component in the client machine.

I tried an alternate way as follows:
<object id='locator'
classid='clsid:76A64158-CB41-11D1-8B02-00600806D9B6'>
</object>

The above class id is for the built-in activeX
("WbemScripting.SWbemLocator") in the client windows OS Machine
function detectProcessor(){
var service = locator.ConnectServer();
var properties = service.ExecQuery(" SELECT * FROM
WIN32_Processor");
var e = new Enumerator (properties);
for (;!e.atEnd();e.moveNext ())
{
var processor = e.item ();
alert("Processor : " +processor.Name);
}
return processor.Name;
}
This time the browser throws an exception that "the object doesn't have
the method or support the functionality". This time, the activeX
reference is pointed by the system. It failed to create the service. I
copied the view source code of the browser and saved into a
TestWin.html file. When I opened the html file in the local system, the
function executed without any problems.

Please reply if you know any resolution on this.
Thanks in advance
Krishnakumar
Jul 21 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Sam | last post by:
Guys facing a strange problem any clue would really rescue me.. i am using a ASP application with following things Server : Intel Xeon (TM) CPU 2GHz, 2GB RAM, 136GB HDD OS : Windows 2000...
0
by: BGS | last post by:
I have a web site (www.on-the-matrix.com) that displays photos in a "slide show" format on ASPX pages that run in an inline frame on an ASP page (or in a separate pop-up window). The ASPX pages...
5
by: Bruce Schechter | last post by:
I just started to develop an ASP.NET application in vs.net 2003 . But each time I try to execute the application (which is basically empty so far), I get a dialog box titled "Microsoft Development...
1
by: gerr | last post by:
Visual studio 2003 "HTTP/1.1 500 Internal Server Error" when trying to create a new Asp.net site with Visual Studio 2003 on localServer/IIS 5.1. Anyone have any new solutions or urls to point me...
1
by: gerr | last post by:
Visual studio 2003 "HTTP/1.1 500 Internal Server Error" when trying to create a new Asp.net site with Visual Studio 2003 on localServer XP Pro/IIS 5.1. Everything worked fine prior to installing...
3
by: ADavidson | last post by:
I'm getting a {"Parser Error: The Runat attribute must have the value Server." } error when I try to get the Server.GetlastError() in the Global.asax codebehind. Why am I getting this? I...
2
by: Andy Chen | last post by:
Hi, When I am using the fowllowing code to open page http://spaces.msn.com/members/mailcall/ .... try{ string url = http://spaces.msn.com/members/mailcall/; HttpWebRequest httpReq = null;...
1
by: Tito Meinrath | last post by:
Hi, I'm really going mad about this! Currently I'm designing a student course on web services. Because I want them to understand what's really going on when web services correspond with each...
0
by: PShark | last post by:
Hi I have a VB6 app that uses MAPI to send and receive emails. My users are able to use the app to send emails successfully, but when there are new emails in the mailbox, the program opens the email...
9
by: billelev | last post by:
I have the following vba code that returns the "date modified" field from a file, specified in filepath: Function GetFileModifiedDate(filepath As String) As Date Dim fs, f Set fs =...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.