Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Wix Bind Substring or Split

I'm trying to get a Wix installer written that does some TypeLib registration.

I'm already pulling the FileVersion off a registered file elsewhere using

!(bind.FileVersion.#InteropDll)

but I want to do the same thing for the TypeLib, which only has separate MajorVersion and MinorVersion attributes. Ideally, I'd like to do

<TypeLib ... 
    MajorVersion="!(bind.FileVersion.InteropDll).Split('.')[0]" 
    MinorVersion="!(bind.FileVersion.InteropDll).Split('.')[1]">

How can I accomplish this (or the like)? ...Or should I just not bother with all this and invoke regasm on the dll file at install time?

Thanks.

like image 594
Jeff Avatar asked Nov 14 '22 16:11

Jeff


1 Answers

The WiX toolset doesn't support doing that today. It's an interesting feature request. I would never call regasm during an install. It's way to hard to get rollback and patching and all that working correctly by shelling out to an external executable.

like image 76
Rob Mensching Avatar answered Dec 12 '22 03:12

Rob Mensching