My Blog List

hotinit.com. Powered by Blogger.

Search This Blog

Showing posts with label pacs. Show all posts
Showing posts with label pacs. Show all posts

Exe To Windows Service

Wednesday, 17 August 2011


How to convert  an exe to a service?

How to create user defined function in windows?

How to create a PACS windows Service Using dcmtk storescp.exe ?

Steps

1.       Create a Service with your desired name

2.       Associate your  service to an exe in the registry

3.       Enjoy.

STEP 1:

i.                     Files required to create a windows service Instsrv.exe and Srvany.exe

ii.                   Download the files to Create a Service with your desired service name


iii.                  Paste the contents to a folder. Eg: C:\resourcetoolkit


iv.                 Open your cmd as an administrator


v.                   Location of the Instrv.exe  ServiceNameToBeCreated  Location of the Srvany.exe

(eg: C:\resourcetoolkit\Instsrv.exe MyDesiredServiceName C:\resourcetoolkit\Srvany.exe)

(eg: C:\resourcetoolkit\Instsrv.exe dcmtkpacs C:\resourcetoolkit\Srvany.exe)


vi.                 Now the Service has been created( check at services.msc)

STEP 2:

i.                     Open Run

ii.                   Type regedit (to  open registry editor)

iii.                  Navigate to that Service To Our Exe mapping location 
                HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\<my service>
  

                         
iv.                 Create a New Key with the Name Parameters


v.                   Create a New String value inside that Parameters Folder


vi.                 Give the String value the name or rename it as Application (data type REG_SZ)

      vii.                Right click to modify that String Application Created

viii.              Give the location of the .exe  in the value data of Application


a.        Exe without parameters (eg.)

D:\dcmtk\bin\notepad.exe

b.      Exe with parameters as (eg.)

 D:\dcmtk\bin\storescp.exe -aet STORESCP  -su "" -fe “.dcm”  -od  F:\dcmtkpacsstorage 104

ix.                 That’s it

STEP 3

i.                     You have converted a exe to service successfully

ii.                   Have a Tea.
 

Blogger news

Blogroll

Most Reading

8.6/10