I'm using a Setup Project in VB.NET 2003 Standard to install a windows
service application. I would like this installer to start the service after
install. How do I do that?
Thanks,
Russ 8 1813
implement a Commit override in your installer class and use
ServiceController to do that.
"Russ Green" <ru**@NO-SPAMrussgreen.net> wrote in message
news:eG**************@TK2MSFTNGP09.phx.gbl... I'm using a Setup Project in VB.NET 2003 Standard to install a windows service application. I would like this installer to start the service
after install. How do I do that?
Thanks, Russ
See the MSDN Topic "Walkthrough: Creating a Windows Service Application in the
Component Designer". Maybe you already did, but that refers to a custom action
that installs your service. In the Install method (override it) use
ServiceController to start it.
(If your company happens to use a commercial tool from InstallShield, Wise etc
etc, you don't need any of the above. They create the right entries in the MSI
file, ServiceInstall and ServiceControl tables, that get the Windows Installer
to do literally all of that stuff without you needing to write code).
--
Phil Wilson [MVP Windows Installer]
----
"Russ Green" <ru**@NO-SPAMrussgreen.net> wrote in message
news:eG**************@TK2MSFTNGP09.phx.gbl... I'm using a Setup Project in VB.NET 2003 Standard to install a windows service application. I would like this installer to start the service after install. How do I do that?
Thanks, Russ
You're right, Commit is a better place than the Install method.
--
Phil Wilson [MVP Windows Installer]
----
"konsu" <ko***@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl... implement a Commit override in your installer class and use ServiceController to do that.
"Russ Green" <ru**@NO-SPAMrussgreen.net> wrote in message news:eG**************@TK2MSFTNGP09.phx.gbl... I'm using a Setup Project in VB.NET 2003 Standard to install a windows service application. I would like this installer to start the service after install. How do I do that?
Thanks, Russ
Thanks for your answers guys. Did it with the following code in
ProjectInstaller.vb
Protected Overrides Sub OnAfterInstall(ByVal savedState As IDictionary)
MyBase.OnAfterInstall(savedState)
Try
Microsoft.VisualBasic.Shell("net start IpNotifyService")
Catch ex As Exception
End Try
End Sub 'OnAfterInstall
"Phil Wilson" <ph*********@unisys.spamcom> wrote in message
news:eJ*************@TK2MSFTNGP10.phx.gbl... See the MSDN Topic "Walkthrough: Creating a Windows Service Application in
the Component Designer". Maybe you already did, but that refers to a custom
action that installs your service. In the Install method (override it) use ServiceController to start it.
(If your company happens to use a commercial tool from InstallShield, Wise
etc etc, you don't need any of the above. They create the right entries in the
MSI file, ServiceInstall and ServiceControl tables, that get the Windows
Installer to do literally all of that stuff without you needing to write code). -- Phil Wilson [MVP Windows Installer] ---- "Russ Green" <ru**@NO-SPAMrussgreen.net> wrote in message news:eG**************@TK2MSFTNGP09.phx.gbl... I'm using a Setup Project in VB.NET 2003 Standard to install a windows service application. I would like this installer to start the service
after install. How do I do that?
Thanks, Russ
Is there a reason why you decided not to use the ServiceController class?
konst
"Russ Green" <ru**@NO-SPAMrussgreen.net> wrote in message
news:uK**************@TK2MSFTNGP12.phx.gbl... Thanks for your answers guys. Did it with the following code in ProjectInstaller.vb
Protected Overrides Sub OnAfterInstall(ByVal savedState As IDictionary)
MyBase.OnAfterInstall(savedState)
Try
Microsoft.VisualBasic.Shell("net start IpNotifyService")
Catch ex As Exception
End Try
End Sub 'OnAfterInstall "Phil Wilson" <ph*********@unisys.spamcom> wrote in message news:eJ*************@TK2MSFTNGP10.phx.gbl... See the MSDN Topic "Walkthrough: Creating a Windows Service Application
in the Component Designer". Maybe you already did, but that refers to a custom action that installs your service. In the Install method (override it) use ServiceController to start it.
(If your company happens to use a commercial tool from InstallShield,
Wise etc etc, you don't need any of the above. They create the right entries in
the MSI file, ServiceInstall and ServiceControl tables, that get the Windows Installer to do literally all of that stuff without you needing to write code). -- Phil Wilson [MVP Windows Installer] ---- "Russ Green" <ru**@NO-SPAMrussgreen.net> wrote in message news:eG**************@TK2MSFTNGP09.phx.gbl... I'm using a Setup Project in VB.NET 2003 Standard to install a windows service application. I would like this installer to start the service after install. How do I do that?
Thanks, Russ
Is there a reason why you decided not to use the ServiceController class?
konst
"Russ Green" <ru**@NO-SPAMrussgreen.net> wrote in message
news:uK**************@TK2MSFTNGP12.phx.gbl... Thanks for your answers guys. Did it with the following code in ProjectInstaller.vb
Protected Overrides Sub OnAfterInstall(ByVal savedState As IDictionary)
MyBase.OnAfterInstall(savedState)
Try
Microsoft.VisualBasic.Shell("net start IpNotifyService")
Catch ex As Exception
End Try
End Sub 'OnAfterInstall "Phil Wilson" <ph*********@unisys.spamcom> wrote in message news:eJ*************@TK2MSFTNGP10.phx.gbl... See the MSDN Topic "Walkthrough: Creating a Windows Service Application
in the Component Designer". Maybe you already did, but that refers to a custom action that installs your service. In the Install method (override it) use ServiceController to start it.
(If your company happens to use a commercial tool from InstallShield,
Wise etc etc, you don't need any of the above. They create the right entries in
the MSI file, ServiceInstall and ServiceControl tables, that get the Windows Installer to do literally all of that stuff without you needing to write code). -- Phil Wilson [MVP Windows Installer] ---- "Russ Green" <ru**@NO-SPAMrussgreen.net> wrote in message news:eG**************@TK2MSFTNGP09.phx.gbl... I'm using a Setup Project in VB.NET 2003 Standard to install a windows service application. I would like this installer to start the service after install. How do I do that?
Thanks, Russ
Interesting - I wonder if there's a command prompt screen popping up?
--
Phil Wilson [MVP Windows Installer]
----
"konsu" <ko***@hotmail.com> wrote in message
news:vr************@corp.supernews.com... Is there a reason why you decided not to use the ServiceController class?
konst
"Russ Green" <ru**@NO-SPAMrussgreen.net> wrote in message news:uK**************@TK2MSFTNGP12.phx.gbl... Thanks for your answers guys. Did it with the following code in ProjectInstaller.vb
Protected Overrides Sub OnAfterInstall(ByVal savedState As IDictionary)
MyBase.OnAfterInstall(savedState)
Try
Microsoft.VisualBasic.Shell("net start IpNotifyService")
Catch ex As Exception
End Try
End Sub 'OnAfterInstall "Phil Wilson" <ph*********@unisys.spamcom> wrote in message news:eJ*************@TK2MSFTNGP10.phx.gbl... See the MSDN Topic "Walkthrough: Creating a Windows Service Application in the Component Designer". Maybe you already did, but that refers to a custom action that installs your service. In the Install method (override it) use ServiceController to start it.
(If your company happens to use a commercial tool from InstallShield, Wise etc etc, you don't need any of the above. They create the right entries in the MSI file, ServiceInstall and ServiceControl tables, that get the Windows Installer to do literally all of that stuff without you needing to write code). -- Phil Wilson [MVP Windows Installer] ---- "Russ Green" <ru**@NO-SPAMrussgreen.net> wrote in message news:eG**************@TK2MSFTNGP09.phx.gbl... > I'm using a Setup Project in VB.NET 2003 Standard to install a windows > service application. I would like this installer to start the service after > install. How do I do that? > > Thanks, > Russ > >
Yes, a command prompt screen does popup.
Russ
"Phil Wilson" <ph*********@unisys.spamcom> wrote in message
news:OL**************@TK2MSFTNGP11.phx.gbl... Interesting - I wonder if there's a command prompt screen popping up? -- Phil Wilson [MVP Windows Installer] ---- "konsu" <ko***@hotmail.com> wrote in message news:vr************@corp.supernews.com... Is there a reason why you decided not to use the ServiceController
class? konst
"Russ Green" <ru**@NO-SPAMrussgreen.net> wrote in message news:uK**************@TK2MSFTNGP12.phx.gbl... Thanks for your answers guys. Did it with the following code in ProjectInstaller.vb
Protected Overrides Sub OnAfterInstall(ByVal savedState As
IDictionary) MyBase.OnAfterInstall(savedState)
Try
Microsoft.VisualBasic.Shell("net start IpNotifyService")
Catch ex As Exception
End Try
End Sub 'OnAfterInstall "Phil Wilson" <ph*********@unisys.spamcom> wrote in message news:eJ*************@TK2MSFTNGP10.phx.gbl... > See the MSDN Topic "Walkthrough: Creating a Windows Service
Application in the > Component Designer". Maybe you already did, but that refers to a
custom action > that installs your service. In the Install method (override it) use > ServiceController to start it. > > (If your company happens to use a commercial tool from
InstallShield, Wise etc > etc, you don't need any of the above. They create the right entries
in the MSI > file, ServiceInstall and ServiceControl tables, that get the Windows Installer > to do literally all of that stuff without you needing to write
code). > -- > Phil Wilson [MVP Windows Installer] > ---- > "Russ Green" <ru**@NO-SPAMrussgreen.net> wrote in message > news:eG**************@TK2MSFTNGP09.phx.gbl... > > I'm using a Setup Project in VB.NET 2003 Standard to install a
windows > > service application. I would like this installer to start the
service after > > install. How do I do that? > > > > Thanks, > > Russ > > > > > >
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Jane |
last post by:
Hello,
I have a windows service applicat written in VB.net.
Everything works fine if I install it by using
InstallUtil.exe in Command Propt window on both
development and target machine. But If...
|
by: Fan Wang |
last post by:
Hi All,
I wrote a windows service with C# as below. But I can't install it with
installutil.exe. I got an error message "
Exception occurred while initializing the installation:...
|
by: Russ Green |
last post by:
I'm using a Setup Project in VB.NET 2003 Standard to install a windows
service application. I would like this installer to start the service after
install. How do I do that?
Thanks,
Russ
|
by: amirmira |
last post by:
I would like to set command line arguments to a service at install time. I
need to do this because I need to get information from different registry
locations depending on my command line argument....
|
by: kkt49 |
last post by:
# vim: et sw=4 ts=8 sts
from wxPython.wx import *
import sys, os, time
import pywintypes
import win32serviceutil
import win32service
import win32event
import win32process
| |
by: JM |
last post by:
Hi,
I have created a Solution in VS 2005 with 2 simple projects.
First project is simple Windows Service which writes an entry into
event log when it starts and when it stops. Nothing else. I...
|
by: Ajith Menon |
last post by:
I have to install .NET framework 3.0. I already have .NET Framework 1.1
installed on my machine.
I don't want to remove framework 1.1 since some of the critical
applications are using it.
While...
|
by: Ikado |
last post by:
Hi everyone,
I am new to PostgreSQL and trying to install it,
My login account belongs to "Administrator Group"
But I tried after creating newone as User Account(limited)..
First i downloaded; ...
|
by: =?Utf-8?B?Qi5BaGxzdGVkdA==?= |
last post by:
Hi all,
This is something that I have been toying with for about a week now. What
I want to achieve is Install a Service with Customised parameters (using
InstallUtil.exe) for User Name. Example...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...
| |