473,441 Members | 1,452 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,441 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 14736
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.