
Signature
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
Ahhh! I did not know I had to do that. I see it now and I think we are
getting closer... I have some additional questions though:
There are 2 classes in the BeepService project: ProjectInstaller.vb and
Service1.vb. My code is in Service1.vb and there appears to be no code in
ProjectInstaller.vb. However, if I right click the Service1.vb[design] and
choose "Add Installer", it adds it to the ProjectInstaller.vb[Designer] tab
instead. I am going to assume this is OK, please let me know if that is
wrong.
Moving along... I then double-click the ServiceInstaller1 object in
ProjectInstaller.vb[Design] and VS.NET auto-creates a
ServiceInstaller1_AfterInstall procedure. I do not see an
InitializeComponet() item in the Procedure drop-down for the
ServiceInstaller1 object. Am I supposed to just create my own
InitializeComponent procedure? (BTW: I am programming in VB.NET so I will
do my best to convert your code). If so, do I need to set this as a startup
procedure or something? How will the framework know to run this code first
if it is not in a pre-defined initialize event?
Then, there is the "@"domain\user";" line that you have. When I get to this
point, I assume this will have to read: "@ourdomain\myusername" in VB.NET,
right? Also, do I have to substitute anything for "TestAccount" in your
code example or do I need to set up an account anywhere with that name in
the system or anything?
Also, why do I need to specify the domain when I am just installing this
locally? If I am being authenticated accross the network to install
something on my workstation, do I need to make sure of any conditions on the
administration server that would do the authentication?
I look forward to reading your response. :)
Scott
> Hi Scott,
>
[quoted text clipped - 12 lines]
> this.serviceProcessInstaller1.Username = @"domain\user";
> this.serviceProcessInstaller1.AfterInstall += new
System.Configuration.Install.InstallEventHandler(this.serviceProcessInstalle
> r1_AfterInstall);
> this.serviceInstaller1.ServiceName = "TestAccount";
> this.serviceInstaller1.AfterInstall += new
System.Configuration.Install.InstallEventHandler(this.serviceInstaller1_Afte
> rInstall);
> this.Installers.AddRange(new System.Configuration.Install.Installer[] {
[quoted text clipped - 15 lines]
> Get Secure! - www.microsoft.com/security
> This posting is provided "AS IS" with no warranties, and confers no rights.
"Peter Huang" - 17 Sep 2004 07:35 GMT
Hi
>There are 2 classes in the BeepService project: ProjectInstaller.vb and
>Service1.vb. My code is in Service1.vb and there appears to be no code in
>ProjectInstaller.vb. However, if I right click the Service1.vb[design] and
>choose "Add Installer", it adds it to the ProjectInstaller.vb[Designer] tab
>instead. I am going to assume this is OK, please let me know if that is
>wrong.
This is OK.
>Moving along... I then double-click the ServiceInstaller1 object in
>ProjectInstaller.vb[Design] and VS.NET auto-creates a
[quoted text clipped - 5 lines]
>procedure or something? How will the framework know to run this code first
>if it is not in a pre-defined initialize event?
After the steps above, you can change the code view of ProjectInstaller.vb,
and find the #Region " Component Designer generated code ",click the "+" to
expand the region, and you will find the InitializeComponent method.
>Then, there is the "@"domain\user";" line that you have. When I get to this
>point, I assume this will have to read: "@ourdomain\myusername" in VB.NET,
>right? Also, do I have to substitute anything for "TestAccount" in your
>code example or do I need to set up an account anywhere with that name in
>the system or anything?
If you are using an local account you can use the format as below.
"computername\testaccount" so that the install service will know to search
the account in the computername SAM database.
>Also, why do I need to specify the domain when I am just installing this
>locally? If I am being authenticated accross the network to install
>something on my workstation, do I need to make sure of any conditions on the
>administration server that would do the authentication?
If you are using the AD account(domain account) the Domain controler will
do the authentication, otherwise the local computer do the authentication.
Windows Service Applications
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/
vboricreatingconfiguringwindowsserviceapplications.asp
Best regards,
Peter Huang
Microsoft Online Partner Support

Signature
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
I read your description of where to put the code and I found that. Now I am
trying to add your code to the routine and am having problems with that.
the following are the problems I am having in adding the code:
1) "me.serviceProcessInstaller1.AfterInstall..." -> The 'AfterInstall'
item is not in the list of properties/methods for the
serviceProcessInstaller1 item.
2) "...me.serviceProcessInstaller1_AfterInstall)" -> The
'serviceProcessInstaller1_AfterInstall' item does not show up on the list of
properties/methods. Should this be written differently?
3) "...me.serviceInstaller1_AfterInstall)" -> Same problem as above in #2.
4) I am having problems writting the following code you provided as VB.NET.
It seems to be looking for one value and you appear to be giving it two.
How should this be written in VB.NET?
"this.Installers.AddRange(new System.Configuration.Install.Installer[]
{this.serviceProcessInstaller1, this.serviceInstaller1});"
So, now I know where to put the code, I just can't get the code to go into
the right location. Please let me know what you think and I will put the
code in.
Thanks,
Schoo
> Hi Scott,
>
[quoted text clipped - 12 lines]
> this.serviceProcessInstaller1.Username = @"domain\user";
> this.serviceProcessInstaller1.AfterInstall += new
System.Configuration.Install.InstallEventHandler(this.serviceProcessInstalle
> r1_AfterInstall);
> this.serviceInstaller1.ServiceName = "TestAccount";
> this.serviceInstaller1.AfterInstall += new
System.Configuration.Install.InstallEventHandler(this.serviceInstaller1_Afte
> rInstall);
> this.Installers.AddRange(new System.Configuration.Install.Installer[] {
[quoted text clipped - 15 lines]
> Get Secure! - www.microsoft.com/security
> This posting is provided "AS IS" with no warranties, and confers no rights.