Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Install service to server 2012

I developed new service using .net 4.0 c#, I want now to install to hosting server which does not contain visual studio command promot and installUtil.exe . How can Install the service to the server? It is required to install the VS version ?

like image 329
Raed Alsaleh Avatar asked Jan 28 '16 08:01

Raed Alsaleh


People also ask

Is there a service pack for Windows Server 2012?

Answers. Sp1 is avaible for Windows Server 2012 R2,you could install on your server Windows Update tab.


2 Answers

  1. Go to "C:\Windows\System32"

  2. Right click on "cmd.exe" and "Run as administrator"

  3. And run "InstallUtil.exe" like that:

    "C:\Windows\Microsoft.NET\Framework\v4.0.30319\InstallUtil.exe" "C:\src\Service.exe"

    • The first parameter is the full path of InstallUtil.exe

      For 64 bit executables use following:

      C:\Windows\Microsoft.NET\Framework\v4.0.30319\InstallUtil.exe

      For 32 bit executables use following:

      C:\Windows\Microsoft.NET\Framework64\v4.0.30319\InstallUtil.exe

    • The second parameter is the full path of Service.exe to be installed.

like image 111
Mehmet Recep Yildiz Avatar answered Sep 28 '22 11:09

Mehmet Recep Yildiz


I find the solution :

1- copy 'InstallUtil.exe' file to c: dirve in the server.

2- copy to the service execution file to same place.

3- open command promot in 'administrator mode'(run as admin)

4- write the following command : c:\InstallUtil c:\serviceName.exe

Note : ensure that the service and Installer are both 32-bit or 64-bit

like image 38
Raed Alsaleh Avatar answered Sep 28 '22 13:09

Raed Alsaleh