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 1819
implement a Commit override in your installer class and use
ServiceControll er to do that.
"Russ Green" <ru**@NO-SPAMrussgreen.n et> wrote in message
news:eG******** ******@TK2MSFTN GP09.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 "Walkthroug h: 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
ServiceControll er 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.n et> wrote in message
news:eG******** ******@TK2MSFTN GP09.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******** ********@TK2MSF TNGP12.phx.gbl. .. implement a Commit override in your installer class and use ServiceControll er to do that.
"Russ Green" <ru**@NO-SPAMrussgreen.n et> wrote in message news:eG******** ******@TK2MSFTN GP09.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
ProjectInstalle r.vb
Protected Overrides Sub OnAfterInstall( ByVal savedState As IDictionary)
MyBase.OnAfterI nstall(savedSta te)
Try
Microsoft.Visua lBasic.Shell("n et start IpNotifyService ")
Catch ex As Exception
End Try
End Sub 'OnAfterInstall
"Phil Wilson" <ph*********@un isys.spamcom> wrote in message
news:eJ******** *****@TK2MSFTNG P10.phx.gbl... See the MSDN Topic "Walkthroug h: 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 ServiceControll er 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.n et> wrote in message news:eG******** ******@TK2MSFTN GP09.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 ServiceControll er class?
konst
"Russ Green" <ru**@NO-SPAMrussgreen.n et> wrote in message
news:uK******** ******@TK2MSFTN GP12.phx.gbl... Thanks for your answers guys. Did it with the following code in ProjectInstalle r.vb
Protected Overrides Sub OnAfterInstall( ByVal savedState As IDictionary)
MyBase.OnAfterI nstall(savedSta te)
Try
Microsoft.Visua lBasic.Shell("n et start IpNotifyService ")
Catch ex As Exception
End Try
End Sub 'OnAfterInstall "Phil Wilson" <ph*********@un isys.spamcom> wrote in message news:eJ******** *****@TK2MSFTNG P10.phx.gbl... See the MSDN Topic "Walkthroug h: 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 ServiceControll er 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.n et> wrote in message news:eG******** ******@TK2MSFTN GP09.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 ServiceControll er class?
konst
"Russ Green" <ru**@NO-SPAMrussgreen.n et> wrote in message
news:uK******** ******@TK2MSFTN GP12.phx.gbl... Thanks for your answers guys. Did it with the following code in ProjectInstalle r.vb
Protected Overrides Sub OnAfterInstall( ByVal savedState As IDictionary)
MyBase.OnAfterI nstall(savedSta te)
Try
Microsoft.Visua lBasic.Shell("n et start IpNotifyService ")
Catch ex As Exception
End Try
End Sub 'OnAfterInstall "Phil Wilson" <ph*********@un isys.spamcom> wrote in message news:eJ******** *****@TK2MSFTNG P10.phx.gbl... See the MSDN Topic "Walkthroug h: 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 ServiceControll er 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.n et> wrote in message news:eG******** ******@TK2MSFTN GP09.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.super news.com... Is there a reason why you decided not to use the ServiceControll er class?
konst
"Russ Green" <ru**@NO-SPAMrussgreen.n et> wrote in message news:uK******** ******@TK2MSFTN GP12.phx.gbl... Thanks for your answers guys. Did it with the following code in ProjectInstalle r.vb
Protected Overrides Sub OnAfterInstall( ByVal savedState As IDictionary)
MyBase.OnAfterI nstall(savedSta te)
Try
Microsoft.Visua lBasic.Shell("n et start IpNotifyService ")
Catch ex As Exception
End Try
End Sub 'OnAfterInstall "Phil Wilson" <ph*********@un isys.spamcom> wrote in message news:eJ******** *****@TK2MSFTNG P10.phx.gbl... See the MSDN Topic "Walkthroug h: 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 ServiceControll er 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.n et> wrote in message news:eG******** ******@TK2MSFTN GP09.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*********@un isys.spamcom> wrote in message
news:OL******** ******@TK2MSFTN GP11.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.super news.com... Is there a reason why you decided not to use the ServiceControll er
class? konst
"Russ Green" <ru**@NO-SPAMrussgreen.n et> wrote in message news:uK******** ******@TK2MSFTN GP12.phx.gbl... Thanks for your answers guys. Did it with the following code in ProjectInstalle r.vb
Protected Overrides Sub OnAfterInstall( ByVal savedState As
IDictionary) MyBase.OnAfterI nstall(savedSta te)
Try
Microsoft.Visua lBasic.Shell("n et start IpNotifyService ")
Catch ex As Exception
End Try
End Sub 'OnAfterInstall "Phil Wilson" <ph*********@un isys.spamcom> wrote in message news:eJ******** *****@TK2MSFTNG P10.phx.gbl... > See the MSDN Topic "Walkthroug h: 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 > ServiceControll er 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.n et> wrote in message > news:eG******** ******@TK2MSFTN GP09.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 I install it by
using 'Install' in VS.net IDE (right click on setup
project, get a popup menu, click on Install) or run
setup.exe in deubg folder...
|
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:
System.IO.FileNotFoundException: File or assembly name windowsservice1, or
one of its dependencies, was not found.. "
I am new to C# environment. Any idea any clue...
|
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. I have to do it this way as
the consumer of the service should not be able to change the argument -
except by uninstalling and reinstalling the...
|
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 have added
a projectinstaller also for that. I have used following settings for it
(developed in VS 2005 only):
1. For Service1.cs file, I have...
|
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 installing .NET framework 3.0 I got the error:
"Microsoft .NET Framework 3.0 x86 has encountered a problem during
setup. Setup did not complete...
|
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;
postgresql-8.2.msi
postgresql-8.2-int.msi
upgrade.bat
README.TXT
|
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 (C#);
public class MyServiceInstaller : System.Configuration.Install.Installer
{
private System.ServiceProcess.ServiceProcessInstaller...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language...
| |
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in...
|
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 we have to send another system
| |
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...
| |