We are switching to use Wise for Windows Installer after many years of using the script based Wise InstallMaster. I thought we were stuffed when I found that the command line compile wouldn't scan folders for added/removed files. Eventually I discoverd that wfwi (the Wise for Windows Installer GUI) is scriptable using OLE.
After a lot of mucking about and consultation of rather incomplete documentation and example (VB) code, I created the following "Hello World" test code which adds a file to the first "Feature", saves the updated .wsi ('source' file), then compiles to generate the .msi (install file).
Note in particular that despite the documentation describing item as a property, it is used as a method to access a given item in a collection ($features->item (0))! Note too that the item index is 0 based.
use strict; use warnings; use Win32::OLE; my $wfwi = Win32::OLE->new ('WFWI.WFWIProject'); $wfwi->Open ('C:\installer\delme.wsi'); my $features = $wfwi->Features (); my $feature = $features->item (0); $feature->AddFile ('C:\source\helloWorld.txt', 'C:\Program Files\targe +t\helloWorld.txt'); my $result = $wfwi->Save ('C:\installer\delme.wsi'); $result = $wfwi->Compile ('C:\installer\delme.msi');
In reply to Automating Wise for Windows Installer - wfwi by GrandFather
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |