Go Back   EQEmulator Home > EQEmulator Forums > Archives > Archive::Support > Archive::Tutorials/Howto's

Archive::Tutorials/Howto's Archive area for Tutorials/Howto's posts that were moved here after an inactivity period of 90 days.

Reply
 
Thread Tools Display Modes
  #1  
Old 06-09-2003, 11:23 AM
IANightShift
Fire Beetle
 
Join Date: Apr 2003
Posts: 7
Default How to install EQEmu as a service

How to make World.exe and Zone.exe run as an NT service on a Windows XP based OS.

Please read the entire post before you start.

INSTALLING THE SERVICES:

1) You will need INSTSRV.EXE and SRVANY.EXE. You can get them here.
http://www.tacktech.com/display.cfm?ttid=197

2) Copy them to a permanant place. They will need to stay there from now on.

3) Open a command line.

4) Type <PATH>\INSTSRV.EXE <NAME YOU WANT THE SERVICE TO BE CALLED> <PATH>\SRVANY.EXE

This will create the REGISTRY ENTRIES needed for the service you will be setting up.

Example: c:\windows\system32\instsrv.exe world c:\windows\system32\srvany.exe

5) When doing ZONE.EXE you will need to do this for how ever many zones you want running at one time.

Example: c:\windows\system32\instsrv.exe zone_7795 c:\windows\system32\srvany.exe
Example: c:\windows\system32\instsrv.exe zone_7796 c:\windows\system32\srvany.exe



EDITING AND CREATING THE PARAMETERS OF THE SERVICES:

1) When you are done with your entries, open the REGISTRY EDITOR.

2) Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es\<service name>

3) Right click on the <service name>

4) In the drop down click on New then on KEY

5) Name the key Parameters

6) Do this for each entry you made in steps 4 and 5 of INSTALLING THE SERVICES

7) Right click on Parameters

8) In the drop down click on New then on String Value

9) Name the String Value Application

10) Right click on Parameters

11) In the drop down click on New then on String Value

12) Name the string value AppDirectory

14) In the registry entry for WORLD. Do the following.

15) For the string value Application, edit and type <PATH>\world.exe

16) For the string value AppDirectory, edit and type <PATH TO WORLD.EXE>

17) In the registry entries you made for ZONE. Do the following.

18) Open BOOT5ZONES.BAT in a text editor for reference.

19) For the string value Application, edit and type <PATH>\zone.exe <WHATEVER YOU
HAVE IN BOOT5ZONES AFTER ZONE>


Example: C:\EQEMU\ZONE.EXE . <YOUR IP> 7795 <YOUR IP>(Note: Change the Port number
for each ZONE entry you made in step 5 so they match BOOT5ZONES and don't forget the
.(dot) between ZONE.EXE and <YOUR IP> at the beginning)


Theses entries must look exactly like the entries in your BOOT5ZONES.bat file.
Doing a copy and paste might be the easiest way.


20) For the string value AppDirectory, edit and type <PATH To ZONE.EXE>
(Note: Do this for each entry you made in step 5)

You are done.

As long as you had it all working before. When you start the services it should start up just fine. Note: Make sure you name the entries so they are in alpha order, windows starts the services in alpha order. I named mine world and zone_7795, zone_7796 etc.,
so that world.exe would start first then the zones.




Courtesy of Lurker

When you need to stop and start all of your services at once. You can do the following.

Create eqemu_stop.bat

Code:
net stop "zone_7995"
net stop "zone_7996"
net stop "zone_7997"
net stop "zone_7998"
net stop "zone_7999"
net stop "world"
Create eqemu_start.bat

Code:
net start "world"
net start "zone_7995"
net start "zone_7996"
net start "zone_7997"
net start "zone_7998"
net start "zone_7999"

Please let me know if any is wrong, misspelled, unclear etc.

Enjoy!

NightShift

Edited: Because for some reason I didn't catch that I misspelled parameters.
Reply With Quote
  #2  
Old 06-09-2003, 01:42 PM
Guest
 
Posts: n/a
Default

Thanks for this, this is nice and handy, but, first, will this work with win2k? I assume it will since we have services here, and, second, what about when I go through the source, find a change that needs to be made and I make the change?
Reply With Quote
  #3  
Old 06-09-2003, 02:15 PM
IANightShift
Fire Beetle
 
Join Date: Apr 2003
Posts: 7
Default

Quote:
Originally Posted by NecronomiKron
Thanks for this, this is nice and handy, but, first, will this work with win2k? I assume it will since we have services here, and, second, what about when I go through the source, find a change that needs to be made and I make the change?

This will work on a Windows 2000 based OS as well.

I simply wrote this using an XP based OS machine.

There are some differences if I remember right, but without walking thorugh the steps, I am not sure what they are.

It might be that the registry entries take another step?

How about trying it and let me know. I would be glad to add to the steps for Windows 2000 if they are truly different.

Thank you

NightShift
Reply With Quote
  #4  
Old 06-09-2003, 02:23 PM
Guest
 
Posts: n/a
Default

That answers the first part, but, what about the second part? I end up doing db changes and need to restart the program... hmm, would be nice to have a program you can run to restart the service... oh well, i'm a dreamer, :P

Heh, programmers love me and hate me, I suggest changes, they do them, all the while hating me, then love me for suggesting it after they are done with it, lol, then again, I do a bit of programming myself...
Reply With Quote
  #5  
Old 06-09-2003, 02:29 PM
IANightShift
Fire Beetle
 
Join Date: Apr 2003
Posts: 7
Default

Quote:
Originally Posted by NecronomiKron
That answers the first part, but, what about the second part? I end up doing db changes and need to restart the program... hmm, would be nice to have a program you can run to restart the service... oh well, i'm a dreamer, :P
You can set a scheduled job to stop and start the services. Then just run the schedule manually when you need to stop and start them all again.

I am doing this from a Windows 2003 Server.

But doing it manaully isn't hard, you just hit restart then go to the next one in the Computer Management console.

Learn about the "Computer Management" console.

NightShift
Reply With Quote
  #6  
Old 06-09-2003, 03:28 PM
Guest
 
Posts: n/a
Default

Ok, I have it working to my satisfaction, but, I would like to stress the importance of the . after zone.exe in the registry...
Reply With Quote
  #7  
Old 06-10-2003, 12:12 AM
IANightShift
Fire Beetle
 
Join Date: Apr 2003
Posts: 7
Default Will see what I can do

Quote:
Originally Posted by NecronomiKron
Ok, I have it working to my satisfaction, but, I would like to stress the importance of the . after zone.exe in the registry...
That is the reason I said the entries had to look exactly like the BOOT5ZONES.bat file.

I will see if I can make it more clear.

Nightshift
Reply With Quote
  #8  
Old 06-10-2003, 01:27 PM
Lurker_005
Demi-God
 
Join Date: Jan 2002
Location: Tourist town USA
Posts: 1,671
Default

Once you have the world and zones set up as services, you can start and stop them from the service manager. Or you can use the command line.

NET START/STOP "service name"


see net /? for more options/info

so eqemu_stop.bat
Code:
net stop "zone_7995"
net stop "zone_7996"
net stop "zone_7997"
net stop "zone_7998"
net stop "zone_7999"
net stop "world"
and eqemu_start.bat
Code:
net start "world"
net start "zone_7995"
net start "zone_7996"
net start "zone_7997"
net start "zone_7998"
net start "zone_7999"

And while the exact procedure may differ some this can be done on NT4.0 2k XP and 2003
__________________
Please read the forum rules and look at reacent messages before posting.
Reply With Quote
  #9  
Old 06-10-2003, 03:58 PM
bpogue99
Sarnak
 
Join Date: Mar 2003
Posts: 55
Default

We all know zones crash sometimes, what's the net effect of a crash when it's run as a service? The service simply stops? Or worse? My monitoring software will watch a service and restart it if it fails. I'll turn that on obviously when I set them up as a service, but before I do that I'm just curious.

I'm assuming minilogin can be ran the same way?

Thanks for posting these steps, this is great! I can get rid of a screen full of 'dos' boxes <g>.

bill
Reply With Quote
  #10  
Old 06-11-2003, 02:13 AM
IANightShift
Fire Beetle
 
Join Date: Apr 2003
Posts: 7
Default

Quote:
Originally Posted by Lurker_005
Once you have the world and zones set up as services, you can start and stop them from the service manager. Or you can use the command line.

NET START/STOP "service name"


see net /? for more options/info

so eqemu_stop.bat
Code:
net stop "zone_7995"
net stop "zone_7996"
net stop "zone_7997"
net stop "zone_7998"
net stop "zone_7999"
net stop "world"
and eqemu_start.bat
Code:
net start "world"
net start "zone_7995"
net start "zone_7996"
net start "zone_7997"
net start "zone_7998"
net start "zone_7999"

And while the exact procedure may differ some this can be done on NT4.0 2k XP and 2003

Thank you Lurker.

I use this as well when I need to restart them all after a change.

Will add this.

NightShift
Reply With Quote
  #11  
Old 06-11-2003, 02:23 AM
IANightShift
Fire Beetle
 
Join Date: Apr 2003
Posts: 7
Default

Quote:
Originally Posted by bpogue99
We all know zones crash sometimes, what's the net effect of a crash when it's run as a service? The service simply stops? Or worse? My monitoring software will watch a service and restart it if it fails. I'll turn that on obviously when I set them up as a service, but before I do that I'm just curious.

I'm assuming minilogin can be ran the same way?

Thanks for posting these steps, this is great! I can get rid of a screen full of 'dos' boxes <g>.

bill
MiniLogin should work as well.

NighShift
Reply With Quote
  #12  
Old 06-26-2003, 07:35 AM
IANightShift
Fire Beetle
 
Join Date: Apr 2003
Posts: 7
Default

I have verified that the instructions do work on a Windows 2000 Server.

NightShift
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 02:54 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3