Archive: how to embed nsis installer into activex control


how to embed nsis installer into activex control
This is sort of off topic, but i'd imagine that others might like to try something like this.. or perhaps others have tried this.

Supposing I'd like to wrap an NSIS installer inside of an ActiveX control for distribution on the internet... how might i do this?

Should I...

figure out how nsis will build instead of an EXE, an activeX compatible DLL / OCX?

or package the nsis installer exe inside of a cab with a basic activex control that would just execute the installer exe when loaded? ( does activex allow this?? )

or is there a way for activex to directly use an executable rather than the ocx / dll?

or should i just give this up & write my own ActiveX downloader that would download & execute the installer.

( this nsis installer that i'd like to wrap will be small & will just load the actual program files that the installer needs )

thanks -
matt

fullscreen.com

:wq


Re: how to embed nsis installer into activex control
>> Supposing I'd like to wrap an NSIS installer inside of an ActiveX control for distribution on the internet... how might i do this?

I saw somewhere once someone running an EXE from the INF located in a CAB, but never tried myself.

More importantly, I think this is going backwards: Since we rewrote our VB desktop applications as ActiveX controls, we needed a foolproof way to
- allow IE to download controls without prompting the user each time,
- add our site to the list of Trusted sites so that users would not be prompted but only when visiting our site
- make sure all the prerequisites were installed (ie. VB runtime, additional OCX's, etc.)

So I wrote a small NSIS script that checks all this, downloads missing stuff. We've successfully used it with about ten customers now, and believe me, if _they_ used it successfully, anybody can :-D

I upload the script and the INI file that contains version numbers of each OCX here:

http://ypsolog.com/temp/nsis/

Since the comments are in French, drop me a line if you're stuck and figure it out.

I'm now working on writing a BBS version using the Sax ActiveX control so that users who don't have the Net can connect to our ProWin BBS and download updates. I'm stuck at how to call an ActiveX control from NSIS, but I'm working on it :-)

Fred.


Hi Fred --
I don't think i've ever met a Frenchman by the name of Fred. Fredrique? ;)

Thanks for your tips & code.

What i'm looking for is just a way to distribute an NSIS installer as an activeX control -- basically. or somehow use an activex downloader as a bootstrap -- to first download my installer, then run it.

I want to avoid the "potentially malicious code" warning that IE gives when you download an .exe file. I'd rather have the ActiveX dialog. Thats the only difference that I'm trying to overcome.

Its not an issue for most -- but for my app, i'd like to go the activex route.

Has anyone created a simple download & execute activex control? wonder if i could find some source somewhere. man i'm lazy.

thanks -
matt


>> I want to avoid the "potentially malicious code" warning that IE gives when you download an .exe file. I'd rather have the ActiveX dialog. Thats the only difference that I'm trying to overcome.

The user will get this warning when they open a page that contains an ActiveX control. Either you ask them to click on OK every time they view your page, or tell them to add your site to the list of Trusted Sites and set IE to not display this prompt when viewing pages from sites listed in Trusted Sites. Our users are not computer-savvy enough to ask them to do this, hence my NSIS setup script that does all this for them. If your users are smarters, your plan is OK, ie. build a dummy OCX that calls a CAB, which contains an INF, which might be able to run an EXE automagically :

"I had to change my inf file, for a particular EXE that I needed run automatically. I changed the RegisterServer= line from No to Yes, and rebuilt the CAB file. This executed the EXE that I was trying to run."

http://www.google.com/groups?threadm...ta.digital.com

Here's what the INF in your CAB might look like:


;DestDir can be 10 for \Windows, 11 for Windows\System(32) or left blank to mean Occache

[version]
signature="$CHICAGO$"
AdvancedINF=2.0

[Add.Code]
DUMMY.OCX=DUMMY.OCX
SETUP.EXE=SETUP.EXE

[DUMMY.OCX]
file-win32-x86=thiscab
RegisterServer=yes
clsid={BAF08E86-0ED3-473B-B8F7-6118840E738B}
DestDir=10
FileVersion=1,0,0,0

[SETUP.EXE]
file-win32-x86=thiscab
RegisterServer=no
DestDir=10


HTH
Fred.

thank you very much fredrique - i'll try this today and let the list know what kind of solution i end up with.

matt