DeliciousShare

 

Build and Install service on your pc:

Go to build menu and choose Build NewService1 – This will create an EXE file in our project’s \bin\Release folder.

Next we will need to use the InstallUtil.exe to install the service into the PC. 

InstallUtil.exe is part of the Dot Net distribution package. 
It is found in the c:\windows\Microsoft.net\Firmware\v2.0.50727\ folder. 

Its command line usage is: 

Install Service: 
Installutil.exe PATH_TO_EXE.exe

Uninstall Service: 
InstallUtil.exe PATH_TO_EXE.exe /u

For this example, I changed directory into the c:\windows\Microsoft.net\Firmware\v2.0.50727\ folder. 
Then I ran: 

InstallUtil.exe “c:\vb2005\projects\NewService1\bin\Release\NewService1.exe”

The installer should give you lots of text, It should end by saying: 

The Commit phase completed successfully. 
The transacted install has completed.


If there are any error messages in the install of the service, it will list them. 

After successful installation, you should see the Service listed as NewService1 in the Service Manager. 
To get the service manager, Right click on My Computer on the desktop, and choose Manage.

ServiceServiceManager

Then choose Services and Applications > Services. Right-Click on the NewService1 and choose Start. 

Then go to System Tools > Event Viewer > Application, and you should see your log entries. 

The service will make one entry saying “It is running” then disable the Timer so your log doesn’t fill up. 


To install this service on another computer:

Prerequisites: You need to have .net distributable 2.0 on the target PC. 

You need to copy over the files in the Release folder to the target computer. Then inside the c:\windows\Microsoft.net\Firmware\v2.0.50727\ folder run the InstallUtil.exe program as described previously. 


That’s It.

 

Programmers – Use your talents to make some money online.  Click Here to Read More