WIX 관련 첫번째 포스트입니다.
WIX의 철학(?)은 아직 저에게 익숙하지가 않네요. 어떻게 그 많은 아이템들을 입력해야 하는지(물론 WIX 편집기도 있지만 불편한 점은 어쩔수가 없습니다.)
원문 : http://blogs.microsoft.co.il/blogs/yanush/archive/2008/09/22/howto-use-regsvr32-exe-with-wix.aspx
Last night I had to deal with this issue, in one of the projects I’m involved in.
So, after sifting through some forums, msdn and wix schema reference here is the end result. Its a fairly simple thing… in retrospect! :)
Adding the custom actions:
For those of you who don’t recognize this dll, its a required library by Add-in Express, we are using it to ease our development of GhotIt plug-in(s) for Microsoft Office applications.
So, we have two simple custom actions, the first, silently registers the dll from the installation directory and the second (silently), unregister it.
The first action (RegisterAdx) is also set to fail the installation if not successful, by adding the Return=”check” attribute.
Please note that in both actions the ExeCommand attribute value is decorated with an Apostrophe (‘) instead of a Quotation Mark (“).
This allows us to easily decorate the file statement [INSTALLDIR]adxloader.dll inside the value’s string with quotation marks, since the install directory might include whitespaces in it.
Next, we have to tell the MSI Installer when to execute these actions, Ideally this will happen after the installation finishes copying the files and before the files are deleted during the uninstall process.
Defining the execution “sequence”:
First, although these actions are defined in a “sequence”, there is no real sequence here.
Action RegisterAdx will only execute after the installation is finalized and only if the product isn’t installed (NOT Installed) while action UnregisterAdx will only execute before the installation is initialized and only if the product is already installed (Installed).
WIX의 철학(?)은 아직 저에게 익숙하지가 않네요. 어떻게 그 많은 아이템들을 입력해야 하는지(물론 WIX 편집기도 있지만 불편한 점은 어쩔수가 없습니다.)
원문 : http://blogs.microsoft.co.il/blogs/yanush/archive/2008/09/22/howto-use-regsvr32-exe-with-wix.aspx
Last night I had to deal with this issue, in one of the projects I’m involved in.
So, after sifting through some forums, msdn and wix schema reference here is the end result. Its a fairly simple thing… in retrospect! :)
Adding the custom actions:
1 2 3 4 5 6 7 8 9 | <CustomAction Id="RegisterAdx" Directory="INSTALLDIR" ExeCommand='regsvr32.exe /s "[INSTALLDIR]adxloader.dll"' Return="check"> </CustomAction> <CustomAction Id="UnregisterAdx" Directory="INSTALLDIR" ExeCommand='regsvr32.exe /s /u "[INSTALLDIR]adxloader.dll"'> </CustomAction> | cs |
For those of you who don’t recognize this dll, its a required library by Add-in Express, we are using it to ease our development of GhotIt plug-in(s) for Microsoft Office applications.
So, we have two simple custom actions, the first, silently registers the dll from the installation directory and the second (silently), unregister it.
The first action (RegisterAdx) is also set to fail the installation if not successful, by adding the Return=”check” attribute.
Please note that in both actions the ExeCommand attribute value is decorated with an Apostrophe (‘) instead of a Quotation Mark (“).
This allows us to easily decorate the file statement [INSTALLDIR]adxloader.dll inside the value’s string with quotation marks, since the install directory might include whitespaces in it.
Next, we have to tell the MSI Installer when to execute these actions, Ideally this will happen after the installation finishes copying the files and before the files are deleted during the uninstall process.
Defining the execution “sequence”:
1 2 3 4 | <InstallExecuteSequence> <Custom Action="RegisterAdx" After="InstallFinalize">NOT Installed</Custom> <Custom Action="UnregisterAdx" Before="InstallInitialize">Installed</Custom> </InstallExecuteSequence> | cs |
Action RegisterAdx will only execute after the installation is finalized and only if the product isn’t installed (NOT Installed) while action UnregisterAdx will only execute before the installation is initialized and only if the product is already installed (Installed).
댓글
댓글 쓰기