ActiveX is not running on the client machine

I'm trying to run the activex control to a simple mailbox greeting. First, I created a class library, and now I have a dll, then I created a HTML-page and call the ActiveX control:

<!DOCTYPE> <html> <head> <title>DemoActiveX</title> </head> <body> <OBJECT id="DemoActiveX" classid="clsid:400DCE17-4B26-4E59-9A88-AF39E2BE4A55"> </OBJECT> <script type="text/javascript"> try { var obj = document.DemoActiveX; if (obj) { alert(obj.SayHello()); } else { alert("Object is not created!"); } } catch (ex) { alert("Some error happens, error message is: " + ex.Description); } </script> </body> </html> 

when I tried it on my machine, I used to log dll using regma / codebase "dll path", and it worked just fine.

The problem is, when I tried to run on a different machine, I performed the following steps: 1) I have created a setup project and add a file dll.

2) I created .inf file and tried two contents:

 [version] signature="$CHICAGO$" AdvancedINF=2.0 [Add.Code] ActiveX.dll=ActiveX.dll [ActiveX.dll] file-win32-x86=thiscab clsid=400DCE17-4B26-4E59-9A88-AF39E2BE4A55 FileVersion=1,0,0,0 

RegisterServer = yes

 [version] signature="$CHICAGO$" AdvancedINF=2.0 [Setup Hooks] install=install [install] run=msiexec.exe /package """%EXTRACT_DIR%\DemoActiveXSetup.msi""" /qn 

3) I have created a .CAB file containing the .inf files and setup.exe 4) Change the object in the HTML page:

 <OBJECT id="DemoActiveX" classid="clsid:400DCE17-4B26-4E59-9A88-AF39E2BE4A55" codebase="ActiveXCAB.CAB" ></OBJECT> = "clsid: 400DCE17-4B26-4E59-9A88-AF39E2BE4A55" <OBJECT id="DemoActiveX" classid="clsid:400DCE17-4B26-4E59-9A88-AF39E2BE4A55" codebase="ActiveXCAB.CAB" ></OBJECT> 

when I tried to open the page on another machine, the request windows opened, which request to open the CAB, when I click yes, nothing happened !!!!! why he does not open the file setup.exe or msi? BTW, when I set the manual installation file works with activeX!

+4
source share
1 answer

I solved the problem :) The problem was as follows:

1) I used to put a file msi or setup.exe in the CAB file, but I have to put the two msi and setup.exe and seek setup.exe file inf

2) an incorrect file format was incorrect, under appropriate:

  [version] signature="$CHICAGO$" AdvancedINF=2.0 [Add.Code] setup.exe=setup.exe [setup.exe] file-win32-x86=thiscab clsid={415D09B9-3C9F-43F4-BB5C-C056263EF270} FileVersion=1,0,0,0 [Setup Hooks] RunSetup=RunSetup [RunSetup] run="%EXTRACT_DIR%\setup.exe" -C056263EF270}  [version] signature="$CHICAGO$" AdvancedINF=2.0 [Add.Code] setup.exe=setup.exe [setup.exe] file-win32-x86=thiscab clsid={415D09B9-3C9F-43F4-BB5C-C056263EF270} FileVersion=1,0,0,0 [Setup Hooks] RunSetup=RunSetup [RunSetup] run="%EXTRACT_DIR%\setup.exe" 

Good luck :)

+3
source

All Articles