Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Dark Dreams of Furiae - a new module for NWN:EE! Buy now
Attention, new and old users! Please read the new rules of conduct for the forums, and we hope you enjoy your stay!

NWServer.exe as service cannot find custom modules

Hi folks, trying to get an old PW online again, and need to have NWServer.exe running as a service on Windows.

When not running it as a service, the following parameters work perfectly well:
-module "CustomMod" -maxclients 7

However when run as a service, the server starts up but fails to load CustomMod. I can even see the server on the Multiplayer server list in the client, but the module column says "No Module".

Notably, if I change the parameters to:
-module "Chapter1" -maxclients 7

...and run as a service, it works perfectly. The service is running as Local System, so should be able to find the module that is in the \module folder.

Any ideas?


  • SirenosSirenos Member Posts: 3
    edited January 2019
    OK, so after more testing I've realized that the problem might be that THIS custom module is the problem, and not any custom module run as a service.

    I downloaded a very small module (Neverwinter Raids - Kobold Cave) and tried running that as a service, and it works flawlessly.

    My PW's module is 89MB. Could it simply be a matter of size? Again, this module does work if I don't run the server as a Windows service.

    EDIT: Turns out I was sloppy in testing. The small Kobolds module didn't actually work, but unlike the large module the name of the module did appear in the server list. Couldn't actually connect to the server though.

    Post edited by Sirenos on
  • SirenosSirenos Member Posts: 3
    Well now, solved this.

    The problem is with the fact that the \modules directory is stored within the \users hierarchy, which it turns out isn't accessible to the service, EVEN IF THE SERVICE IS STARTED BY THE USER THAT OWNS THE DIRECTORY.

    I had to move the \modules folder to a new location (say, C:\NWNEE), and then change the nwn.ini (that is also in the \users hierarchy) so that the MODULE argument points to the new location that isn't part of the \users hierarchy.

    This was particularly hard to diagnose because the service launcher starts the service with the permissions of USER, the service itself launches NWServer.exe with the permissions of USER, NWServer.exe looks up the MODULE argument from the nwn.ini file with the permissions of USER, but then for some unfathomable reason NWServer.exe doesn't actually have permissions to access the location of the module, even though the same permissions throughout should be enough.

    Hopefully this helps someone else save 3 days of their lives.

Sign In or Register to comment.