How To Install A Service In Windows Server 2012
3 Answers 3
-
Go to "C:\Windows\System32"
-
Right click on "cmd.exe" and "Run every bit ambassador"
-
And run "InstallUtil.exe" like that:
"C:\Windows\Microsoft.Cyberspace\Framework\v4.0.30319\InstallUtil.exe" "C:\src\Service.exe"
-
The outset parameter is the full path of InstallUtil.exe
For 64 bit executables use post-obit:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\InstallUtil.exe
For 32 chip executables employ following:
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\InstallUtil.exe
-
The 2nd parameter is the full path of Service.exe to be installed.
-
answered Jul twenty, 2022 at 11:39
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.
iii- open control promot in 'ambassador mode'(run every bit admin)
iv- write the post-obit control : c:\InstallUtil c:\serviceName.exe
Note : ensure that the service and Installer are both 32-scrap or 64-bit
answered January 28, 2022 at 11:37
Raed AlsalehRaed Alsaleh
1,481 eight gilded badges 26 argent badges 48 bronze badges
ane
I suggest you a minor refactor to implement the whole service using Topshelf and you'll exist able to install your Windows services with no additional tool than the service executable itself.
For example, yourexecutable install
, yourexecutable uninstall
, yourexecutable stop
, yourexecutable start
...
answered Jan 28, 2022 at 8:58
iii
-
Error bulletin appeared. must install using installUtil
Jan 28, 2022 at ix:04
-
@RaedAlsaleh Accept you lot checked the link? I'm suggesting you lot another way of implementing Windows services...
January 28, 2022 at nine:10
-
How can I use install topshlef?
Jan 28, 2022 at nine:21
Non the answer you're looking for? Scan other questions tagged c# .internet windows-services windows-server-2012 or ask your ain question.
Source: https://stackoverflow.com/questions/35056795/install-service-to-server-2012
Posted by: shumakeritth1973.blogspot.com
Y'all don't demand to copy 'InstallUtil.exe'. Information technology'due south already in the following directories: C:\Windows\Microsoft.NET\Framework\v4.0.30319\InstallUtil.exe C:\Windows\Microsoft.NET\Framework64\v4.0.30319\InstallUtil.exe
Jul 20, 2022 at 11:41