user726720
user726720

Reputation: 1237

Windows Service properties

How to change the the service name for my windows service in Visual Studio 2012. I'm just new to the windows service, and trying to figure out how to build it.

I've googled and read a a lot about Windows services and how to build them. Everywhere they mention:

In the Properties window for Service1.cs [Design] or Service1.vb [Design], set the ServiceName and the (Name) property for Service1 to MyNewService, if it's not already set.

But for me I can't seem to find where to change the servicename. I rightclicked on service1.cs and and went to properties. Here is a screenshot

enter image description here

It doesn't show me the ServiceName.

Upvotes: 1

Views: 1617

Answers (2)

slippyr4
slippyr4

Reputation: 862

You're looking at the properties of the CS file, not the service object itself. DOuble click it to open in the designer, then you will get actual properties of the service, including ServiceName

Upvotes: 2

Jan Barta
Jan Barta

Reputation: 460

It depends on how you install the service. If you use sc.exe you will specify name as command parameter in installation. If you use install util, you can specify name in code.

Also look at this

Upvotes: 2

Related Questions