Home > Misc > Unable to install ‘Windows Service’ using installutil.exe

Unable to install ‘Windows Service’ using installutil.exe

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
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: