logo logo

 Back to main page

The NWNX Community Forum

 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
restartCmd = nwnx_restart.bat
Goto page 1, 2  Next
 
Post new topic   Reply to topic    nwnx.org Forum Index -> Technical support
View previous topic :: View next topic  
Author Message
seed



Joined: 01 Dec 2006
Posts: 44

PostPosted: Sun Apr 15, 2007 18:36    Post subject: restartCmd = nwnx_restart.bat Reply with quote

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
View user's profile Send private message
Grinning Fool



Joined: 12 Feb 2005
Posts: 264

PostPosted: Mon Apr 16, 2007 4:53    Post subject: Reply with quote

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 Wink
_________________
Khalidine, a NWN2 persistent world

Looking for volunteers.
Back to top
View user's profile Send private message
TroveLord



Joined: 22 Nov 2006
Posts: 136
Location: Italy

PostPosted: Mon Apr 16, 2007 10:49    Post subject: Re: restartCmd = nwnx_restart.bat Reply with quote

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
View user's profile Send private message
seed



Joined: 01 Dec 2006
Posts: 44

PostPosted: Mon Apr 16, 2007 12:09    Post subject: Reply with quote

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
View user's profile Send private message
TroveLord



Joined: 22 Nov 2006
Posts: 136
Location: Italy

PostPosted: Mon Apr 16, 2007 12:59    Post subject: Reply with quote

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
View user's profile Send private message
seed



Joined: 01 Dec 2006
Posts: 44

PostPosted: Mon Apr 16, 2007 15:58    Post subject: Reply with quote

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
View user's profile Send private message
TroveLord



Joined: 22 Nov 2006
Posts: 136
Location: Italy

PostPosted: Mon Apr 16, 2007 16:41    Post subject: Reply with quote

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
View user's profile Send private message
seed



Joined: 01 Dec 2006
Posts: 44

PostPosted: Mon Apr 16, 2007 17:51    Post subject: Re: restartCmd = nwnx_restart.bat Reply with quote

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
View user's profile Send private message
TroveLord



Joined: 22 Nov 2006
Posts: 136
Location: Italy

PostPosted: Mon Apr 16, 2007 18:50    Post subject: Reply with quote

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
View user's profile Send private message
Papillon
x-man


Joined: 28 Dec 2004
Posts: 1060
Location: Germany

PostPosted: Tue Apr 17, 2007 21:39    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website MSN Messenger
seed



Joined: 01 Dec 2006
Posts: 44

PostPosted: Wed Apr 18, 2007 12:16    Post subject: Reply with quote

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
View user's profile Send private message
nosfe



Joined: 25 Apr 2007
Posts: 22

PostPosted: Wed Apr 25, 2007 8:21    Post subject: Reply with quote

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
View user's profile Send private message
Papillon
x-man


Joined: 28 Dec 2004
Posts: 1060
Location: Germany

PostPosted: Thu Apr 26, 2007 15:05    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website MSN Messenger
Grinning Fool



Joined: 12 Feb 2005
Posts: 264

PostPosted: Thu Apr 26, 2007 15:10    Post subject: Reply with quote

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 Very Happy 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
View user's profile Send private message
redils



Joined: 13 Jan 2005
Posts: 27

PostPosted: Fri Apr 27, 2007 13:53    Post subject: Reply with quote

Hello Smile

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> Technical support All times are GMT + 2 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
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