none
Windows Service - change Name

    Question

  • Hi

    Just to know can I change Windows Service name simply by renaming myService.exe and myService.exe.config ?

    Have developed a Windows Service and working fine. Got to take to client site and deploy....can i rename the above two files before deployment? Is that going to work same?

    Thanks
    • Edited by Sukumar Raju Tuesday, September 16, 2008 10:56 AM
    Tuesday, September 16, 2008 10:46 AM

Answers

  • Hi Sukumar,

    You can rename the Windows service’s executable file and “app.config” file when you build it by modify the Project properties (“Application” | “Assembly name”), and rebuild the deployment project.

    But after you build the setup project  or install the windows service, you cannot change the name of the executable file, otherwise, the windows service cannot be started.

    However, if use the Installer Tool (Installutil.exe)  to create a windows service like :
     “InstallUtil.exe c:\YourProject\bin\YourApp.exe”, we can change the application name and the config file name.
     

    Regards,

    Xun


    Please remember to mark the replies as answers if they help and unmark them if they provide no help. http://forums.msdn.microsoft.com/en-US/csharpide/thread/8e9ed0d7-11ff-402a-8489-9b5f05eeb706
    • Edited by jack 321 Thursday, September 18, 2008 11:32 AM add however
    • Marked as answer by Sukumar Raju Thursday, September 18, 2008 4:51 PM
    Thursday, September 18, 2008 11:23 AM

All replies

  •  http://www.eggheadcafe.com/forumpost.aspx?topicid=6&forumpostid=85647

    I found your problems solution in this site go through it.maybe it will help.
    Tuesday, September 16, 2008 1:15 PM
  • Sethluri..Thanks for reply.

    But it is not the answer.
    Apriori algorithm [association rule]
    Tuesday, September 16, 2008 1:48 PM
  • Hi Sukumar,

    You can rename the Windows service’s executable file and “app.config” file when you build it by modify the Project properties (“Application” | “Assembly name”), and rebuild the deployment project.

    But after you build the setup project  or install the windows service, you cannot change the name of the executable file, otherwise, the windows service cannot be started.

    However, if use the Installer Tool (Installutil.exe)  to create a windows service like :
     “InstallUtil.exe c:\YourProject\bin\YourApp.exe”, we can change the application name and the config file name.
     

    Regards,

    Xun


    Please remember to mark the replies as answers if they help and unmark them if they provide no help. http://forums.msdn.microsoft.com/en-US/csharpide/thread/8e9ed0d7-11ff-402a-8489-9b5f05eeb706
    • Edited by jack 321 Thursday, September 18, 2008 11:32 AM add however
    • Marked as answer by Sukumar Raju Thursday, September 18, 2008 4:51 PM
    Thursday, September 18, 2008 11:23 AM