469,889 Members | 1,519 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,889 developers. It's quick & easy.

ActiveX Self register

Hello... I am developing a MFC ActiveX that I want to self register
when IE promts to Install it.

I have added the VALUE "OLESelfRegister", "\0" to activex's
resource
file (.rc) and I have STDAPI DllRegisterServer(void) method in my
code.
When I build my ActiveX project, the ActiveX is registered fine and
it
work on my machine. If I added to a .cab file(cabarc -s 6144 N
myactivex.cab myactivex.ocx myactivex.inf myactivex) and then sign
it(signtool sign /a myactivex.cab) and I try to display the page from
OTHER machine in my local network, I get a dialog that is asking me
if
I want to install it or not.I click install but the ActiveX is not
displayed.
The object tag is :
object id="MyActiveX1" width="655" height="347" codebase='../../
Applets/myactivex.cab'
classid="CLSID:069B70F6-47F4-4b0a-
B08D-73A9F2F2EB36">
<param name="_Version" value="65536">
<param name="_ExtentX" value="2646">
<param name="_ExtentY" value="1323">
<param name="_StockProps" value="0">
<span style="color: Red; font:
18">ActiveX control failed to load! (Use Internet Explorer
only!)
<br />
Please check browser security
settings.</span>
</objectand the inf file is :
[Add.Code]
myactivex.ocx=myactivex.ocx
myactivex.inf=myactivex.inf
[myactivex.ocx]
file-win32-x86=thiscab
clsid={069B70F6-47F4-4b0a-B08D-73A9F2F2EB36}
RegisterServer=yes
FileVersion=1,0,0,1
[myactivex.inf]
file-win32-x86=thiscab
I am forgeting something?
Thanks!

Aug 23 '07 #1
3 4792
As I recall from about 7 years ago your ActiveX needs to be marked as
SafeForScripting and SafeForInitialization (simply 2 keys in the registry)
Try this article
http://support.microsoft.com/kb/161873/EN-US/

George.

"eusebiu" <Ma**********@gmail.comwrote in message
news:11**********************@i13g2000prf.googlegr oups.com...
Hello... I am developing a MFC ActiveX that I want to self register
when IE promts to Install it.

I have added the VALUE "OLESelfRegister", "\0" to activex's
resource
file (.rc) and I have STDAPI DllRegisterServer(void) method in my
code.
When I build my ActiveX project, the ActiveX is registered fine and
it
work on my machine. If I added to a .cab file(cabarc -s 6144 N
myactivex.cab myactivex.ocx myactivex.inf myactivex) and then sign
it(signtool sign /a myactivex.cab) and I try to display the page from
OTHER machine in my local network, I get a dialog that is asking me
if
I want to install it or not.I click install but the ActiveX is not
displayed.
The object tag is :
object id="MyActiveX1" width="655" height="347" codebase='../../
Applets/myactivex.cab'
classid="CLSID:069B70F6-47F4-4b0a-
B08D-73A9F2F2EB36">
<param name="_Version" value="65536">
<param name="_ExtentX" value="2646">
<param name="_ExtentY" value="1323">
<param name="_StockProps" value="0">
<span style="color: Red; font:
18">ActiveX control failed to load! (Use Internet Explorer
only!)
<br />
Please check browser security
settings.</span>
</objectand the inf file is :
[Add.Code]
myactivex.ocx=myactivex.ocx
myactivex.inf=myactivex.inf
[myactivex.ocx]
file-win32-x86=thiscab
clsid={069B70F6-47F4-4b0a-B08D-73A9F2F2EB36}
RegisterServer=yes
FileVersion=1,0,0,1
[myactivex.inf]
file-win32-x86=thiscab
I am forgeting something?
Thanks!

Aug 23 '07 #2
On Aug 23, 9:28 pm, "George Ter-Saakov" <gt-...@cardone.comwrote:
As I recall from about 7 years ago your ActiveX needs to be marked as
SafeForScripting and SafeForInitialization (simply 2 keys in the registry)
Try this articlehttp://support.microsoft.com/kb/161873/EN-US/

George.

"eusebiu" <MarcuEuse...@gmail.comwrote in message

news:11**********************@i13g2000prf.googlegr oups.com...
Hello... I am developing a MFC ActiveX that I want to self register
when IE promts to Install it.
I have added the VALUE "OLESelfRegister", "\0" to activex's
resource
file (.rc) and I have STDAPI DllRegisterServer(void) method in my
code.
When I build my ActiveX project, the ActiveX is registered fine and
it
work on my machine. If I added to a .cab file(cabarc -s 6144 N
myactivex.cab myactivex.ocx myactivex.inf myactivex) and then sign
it(signtool sign /a myactivex.cab) and I try to display the page from
OTHER machine in my local network, I get a dialog that is asking me
if
I want to install it or not.I click install but the ActiveX is not
displayed.
The object tag is :
object id="MyActiveX1" width="655" height="347" codebase='../../
Applets/myactivex.cab'
classid="CLSID:069B70F6-47F4-4b0a-
B08D-73A9F2F2EB36">
<param name="_Version" value="65536">
<param name="_ExtentX" value="2646">
<param name="_ExtentY" value="1323">
<param name="_StockProps" value="0">
<span style="color: Red; font:
18">ActiveX control failed to load! (Use Internet Explorer
only!)
<br />
Please check browser security
settings.</span>
</objectand the inf file is :
[Add.Code]
myactivex.ocx=myactivex.ocx
myactivex.inf=myactivex.inf
[myactivex.ocx]
file-win32-x86=thiscab
clsid={069B70F6-47F4-4b0a-B08D-73A9F2F2EB36}
RegisterServer=yes
FileVersion=1,0,0,1
[myactivex.inf]
file-win32-x86=thiscab
I am forgeting something?
Thanks!- Hide quoted text -

- Show quoted text -
Thanks for your answer...
I;ve marked the ActiveX SafeForInitialization and
SafeForInitialization but it isn't work... :(

Aug 23 '07 #3
For security reasons, inspite of the object safety interfaces, you will
always get a security prompt. I know of no way to override that. ActiveX
controls can't simply install themselves on the end-user system without
their knowledge.

--
Regards,
Alvin Bruney
------------------------------------------------------
Shameless author plug
Excel Services for .NET - MS Press
Professional VSTO 2005 - Wrox/Wiley
OWC Black Book www.lulu.com/owc

"eusebiu" <Ma**********@gmail.comwrote in message
news:11*********************@e9g2000prf.googlegrou ps.com...
On Aug 23, 9:28 pm, "George Ter-Saakov" <gt-...@cardone.comwrote:
>As I recall from about 7 years ago your ActiveX needs to be marked as
SafeForScripting and SafeForInitialization (simply 2 keys in the
registry)
Try this articlehttp://support.microsoft.com/kb/161873/EN-US/

George.

"eusebiu" <MarcuEuse...@gmail.comwrote in message

news:11**********************@i13g2000prf.googleg roups.com...
Hello... I am developing a MFC ActiveX that I want to self register
when IE promts to Install it.
I have added the VALUE "OLESelfRegister", "\0" to activex's
resource
file (.rc) and I have STDAPI DllRegisterServer(void) method in my
code.
When I build my ActiveX project, the ActiveX is registered fine and
it
work on my machine. If I added to a .cab file(cabarc -s 6144 N
myactivex.cab myactivex.ocx myactivex.inf myactivex) and then sign
it(signtool sign /a myactivex.cab) and I try to display the page from
OTHER machine in my local network, I get a dialog that is asking me
if
I want to install it or not.I click install but the ActiveX is not
displayed.
The object tag is :
object id="MyActiveX1" width="655" height="347" codebase='../../
Applets/myactivex.cab'
classid="CLSID:069B70F6-47F4-4b0a-
B08D-73A9F2F2EB36">
<param name="_Version" value="65536">
<param name="_ExtentX" value="2646">
<param name="_ExtentY" value="1323">
<param name="_StockProps" value="0">
<span style="color: Red; font:
18">ActiveX control failed to load! (Use Internet Explorer
only!)
<br />
Please check browser security
settings.</span>
</objectand the inf file is :
[Add.Code]
myactivex.ocx=myactivex.ocx
myactivex.inf=myactivex.inf
[myactivex.ocx]
file-win32-x86=thiscab
clsid={069B70F6-47F4-4b0a-B08D-73A9F2F2EB36}
RegisterServer=yes
FileVersion=1,0,0,1
[myactivex.inf]
file-win32-x86=thiscab
I am forgeting something?
Thanks!- Hide quoted text -

- Show quoted text -

Thanks for your answer...
I;ve marked the ActiveX SafeForInitialization and
SafeForInitialization but it isn't work... :(

Aug 26 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by wang xiaoyu | last post: by
1 post views Thread by Craig | last post: by
2 posts views Thread by Iouri | last post: by
7 posts views Thread by Khaled Hussein | last post: by
reply views Thread by eusebiu | last post: by
3 posts views Thread by Lou | last post: by
1 post views Thread by Waqarahmed | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.