Problem with ComObject in Web Client mode

Understanding basics of 1C:Enterprise platform. To start working with 1C:Enterprise platform visit Getting started page

#1
People who like this:0Yes/0No
Just came
Rating: 1
Joined: Feb 29, 2012
Company:

Hello,

We try to get ID Hard Disk on client computer.
We used following code:

Code
&AtClient
Procedure ShowHardiskID()

   objService=GetCOMObject("winmgmts:impersonationLevel=impersonate}!\\.\root\CIMV2");
   For Each objDisk In objService.ExecQuery("SELECT * FR OM Win32_DiskDrive")   Do    
       Message(objDisk.DeviceID);
   EndDo;

EndProcedure


On the thin-client runs with no problems, but a web-client to connect fails.
Error message on IE: "COM-object are only supported in Microsoft Internet Explorer".
At Client we used: IE 11 on Windows8.1 .
Please help us to fix this error.

 
#2
People who like this:0Yes/0No
Timofey Bugaevsky
Guest

Joined:
Company:

Hello, Nguyen TH!

Unfortunately, COM objects are not supported in web client. But you can create an add-in for web browser, if you need this, or try to run COM objects on server and return the result to the client.

 
#3
People who like this:0Yes/0No
Active user
Rating: 4
Joined: Nov 19, 2012
Company:

Quote
Timofey Bugaevsky wrote:
Unfortunately, COM objects are not supported in web client.
I think it's wrong.
Or syntax assistant is not accurate.

 
#4
People who like this:0Yes/0No
Timofey Bugaevsky
Guest

Joined:
Company:

Thank you, Alexey, I'm sorry for my mistake.

Yes, you can use COM objects in web client, but only in Microsoft Windows and Microsoft Internet Explorer. You also should allow using ActiveX, add the publication URL to trusted sites and there also might be other limitations like using 64bit Internet Explorer for COM objects of 64bit Microsoft Office, for example.

Thus it is still better to use other methods for web client to make the application that will run on other browsers.

 
#5
People who like this:0Yes/0No
Just came
Rating: 1
Joined: Feb 29, 2012
Company:

Thanks Timofey,

The problem has been solved. I have DiskID by other way.
1. First: I used the function: RunApp("cmd /c wmic DiskDriver get DeviceID >c:\Disk.txt") to write disk information to the file, for example: "c:\Disk.txt"
2. Then: Read data from file "c:\Disk.txt" .

Thank you for kindly help!

 
Subscribe
Users browsing this topic (guests: 1, registered: 0, hidden: 0)
Be the first to know tips & tricks on business application development!

A confirmation e-mail has been sent to the e-mail address you provided .

Click the link in the e-mail to confirm and activate the subscription.