i created an Windows Service application on .Net Framework 4.6 and an installation setup of this project. When i compile my project in release mode, it creates setup.exe and my .msi file. Normally, in Windows 10, my setup.exe and windows service works perfectly. But when i try to run the setup.exe in Windows Server 2016, this image is emerging:
I developed a windows service in C#. and my project has Installer, and Setup project.
the setup project, installs service very well and it doesn't have any problem, but when I change project and create other setup, the new setup doesn't install new service, because it's already exist!!! is any way to create setup that it uninstalls the service then install it?
The problem is that upgrades in VS2008 setups and later use installer classes and an install sequence which is 1) Install newer product over older product, use file version checking, run install custom actions 2) Remove the old product running uninstall custom actions and getting rid of files that are no longer used. VS 2005 wasn't like this. So the installer class custom action that installs the service is running when the service already exists. Sometimes you can revert to the VS 2005 upgrade mechanism that removes ALL the older installed files first, including databases etc, so keep that in mind. You can do that by modifying the MSI file with Orca, InstallExecuteSequence table, and re-sequence the RemoveExistingProducts action to immediately after InstallValidate. Otherwise do both these:
Always install the service binary to a fixed location (that means not the browsable Program Files folder). The uninstall custom action for the service should have a condition of NOT UPGRADINGPRODUCTCODE so that an upgrade doesn't try to uninstall it (but a straight uninstall will). It needs to be in a fixed location because this upgrade solution doesn't install or uninstall the service - it just updates the binary - but obviously you don't want service entries referring to a service that has changed location.
In the upgrade have a condition of NOT PREVIOUSVERSIONSINSTALLED on the install custom action for the service. This means it will not try to re-install the service (which is why you get the "already exists" error) but it will update the exe if you have incremented its file version.
Editorial: Installer classes are not required because Windows Installer can do all this for you, which is why this is only ever an issue with VS setup projects. Moving to a tool that uses MSIs ServiceInstall and ServiceControl tables will get you out of the need for any code to install/uninstall/stop/start services.
When you go to properties you could see two type of properties that are Upgrade code and Product Code. Every Time you create/release a new Windows service installer make sure to keep the same Upgrade code but change the Product Code.
Specifies the thumbprint of the service certificate. This value represents a string of two-digit hexadecimal values found in the Thumbprint field of the certificate. This string contains the SHA-1 hash of the certificate. Certificates are used in client certificate-based authentication. Certificates can be mapped only to local user accounts. They don't work with domain accounts.
Digest authentication is supported for HTTP and for HTTPS. WinRM Shell client scripts and applications can specify Digest authentication, but the WinRM service doesn't accept Digest authentication. The default is True.
WinRM isn't dependent on any other service except WinHttp. If the IIS Admin Service is installed on the same computer, then you might see messages that indicate that WinRM can't be loaded before Internet Information Services (IIS). However, WinRM doesn't actually depend on IIS. Those messages occur because the load order ensures that the IIS service starts before the HTTP service. WinRM requires that WinHTTP.dll is registered.
If two listener services with different IP addresses are configured with the same port number and computer name, then WinRM listens or receives messages on only one address. This approach used is because the URL prefixes used by the WS-Management protocol are the same.
I keep getting this message on the target machine: "This installation package cannot be installed by the Windows Installer service. You must install a windows service pack that contains a newer version of the Windows Installer service."
When Neo4j is installed as a service, Java options are stored in the service configuration.Changes to these options after the service is installed will not take effect until the service configuration is updated.For example, changing the setting server.memory.heap.initial_size in neo4j.conf will not take effect until the service is updated and restarted.To update the service, run bin\neo4j windows-service update.Then restart the service to run it with the new configuration.
The same applies to the path to where Java is installed on the system.If the path changes, for example when upgrading to a new version of Java, it is necessary to run the update-service command and restart the service.Then the new Java location will be used by the service.
If you're developing a Windows service with .NET Framework, you can quickly install your service app by using the InstallUtil.exe command-line utility or PowerShell. Developers who want to release a Windows service that users can install and uninstall can use the free WiX Toolset or commercial tools like Advanced Installer, InstallShield, and others. For more information, see Create an installer package (Windows desktop).
If you want to uninstall a service from your computer, don't follow the steps in this article. Instead, find out which program or software package installed the service, and then choose Apps in Settings to uninstall that program. Many services are integral parts of Windows; if you remove them, you might cause system instability.
Edit: I found out how to uninstall an existing service in my installer here:
stackoverflow.com How to install a windows service programmatically in C#? c#, .net, windows-services, setup-project asked by Konstantinos on 08:38AM - 11 Dec 08
The developer edition of ArcGIS Experience Builder supports ArcGIS Online and ArcGIS Enterprise 10.6 and later. There are two services for extending Experience Builder, the server and the client. You will need to have both services running to have your updates load in Experience Builder. To install the developer edition of Experience Builder, complete the following steps for the server install and client install.If you need to install Experience Builder without an internet connection, complete the offline install steps.
Installation of the Windows Installer 4.5 package requires a reboot to successfully update the required binaries.
For more information, view How to obtain Microsoft support files from online services.
While a JRE can be used for the Elasticsearch service, due to its use of a clientVM (as opposed to a server JVM which offers better performance for long-runningapplications) its usage is discouraged and a warning will be issued.
The system environment variable ES_JAVA_HOME should be set to the pathof the JDK installation that you want the service to use. If you upgrade theJDK, you are not required to the reinstall the service but you must set thevalue of the system environment variable ES_JAVA_HOME to the path to the newJDK installation. However, upgrading across JVM types (e.g. JRE versus SE) isnot supported, and does require the service to be reinstalled.
At its core, elasticsearch-service.bat relies on Apache Commons Daemon projectto install the service. Environment variables set prior to the service installation are copied and will be used during the service lifecycle. This means any changes made to them after the installation will not be picked up unless the service is reinstalled.
When installing Elasticsearch on Windows as a service for the first time or running Elasticsearchfrom the command line, you can manually Set the JVM heap size.To resize the heap for an already installed service,use the service manager: bin\elasticsearch-service.bat manager.
The service automatically configures a private temporary directory for useby Elasticsearch when it is running. This private temporary directory isconfigured as a sub-directory of the private temporary directory for the userrunning the installation. If the service will run under a different user, youcan configure the location of the temporary directory that the service shoulduse by setting the environment variable ES_TMPDIR to the preferred locationbefore you execute the service installation.
I would encourage you to look at linux vs windows, linux provides easy setup as a service as well as improved performance over windows. All new features and latest releases are delivered to the linux community first before windows.
The simplest way to install Jenkins on Windows is to use the Jenkins Windows installer.That program will install Jenkins as a service using a 64 bit JVM chosen by the user.Keep in mind that to run Jenkins as a service, the account that runs Jenkins must have permission to login as a service.
When Installing Jenkins, it is recommended to install and run Jenkins as an independentwindows service using a local or domain user as it is much safer than running Jenkinsusing LocalSystem(Windows equivalent of root) which will grant Jenkins full accessto your machine and services.
To run Jenkins service using a local or domain user, specify the domain user name andpassword with which you want to run Jenkins,click on Test Credentials to test your domain credentials and click on Next.
When installing a service to run under a domain user account, the account must have the right to logon as a service. This logon permission applies strictly to the local computer and must be granted in the Local Security Policy.
dd2b598166