Working on JScript/VBScript support for MSI

Misha Koshelev mk144210 at
Tue Feb 20 15:53:03 CST 2007

On Tue, 2007-02-20 at 21:44 +0000, Robert Shearman wrote:
> Misha Koshelev wrote:
> > Hi, since MSDN states that any installer that requires JScript/VBScript
> > must make sure to install it, and since some applications require these
> > for install (bug #7353 and another one is there for VBScript for a
> > different installer), I figure there is no reason why builtin MSI cannot
> > use Microsoft Script if it is there (and plus when we have our own
> > JScript/VBScript we will be able to use it off the bat with MSI). 
> >
> > I have posted my initial work on this on the bugzilla for bug #7353. The
> > first file (a patch, will attach also) is my patch which updates
> > custom.c to have the appropriate handlers for the custom action types,
> > extracts the script from the appropriate place, writes it to a file, and
> > uses a framework very similar to the current thread framework for DLLs
> > to call my helper call_script function. This first patch, in theory,
> > should not have to change much (if at all), although I have not
> > thoroughly tested it yet so it probably will. 
> >
> > The second file (and attached here too) is dlls/msi/script.c, which is
> > where the meat and potatoes of the actual call_script function is/will
> > be. Right now it is pretty barebones, but it does load the script from
> > the file and calls it appropriately.
> >
> > Now I am working on implementing the Session object, although it looks
> > like a wrapper around MSI functions we already have so I think it should
> > be doable.
> >
> > Anyways, any comments on my work so far will be appreciated.
> >   
> Nice work! Does MSI expose any builtin objects to the scripts (a quick 
> Google search indicates there should be a Session object exposed)?

Thanks. It exposes a Session object, which is the next thing I have to
work on. Actually the object seems to be a wrapper around all the
functions MSI exposes as a Dll, and should not be _too_ much work to
implement. I can get an .idl from oleview on the native MSI that has the
appropriate objects with a slight bugfix in oleview (tonight I am going
to delve a little more into that to figure out if it proper and if so
will submit a patch), and then I just have to implement each function as
a call to the appropriate Msi... function, which shouldn't be too bad. I
do have a dayjob though, so my estimated ETA for this is probably going
to be in a bit though (I am thinking couple of weeks).


More information about the wine-devel mailing list