wix - Replicate Behavior of a Batch File in a Custom Action -
i'm creating wix installer @ work, , need able replicate behavior of batch file in custom action:
start /d "c:\program files (x86)\remindex" instsrv.exe remindexnp "c:\program files (x86)\remindex\srvany.exe"
i trying create service using normal windows application, srvany.exe can do. batch file runs fine normally, can't seem custom action same thing. have tried this:
<customaction id="runnp" filekey="file_installfolder_instsrvexe" execommand="remindexnp [installfolder]srvany.exe" execute="commit" return="ignore"/>
this custom action doesn't cause errors can see in log file, don't think instsrv.exe accepting parameters i'm passing in execommand. know instsrv.exe , srvany.exe exist because i'm running custom action before installfinalize.
anyone know what's wrong custom action?
i prefer not include actual batch file in install folder, have no reason there besides being run on install. have tried including 1 in installer, don't know how reference install directory. when use %cd%, references system folder reason.
i tried using serviceinstall , servicecontrol elements, installer gets stuck on "starting services". here component:
<component id="cmp_remindexnp.exe" guid="{3fb99890-752d-4652-9412-72230695a520}"> <file id="file_installfolder_remindexnpexe" source="remindexnp.exe" keypath="yes"/> <registrykey root="hklm" key="system\currentcontrolset\services\remindexnp\parameters"> <registryvalue id="rg_remnp1" action="write" name="appdirectory" value="[installfolder]" type="string"/> <registryvalue id="rg_remnp2" action="write" name="application" value="[installfolder]remindexnp.exe" type="string"/> </registrykey> <serviceinstall displayname="remindexnp" id="srv_remnp" name="remindexnp" start="auto" type="shareprocess" errorcontrol="ignore"/> <servicecontrol id="srvc_remnp" name="remindexnp" remove="both" start="install" stop="uninstall" wait="no"/> </component>
and log:
action 17:15:08: startservices. starting services action start 17:15:08: startservices. startservices: service: starting services action ended 17:15:08: startservices. return value 1.
any suggestions appreciated.
this trick question don't need custom action. srvany.exe acts service host , such can authored installer using directory, component, file, serviceinstall , (if desired) servicecontrol elements.
Comments
Post a Comment