[wix-users] Wixtoolset issue #5421 - Update WixShellExec custom action to allow parameters

Russell Haley russ.haley at gmail.com
Tue Feb 6 22:59:04 PST 2018


Hi,

I'm interested in contributing to this issue. It will partially solve
the problem I'm having trying to pass a script file to Lua from the
installer.

wix3/src/ext/ca/wixca/dll/shellexecca.cpp

So from my reading of the tea leaves, the installer handle is passed
in at WixShellExec and the function extracts the value of the
WixShellExecTarget Property - translates it - and feed that to base
shellexec function. in ShellExec, the target file directory is checked
for validity and then that is added to the final call to the System
ShellExecute.

//ShellExecute documentation
https://msdn.microsoft.com/en-us/library/windows/desktop/bb762153(v=vs.85).aspx?f=255&MSPPError=-2147217396

I suppose that new Properties for WixShellExecWorkingDir, and
WixShellExecParameters could be created and extracted in the same
manner as WixShellExecTarget.

Otherwise, I think it would be good to add a single tag such as a
WixShellExecProperty with multiple attributes and an Id so one could
have multiple WixShellExec's in the installer.

However, the simple solution is all I need and "perfection is the
enemy of what is needed". :)

Let me know if I've missed anything. I'll pull the sources in the next
week or two and see if I can get that working. Is there a preference
for the function name? WixShellExec2, WixShellExecParam?

Thanks,

Russ


More information about the wix-users mailing list