apaclark
asked on
Close Server Console through DOS prompt
I'd like to be able to gracefully bring down the Domino Server through a bat program (or whatever) after the UPS has turned on. In other words when the PC server (windows 2003) loses power for x minutes I can have the UPS issue a DOS command. I would like to have it properly bring down Lotus.
ASKER
Yes, but isn't that the same as "X"ing out the window? I was looking for something that would end it in the sameway that "exit" would but issued outside of the console itself as the UPS software can only run windows commands.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
1) You have to make sure that the Domino server is running as a service.
2) Test your Net stop command manually to make sure it works.
Newer servers use longer names
net stop "lotus (notesdata)"
You made need the quote marks for any service name wth spaces.
The name should be taken from the Service in Windows !
I hope this helps !
2) Test your Net stop command manually to make sure it works.
Newer servers use longer names
net stop "lotus (notesdata)"
You made need the quote marks for any service name wth spaces.
The name should be taken from the Service in Windows !
I hope this helps !
ASKER
Excellent! Thanks
But you can always issue console commands through dos using nserver.
At the dos prompt navigate to the folder containing the notes executables, say c:\notes.
Then issue the command Nserver -q
Which issues a q command to the console.
So the batch file would contain
cd c:\notes
nserver -q
At the dos prompt navigate to the folder containing the notes executables, say c:\notes.
Then issue the command Nserver -q
Which issues a q command to the console.
So the batch file would contain
cd c:\notes
nserver -q
ASKER
Nice! I like that even better as we are not always in the habit of running the server as a service. This should work regardless of the startup method.
Yes, it does work whether the server is running as a service or as an application.
Sometimes one or two threads might get stuck so I usually sleep for a couple of minutes then used nds to kill any threads that have not closed gracefully -
cd c:\notes
nserver -q
sleep 120
nsd -kill
Sometimes one or two threads might get stuck so I usually sleep for a couple of minutes then used nds to kill any threads that have not closed gracefully -
cd c:\notes
nserver -q
sleep 120
nsd -kill
To find the correct service name to stop, open a command prompt on the Notes server, enter
net start
This will show a list of running services.
Find the one for Domino, then use this name in the "net stop" command; if the name contains spaces, enclose it in quotes, like this (assuming "Domino Server" as service name):
net stop "Domino Server"