View previous topic :: View next topic |
Author |
Message |
seed
Joined: 01 Dec 2006 Posts: 44
|
Posted: Sun Apr 15, 2007 18:36 Post subject: restartCmd = nwnx_restart.bat |
|
|
I am running NWNX4 as a service. Does the "restartCmd" parameter in the NWNX.INI file get run when using NWNX4 as a service or is that a bug?
It works fine when not running as a service.
Is there any command in NWNX4 that will let you run an external program on the server from within NWN2? |
|
Back to top |
|
|
Grinning Fool
Joined: 12 Feb 2005 Posts: 264
|
Posted: Mon Apr 16, 2007 4:53 Post subject: |
|
|
Quote: |
Is there any command in NWNX4 that will let you run an external program on the server from within NWN2? |
In a couple-three weeks I'm releasing a 'utiltiies' plugin with things that I've found useful for my own PW; I can put this functionality into it pretty easily.
As for the first part of your post, I"m not ignoring it -- I just don't have the answer _________________ Khalidine, a NWN2 persistent world
Looking for volunteers. |
|
Back to top |
|
|
TroveLord
Joined: 22 Nov 2006 Posts: 136 Location: Italy
|
Posted: Mon Apr 16, 2007 10:49 Post subject: Re: restartCmd = nwnx_restart.bat |
|
|
seed wrote: | I am running NWNX4 as a service. Does the "restartCmd" parameter in the NWNX.INI file get run when using NWNX4 as a service or is that a bug? |
It works just fine for me.
Quote: | 10.46.06: * Starting maintenance file test.bat |
Make sure that you have defined the right path to the file in nwnx.ini. Also, no offense to your intelligence intended, did you remove the # symbol in before the restartCmd string? That would turn it into a comment. |
|
Back to top |
|
|
seed
Joined: 01 Dec 2006 Posts: 44
|
Posted: Mon Apr 16, 2007 12:09 Post subject: |
|
|
Grinning Fool wrote: | Quote: |
Is there any command in NWNX4 that will let you run an external program on the server from within NWN2? |
In a couple-three weeks I'm releasing a 'utiltiies' plugin with things that I've found useful for my own PW; I can put this functionality into it pretty easily. |
Thanks! I'm sure me and many other would like that. I'm just working on a simple character deleter (which would be good to include in your utility) and would like to execute a VB script from within NWN2. If it became easy to interact with the outside world, I can think of plenty other fun stuff to do
--
Trove-
I have two PC's here, one dev, one live. The dev one runs NWNX4 via DOS, the live one runs it as a service. The dev one does the restart command fine, the live one does not. Other than how I start the two servers, they use identical INI files. I did make a change based on your one comment: I did not have the full path to the batch file in the INI. Perhaps when running as a service this is needed? I made this change and will see what a reboot brings... |
|
Back to top |
|
|
TroveLord
Joined: 22 Nov 2006 Posts: 136 Location: Italy
|
Posted: Mon Apr 16, 2007 12:59 Post subject: |
|
|
seed wrote: | I did not have the full path to the batch file in the INI. Perhaps when running as a service this is needed? |
You can use either an absolute or a relative path, but if you go for an absolute one you can't ever be mistaken. Just try it and see what the NWNX4 GUI reads when you restart the service. |
|
Back to top |
|
|
seed
Joined: 01 Dec 2006 Posts: 44
|
Posted: Mon Apr 16, 2007 15:58 Post subject: |
|
|
There is no GUI when you run it as a service - that's one of the benefits of running as a service - no GUI means my kids can't close it by accident. |
|
Back to top |
|
|
TroveLord
Joined: 22 Nov 2006 Posts: 136 Location: Italy
|
Posted: Mon Apr 16, 2007 16:41 Post subject: |
|
|
seed wrote: | There is no GUI when you run it as a service |
I missed that before, you'd try the GUI once just to see if it works, then you can move back to service mode. |
|
Back to top |
|
|
seed
Joined: 01 Dec 2006 Posts: 44
|
Posted: Mon Apr 16, 2007 17:51 Post subject: Re: restartCmd = nwnx_restart.bat |
|
|
seed wrote: | It works fine when not running as a service. |
seed wrote: | I have two PC's here, one dev, one live. The dev one runs NWNX4 via DOS, the live one runs it as a service. The dev one does the restart command fine, the live one does not. |
TroveLord wrote: | try the GUI once just to see if it works, then you can move back to service mode. |
To Clarify, again, it works fine when not running as a service... |
|
Back to top |
|
|
TroveLord
Joined: 22 Nov 2006 Posts: 136 Location: Italy
|
Posted: Mon Apr 16, 2007 18:50 Post subject: |
|
|
Sorry I must be blind then. Anyway I'll leave this to someone more skilled than me. I can't understand why it doesn't work. |
|
Back to top |
|
|
Papillon x-man
Joined: 28 Dec 2004 Posts: 1060 Location: Germany
|
Posted: Tue Apr 17, 2007 21:39 Post subject: |
|
|
I'm running whatever is set in the ini file with "cmd.exe /c", i.e. the batch/cmd file is launched with the command line interpreter. Maybe this does not work in service mode, I've actually never tested it.
I'll put it on my todo list. _________________ Papillon |
|
Back to top |
|
|
seed
Joined: 01 Dec 2006 Posts: 44
|
Posted: Wed Apr 18, 2007 12:16 Post subject: |
|
|
I'll confirm that it is not working in service mode. I put it on the windows job scheduler instead. Since I have my server rebooting at fixed times that works fine. |
|
Back to top |
|
|
nosfe
Joined: 25 Apr 2007 Posts: 22
|
Posted: Wed Apr 25, 2007 8:21 Post subject: |
|
|
Have you testing with put your Process GUI and Server.exe at hight priority ?
QUESTION:
is this possible to have in the file .ini lines of order which could be launched from NWNX in the play?
e.g.
Custom1Cmd = SendBic.bat
Custom2Cmd = Backup.bat
#Custom3Cmd = xxx
#Custom4Cmd = xxx
Right throw without NWNX awaiting the end of batch?
into script :
NWNXRunBatch_Cmd (“Custom1Cmd”, Param1, Param2, Param3, Param4);
thanks |
|
Back to top |
|
|
Papillon x-man
Joined: 28 Dec 2004 Posts: 1060 Location: Germany
|
Posted: Thu Apr 26, 2007 15:05 Post subject: |
|
|
This would be possible, but it wouldn't be something that should be in the main executeable.
This sounds more like a job for a specific maintenance plugin (which shouldn't be hard to write). Nice idea! _________________ Papillon |
|
Back to top |
|
|
Grinning Fool
Joined: 12 Feb 2005 Posts: 264
|
Posted: Thu Apr 26, 2007 15:10 Post subject: |
|
|
nosfe wrote: | Have you testing with put your Process GUI and Server.exe at hight priority ?
QUESTION:
is this possible to have in the file .ini lines of order which could be launched from NWNX in the play?
e.g.
Custom1Cmd = SendBic.bat
Custom2Cmd = Backup.bat
#Custom3Cmd = xxx
#Custom4Cmd = xxx
Right throw without NWNX awaiting the end of batch?
into script :
NWNXRunBatch_Cmd (“Custom1Cmd”, Param1, Param2, Param3, Param4);
thanks |
Coming soon to a plugin near you That's a good idea to have the batch/programs be in the ini file. I'll make that as optional, or you can supply the .cmd name directly. _________________ Khalidine, a NWN2 persistent world
Looking for volunteers. |
|
Back to top |
|
|
redils
Joined: 13 Jan 2005 Posts: 27
|
Posted: Fri Apr 27, 2007 13:53 Post subject: |
|
|
Hello
That'll be usefull, if we could use parameters with this custom command.
I have several linked modules. Sometimes, one of this module is empty (no players) and i'd like to be able to stop it when it isn't needed. But when the module is needed, i'd like to be able to load it from another module. Then, only used modules would be loaded. If we could pass parameters to this custom commands, i'll be able, using nwnx as a service, to call something like "start module <parameter>" (where parameter is the ID of the module to load).
What do you think about that ? |
|
Back to top |
|
|
|