[wix-users] Custom Action to Create and Install a File?

Blair Murri osito at live.com
Thu Feb 6 17:34:40 PST 2020


In a word: yes, for both questions. Look for Bob's blog entry about "semi-custom" actions.

Blair

Get Outlook for Android<https://aka.ms/ghei36>

________________________________
From: wix-users <wix-users-bounces at lists.wixtoolset.org> on behalf of Russell Haley via wix-users <wix-users at lists.wixtoolset.org>
Sent: Sunday, February 2, 2020 11:42:46 AM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Cc: Russell Haley <russ.haley at gmail.com>
Subject: [wix-users] Custom Action to Create and Install a File?

Hi,

I'm pretty chuffed. I have a new installer for my WinLua distribution that
now includes the Lua package manager called LuaRocks and a custom compiler
toolchain using llvm-mingw. My current installer has a CustomAction that
creates a config file for the package manager named for the appropriate
version of Lua. The current version of Lua is 5.3.5, so the config file
needs to be named Config-5.3.lua. I currently save this file under the
install directory of <program files>\WinLua\LuaRocks.  This custom action
runs POST installation so I have the paths I need for creating the contents
of the file. I do not want this file in a user accessible directory.

My questions:

1) Can I use a custom action to create the file before the installation
completes and ADD the config file to the list of files to be removed (I
think that's termed the installer database)?

2) What about things like environment variables? Can I create them based on
installer information prior to the completion of the install process and
have the installer remove them? Specifically I want to create an
environment variable called LUAROCKS_SYSCONFDIR and store the path of the
config-5.3.lua mentioned above. However, the name and path won't be known
until AFTER the file is created? I can already add to the PATH variable
based on the installer paths, but this feels different.

All my source code can be found here:
https://github.com/WinLua/WinLua-Source-Code/tree/master/WinLua-Release3/WinLua-Installer

Regards,
Russell

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/



More information about the wix-users mailing list