Hi
I am a bit of a newbie in MSI and quite interested in learning how to write a simple CA in VB (not C/C++).
Although I can write straight COM DLLs in VB (for example to read/write to an INI file), I am not quite sure if there's any special requirements for developing a DLL containing a couple of simple CAs in VB (just to get started).
Has anybody done this? What are the additional requirements for getting a VB COM DLL to interact with Windows installer?
I already have some code which I wrote ages ago (a scriptable VB DLL) that will
- read / write to an INI file
- read / write to a REG key (get/set a value name,data etc)
If anyone is kind enough to point me to a simple example project in VB6 on the web, I would be most grateful.
The Platform SDK is C oriented and although I've read the help file and the section on VB automation, it doesn't seem very helpful. If I've missed something please tell me!
thx in advance.
DK
This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
CA in VB - how to?
Started by
dkay
, Jun 25 2003 20:28
5 replies to this topic
Posted 25 June 2003 - 23:03
Can't you use VBScript for that? You can get access to session object and go from there.
You can run ActiveX DLL developed in VB but that requires registering them, running the DLL and later unregistering them
Also mind that some OSs don't have VB runtime like 98,NT
my $0.02
paracha3
You can run ActiveX DLL developed in VB but that requires registering them, running the DLL and later unregistering them
Also mind that some OSs don't have VB runtime like 98,NT
my $0.02
paracha3
Posted 26 June 2003 - 08:39
The DLL custom action type only work with "real" DLLs (i.e. created with C) not with the ActiveX DLLs that VB creates. You could create an EXE in VB and run that, but you wouldn't have access to the installer session with this method (can't read properties etc). So VBScript may be a better option.
Stefan Krüger
InstallSite.org twitter facebook
Posted 26 June 2003 - 08:41
thx for your reply.
I am aware of the fact that I can use VBScript and of the dependency on the vb runtime DLLs.
However, as I mentioned in the OP, I am trying to find out if this is at all possible, and if the ActiveX DLLs in VB will work as they were originally developed or if the code needs to changed in some way (eg return specific values that MSI needs etc).
I plan to use VBScript to call the functions from within the activex dll.
Any ideas?
thx
DK
I am aware of the fact that I can use VBScript and of the dependency on the vb runtime DLLs.
However, as I mentioned in the OP, I am trying to find out if this is at all possible, and if the ActiveX DLLs in VB will work as they were originally developed or if the code needs to changed in some way (eg return specific values that MSI needs etc).
I plan to use VBScript to call the functions from within the activex dll.
Any ideas?
thx
DK
Posted 26 June 2003 - 08:44
Stephan
thx for your reply (even if it's not what I wanted to hear....).
I guess that I had better start learning C..
DK
thx for your reply (even if it's not what I wanted to hear....).
I guess that I had better start learning C..
DK
Posted 26 June 2003 - 08:47
You can call your ActiveX DLL from VBScript. In this case your custom action would be VBScript, so the return code of the DLL doesn't matter to MSI (it will only see your VBScript)
Stefan Krüger
InstallSite.org twitter facebook