Archive

Posts Tagged ‘InstallUtil’

Unable to install ‘Windows Service’ using installutil.exe

February 4, 2019 Leave a comment

The other day, I was using Installutil.exe from Command Prompt (refer below command), to install my Windows Service.

C:\Windows\Microsoft.NET\Framework\v4.0.30319>InstallUtil.exe -i “X:\XX\XXX.exe”

Although the tool was giving success response, Windows Service was not getting installed and not being listed in ‘Service Manager’ console.

Alternate Option:

  • While troubleshooting the issue, we came across another option to install the Windows Service using “SC Create

Using SC Create:

To install Windows Service,

  • Open the Command Prompt in ‘Run as administrator’ mode.
  • Below is the syntax using ‘SC Create’ to install the service.

C:\Windows\system32>SC Create “{Your WinService exe name}” binpath=”{Your WinService exe path}” displayname=”{Your desired name}

SCCreate_1

Using SC Delete:

To Uninstall the ‘Windows Service’,

  • Open the Command Prompt in ‘Run as administrator’ mode.
  • Below is the syntax using ‘SC Delete’ to Uninstall the service.

C:\Windows\system32>SC Delete “{Your WinService exe name}

🙂

Advertisement