Go Home

WELCOME TO THE PLAYGROUND

My Programming Page:)

In this page I am specifying code of two programs,Code is entirely written in Visual Basic and fully compatible with VB6 and earlier editions.
The first one is for creating any standard application as Services,Services are some of the programs which can be automatically started when the system boots,like IIS is an service, SQL server also runs as a service. You don't need to start these programs implicitly, they are registered as services and are configured to start automatically as the system starts.
I think this is enough related to service, if you want some more information on Services ; then better see the Microsoft documentation.
The second program is to associate any file type with any application,I have tried this because I was fed up of writing Regsvr32 "filename.dll" to register and unregister dlls when working with them,So I created this utility which will help you in associating a menu on the right click over the file e.g. dll and you just have to specify the application's executable path with the file type.

Creating NT/2000 Services:-

The basic idea depends upon the two files INETSRV.EXE and SRVANY.EXE which are provided by Microsoft,Inside this program infact i am doing nothing, I am using Windows Script Object Model to run the command :
Inetsrv.exe <'Service name '> srvany.exe(with complete path)  here 'Service name' is the name you want to give your application when it will run as an service.Then i am using some of the API's to create some entries inside the registry which is needed to make this program work.I know this is not good documentation but if you will see the code then you will find that it's real easy....

Associating file with any Application:-

This program also uses the registry manipulation by using specific API's,I will take an example of registering dll's with some menu name on the right click. To register dll ,you need to go inside Windows registry using regedit,find the filetype associated with dlls and you will find dllfile now go to dllfile then shell and create a new entry as test(name you want to be appeared when you will right click on dll file ), right click on shell and create one more entry as command ,Now click on command and type"c:\winnt\system32\regsvr32.exe" or wherever your regsvr32.exe is strored.This is all  now when you will right click on some file with dllextension you will find test in the conext menu,just click on test and you will find a message as your dll is regsistered with windows
This is all and I have created this utility which will take out all this pain from you, You will find a form when you will run this program You can enter the file extension (like .dll or .txt) and the program to associate on the other text box(like c:\winnt\..\regsvr32 or c:\winnt\notepad.exe for txt files).Just go through the program and you can see How easy it is .....

You can download all the source code from this site  and you can modify it as your requirement if you want to not remove the credentials from the code.

Code for Service Creator

Code for File associator