Install Windows Service

How to install a windows service from the form

Page 1 of 1

2 Replies - 4095 Views - Last Post: 18 December 2010 - 07:37 PM Rate Topic: -----

#1 lerning  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 50
  • Joined: 08-August 09

Install Windows Service

Posted 18 December 2010 - 12:49 PM

I was reading how to install a windows service by using InstallUtil but is there a way to install it within the form and not use the visual studio console?
Is This A Good Question/Topic? 0
  • +

Replies To: Install Windows Service

#2 _HAWK_  Icon User is offline

  • Master(Of Foo)
  • member icon

Reputation: 1030
  • View blog
  • Posts: 4,012
  • Joined: 02-July 08

Re: Install Windows Service

Posted 18 December 2010 - 01:52 PM

When I get home I will post how I do it.
cmd.exe is the process you will be using.

This post has been edited by hawkvalley1: 18 December 2010 - 07:45 PM

Was This Post Helpful? 0
  • +
  • -

#3 _HAWK_  Icon User is offline

  • Master(Of Foo)
  • member icon

Reputation: 1030
  • View blog
  • Posts: 4,012
  • Joined: 02-July 08

Re: Install Windows Service

Posted 18 December 2010 - 07:37 PM

Check the path for your InstallUtil.exe
Using mp As New Process
      With mp.StartInfo
        .FileName = "cmd.exe"
        .Verb = "runas"
        .UseShellExecute = False
        .CreateNoWindow = False
        .RedirectStandardInput = True
      End With
      mp.Start()
      mp.StandardInput.WriteLine("C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\InstallUtil.exe " & _
                                 "Win_ServiceC.exe")
      mp.WaitForExit()
      mp.Close()
End Using

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1