View previous topic :: View next topic |
Author |
Message |
Rat Bastard!!!
Joined: 10 Jan 2005 Posts: 11
|
Posted: Wed Feb 02, 2005 21:22 Post subject: NWNX as a service? |
|
|
Could/would it be possibe to run NWNX as a service in protect memory? Sometimes a user will close the window for it not realizing I am trying run a game on a company computer (its sanctioned by management) and close it not realizing that closing it also prevents the server from restarting if it gets close. They know better not to close the server but no matter how much I try to keep them off the station they don't know about the NWNX program. Anyways, I just think it would make a nice feature in future updates...if its not possible already. |
|
Back to top |
|
|
Papillon x-man
Joined: 28 Dec 2004 Posts: 1060 Location: Germany
|
Posted: Wed Feb 02, 2005 22:08 Post subject: |
|
|
This has been requested a couple of times now. I guess I will have to add this eventually. _________________ Papillon |
|
Back to top |
|
|
Themicles
Joined: 23 Jan 2005 Posts: 30 Location: Wolverine Lake, MI
|
Posted: Wed Feb 23, 2005 7:43 Post subject: |
|
|
Papillon:
There's an issue with running NWNX as a service:
User Account:
If you want to interact with NWNX2 AND NWServer on the desktop without writing a seperate GUI for NWServer, you'll need to run it as the LocalSystem account. Otherwise it's hidden and entirely unaccessible.
The problem?
Well, LocalSystem cannot access network file shares. Meaning no accessing a central server vault on a multi-server PW network. Also, you can only shutdown the server by stopping the NWNX service, and then killing NWServer.exe (not clean).
The solution?
Make a seperate GUI program that connects to NWNX2/NWServer running as any user account that has network access. This could even allow remote administration of your NWN server as well, if you write the service to allow connections from admin clients outside the local loop.
I mean, sure, you can circumvent this with Vaultster... but it seems kind of silly to use that internally on a network...
-Themicles _________________ World Leader of Tairis'nądur http://www.tairisnadur.com
Member World of CoPaP http://www.copap.org |
|
Back to top |
|
|
JeroenB
Joined: 31 Dec 2004 Posts: 228 Location: Netherlands
|
Posted: Wed Feb 23, 2005 10:20 Post subject: |
|
|
If I remember correctly there is an option for services to let the user interface with custom dialogs, so it should be possible to run it as service. |
|
Back to top |
|
|
Themicles
Joined: 23 Jan 2005 Posts: 30 Location: Wolverine Lake, MI
|
Posted: Wed Feb 23, 2005 12:24 Post subject: |
|
|
JeroenB wrote: | If I remember correctly there is an option for services to let the user interface with custom dialogs, so it should be possible to run it as service. |
The only services I've ever known to be directly interactive on the desktop must be run as the LocalSystem account.
All others use a program that connects to the service. _________________ World Leader of Tairis'nądur http://www.tairisnadur.com
Member World of CoPaP http://www.copap.org |
|
Back to top |
|
|
TulipVorlax
Joined: 14 Feb 2005 Posts: 14 Location: Montreal, Quebec, Canada, third rock from the sun
|
Posted: Mon Mar 28, 2005 3:33 Post subject: |
|
|
I think that another way to prevent people to close NWNX2 by mistake would be to put it in the system tray on reduction or on close. That way no need for a real service. _________________ My comps.
My little forum.
|
|
Back to top |
|
|
Themicles
Joined: 23 Jan 2005 Posts: 30 Location: Wolverine Lake, MI
|
Posted: Sat May 21, 2005 12:28 Post subject: |
|
|
TulipVorlax wrote: | I think that another way to prevent people to close NWNX2 by mistake would be to put it in the system tray on reduction or on close. That way no need for a real service. |
That is, in no way, the point of running it as a service.
The point in running it as a service goes far beyond "accidental shutdown" and since NWNX already handles NWServer when it crashes, that also isn't a reason to run it as a service.
The real advantage to running it as a service is a "hands off" operation where you set up the computer with your server running as a service, and forget it. The old "set it and forget it" slogan fits here.
For example: I installed srvany.exe as a service, and edited the registry to tell it to open NWNX2 with all the parameters for my NWServer that I want to run. Now, my computer is on a Windows network, and there are multiple people in this house. I do NOT set my computers to log in automatically upon restart. I also have a 1500VA/800watt UPS (Uninteruptable Power Supply: AKA battery backup).
So here's a little scenario for ya:
I go on vacation. Power goes out. Battery backup starts to run low and signals all network computers to shut down. They shut down, and the power comes back on 2 hours later. The power is back on, and I've set my motherboard to restart the computer after a power loss (Note: DO NOT USE THIS WITHOUT A UPS. You'll risk serious data loss). So, the computer boots up, but I'm not home to log in and start my server manually. No worries, my computer doesn't even have to log in, because I installed my server as a service. It runs as long as the computer is on, and Windows is at the very least at the login screen.
Now, the problem with srvany.exe, FireDaemon, or similar programs, is that there is no way to install it as a service using these methods and still allow it access to shared folders on the network. That is, unless you don't want to be able to interact with NWServer or NWN2's GUI when logged into Windows.
Simple fact about Windows security and services:
Only services that are set up to run as the LocalSystem account can be displayed on a user's desktop to be interacted with. All services that run as the LocalSystem account have absolutely NO network access. They can NOT access ANY resources outside of the local computer except databases through ODBC.Period. No way around this.
Services run as any other account including the user account that is logged in, an administrator's account, or even as the "NetworkService" account, can NOT be seen on the desktop. Period. But they CAN access all network resources that their user account has rights to. Any network share it has rights to access, and any direct connection to an outside server, such as MySQL.
Now, before you say that you see plenty of services on your desktop that have network access, I'll gurantee you that they all use a seperate GUI from the main service EXE.
This a bit more clear now? _________________ World Leader of Tairis'nądur http://www.tairisnadur.com
Member World of CoPaP http://www.copap.org |
|
Back to top |
|
|
Chris_TheViking Guest
|
Posted: Sat Aug 06, 2005 6:08 Post subject: There still leaves on one problem |
|
|
The main problem i have is that should the NWNX crash as a service the server stays up, so when it resets the service it will create a new server with a port error, if this would just shut down the server when the program crashes it would run fine as a service, though i would like it to just reload and if the job it is suposed to be doing isn't happening it will reload it, otherwize it will just take back over, for me restarting the server is not a big deal, for most i'm sure they hate that
C.K. |
|
Back to top |
|
|
FastFrench Guest
|
Posted: Thu Sep 08, 2005 17:46 Post subject: |
|
|
In NWN-FF, I've added a parameter to hide both the monitoring tool and NWServer (you can check how to do it in the sources of NWN-FF and do something similar in NWNX). Even if it's not an ideal solution, it's good enough in my case to run the my server at work. Of course, as said earlier the only way to interact with those applications when they're hidden is to kill the corresponding process and restart it... but except at testing time, I don't really need to interact with those applications. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|