How to restart a service after PackageGroup in the Chain element - wix

I'm trying to add TeamViewer to my Chain in the BootStrapper. One of the request was that I had to install TeamViewer Silently with no UI but with certain features enabled. After talking to TeamViewer support, they told me to export my registries from my TeamViewer on the target machine, then restart the teamViewer Service.
So I extracted the reg file, use heat to harvest the entries, and created an MSI that pushes the reg values on the target machine.
The next step that I need to do, is restart the teamViewer service.
How do I do that since I'm not installing the service. I looked at RestartResource but didn't find any samples of what I wanted to do, I'll keep searching hoping to find help ...
EDIT
I'm currently testing
<util:RestartResource Id="rrTeamViewerService" ServiceName="TeamViewer9"/>
Rob?

You can use the ServiceControl element in your MSI to control a service you haven't installed.

Related

Idempiere: 'External POS Integration' option not showing up in Menu

I am trying to setup Unicenta POS on my Windows 10 64 bit machine.
My configuration:
Idempiere server v5.1 (http://127.0.0.1:8080/)
ActiveMQ v5.15.2
(http://127.0.0.1:8161/)
POS Integration plugin (Available
here)
I followed instructions given Here. ActiveMQ is running fine, Unicenta can also send request to ActiveMQ, I can see that in Queues. Idempiere server is also running fine.
I installed POS integration plugin through Felix Web Console. It shows up in the list and It is active. But, that plugin doesn't show up in Idempiere Menu option. Either that plugin has some problems or I am missing something.
I also performed Role Access Update on GardenWorld Client Admin but that didn't change anything. Menu option is still missing.
Please help.
The real issue was that 2Pack did not Pack in into the Database. I had install 2Pack manually and Pack In in my SystemAdmin. After that I logged out and logged in with SuperUser credentials and with GardenAdmin role. And then menu item appeared!
2Pack zip file location - Download
How to Pack In:

How do I stop a service at the start of a wix installation?

I'm writing a Wix installer. The first step of this installer is to stop a Windows service. I found the Wix element StopServices in the InstallExecuteSequence that seems to do what I want, but I can't find any example usage of it. Specifically, I don't understand how the service name is specified.
How can I stop a service at the start of my Wix installation (and restart it at the end)?
The internal name (as opposed to the display name) of the service will work. On Windows 10 Task Manager they are the names in the Services tab - that shows the internal name. In the services applet (run services.msc) the properties of a service will show the name and the display name. If you installed the service with WiX ServiceInstall then the internal name is the Name that you used there.
Services have an internal name and a display name, as in the ServiceInstall table in an MSI that installs one:
https://msdn.microsoft.com/en-us/library/windows/desktop/aa371637(v=vs.85).aspx
which is basically a list of parameters to the CreateService API:
https://msdn.microsoft.com/en-us/library/windows/desktop/ms682450(v=vs.85).aspx
APIs and installers that do things to services use that internal name (Name in ServiceInstall and ServiceControl) because the display name is localizable but the internal name stays the same.

Mule ESB Startup Script Parameters

Mule is running as a Windows Service, and when the server is restarted we need the flows to start back up in a very specific manner.
I have edited the bat file located in $HOME\bin\mule.bat
with these parameters:
./mule -app app1:app2:app3 start
However this does not appears to make a difference in the startup.
Here is the answer from Mule.
On Windows
Run as Windows Service:
Follow the next steps to control the order with a system variable.
Stop the windows service.
Create a system variable MULE_STARTUP_ORDER containing the desired order (apps separated by ":") i.e.:APP1:APP2:APP3
Add the next lines to the $MULE_HOME/conf/wrapper.conf file:
wrapper.app.parameter.10=-app
wrapper.app.parameter.11=%MULE_STARTUP_ORDER%
Start the windows service.
The order should be the expected.
Note: With this method you need to manually add/delete applications to the MULE_STARTUP_ORDER variable for them to start
It maybe of help to others running Mule 3.8 Standalone as a Window service, but this worked for me.
Remove the existing Mule service (if it exists) by running the following from the command line
${MULE_HOME}\bin>mule remove
Where ${MULE_HOME} is the directory where Mule is installed
Edit the following file
\Mule\bin\mule.bat
set MULE_OPTS=set.MULE_APP=%MULE_APP%
set.MULE_APP_LONG=%MULE_APP_LONG% set.MULE_HOME="%MULE_HOME%"
set.MULE_BASE="%MULE_BASE%" set.MULE_LIB=%MULE_LIB%
wrapper.working.dir=%_REALPATH% wrapper.app.parameter.1=-app
wrapper.app.parameter.2="appName1:appName2" wrapper.app.parameter.3=%3
wrapper.app.parameter.4=%4 wrapper.app.parameter.5=%5
wrapper.app.parameter.6=%6 wrapper.app.parameter.7=%7
wrapper.app.parameter.8=%8 wrapper.app.parameter.9=%9
Where appName1 and appName2 are the names of my Mule applications in \Mule\apps
Install Mule as a service again
${MULE_HOME}\bin>mule install
Start your Mule service and check the logs to confirm the Mule apps are starting in the order expected.
Finally, if you wished to do the same from the command line, then try
${MULE_HOME}\bin>mule -app=appName1:appName2
Hope that helps!
Where did you found out that would even work?
Have a look over here in the docs about starting/stopping Mule.
https://docs.mulesoft.com/mule-user-guide/v/3.7/starting-and-stopping-mule-esb
As far as i know that isn't possible.
You can change the initial state of your flows in Anypoint Studio to stopped.
That will help you out for the flows that you don't want to start after restart.
However you should start them afterwards manually via MMC or via the API.

"Message Queue service is not available" when service automatically starts after reboot

The services terminate due to MSMQ not being started at the time they're trying to start up, so the obvious solution would be to set the startup type to automatic (delayed). Rather than going with the obvious solution I'm wondering if there's something I'm doing wrong?
I'm using NServiceBus V5 on Win2012 and started to get these messages on all my installed services after I upgraded to V5 from V4. They're installed to start automatically when the server boots up. This hasn't happened before, and the services start normally if I manually start them.
I don't think you're doing anything wrong--I think it's what you suspect: your service is starting up before the Message Queuing Service is ready.
Assuming the NServicebus is running in NServiceBus.Host.exe, in order to get the service to start after MSMQ, there's a switch that needs to be used when installing the service (I used one line, broke it into multiple lines for readability):
.\NServiceBus.Host.exe /install
/servicename:"service"
/displayname:"display"
/dependsOn:"MSMQ"
I had tried "Message Queing" since that's what was in the service control manager, but I guess it doesn't take the display name. I found that MSMQ was the service name by right clicking on the service and viewing the service name field at the top.
You can set service dependencies without having to reinstall.
use the following command: sc config YOURSERVICENAME depend=MSMQ

Can you export protocol types to instal on the live enviroment?

We have successfully setup our first interface on our development environment. when we try to put this live, we get an error stating that "Protocol type "WCF-Custom" not found.". At first we tought this was due to the adapter not being installed on the live but we assured ourselves that this is the case. the only diffrence between the two enviroments now is the fact that we deployed to the test one and are importing the exported msi on the live. Is there a way to also import this protocol?
This is most often caused by not having the WCF Adapter installed. It may be worthwhile to go and and uninstall and reinstall it.
Note also that you have to both import the MSI file into BizTalk and run the MSI file on the live server.
Lastly, verify in the BizTalk Server Administration Console that the WCF-Custom adapter is assigned to a valid BizTalk host, which has a host instance assigned to it. The adapter needs to have a handler for both send and receive.
Make sure the adapter is visible under Platform Settings - Adapter. If it is not there, add it.(After running all the MSI's to install the adapters.) This is what I had to do to get rid of this error. (Except mine said it could not find WCF-SQL in stead of WCF-Custom.)