Author |
FreeAXP - Run as a service |
jpigott
Member
Posts: 2
Joined: 26.04.11 |
Posted on April 26 2011 11:51 |
|
|
Is it possible to run the current version of FreeAXP as a windows service? |
|
Author |
RE: FreeAXP - Run as a service |
John Manger
Moderator
Posts: 63
Location: nr Heathrow, Middlesex, UK
Joined: 18.03.10 |
Posted on April 26 2011 20:55 |
|
|
The current release of FreeAXP '1.3.0.351' is not designed to be run as a service.
'Run as a service' is a feature that requires a different approach to the emulator's VLC console and the o/s console, as well as its interaction with the desktop. We have an internal development release with this capability but there is no product ship date at this stage.
John M
Edited by John Manger on April 28 2011 10:42 |
|
Author |
RE: FreeAXP - Run as a service |
Bruce Claremont
Moderator
Posts: 623
Joined: 07.01.10 |
Posted on April 27 2011 14:02 |
|
|
These links may help:
http://www.timdavis.com.au/general/creating-a-user-defined-service-in-windows-7/
http://answers.microsoft.com/en-us/windows/forum/windows_vista-performance/how-do-i-create-a-user-defined-service/ed290a19-3115-4c26-abee-5122181877e1
http://support.microsoft.com/kb/137890
Avanti and AvantiFlex will support running as a service in release 2.1 or 2.2. |
|
Author |
RE: FreeAXP - Run as a service |
srallen87
Member
Posts: 9
Joined: 04.08.11 |
Posted on August 09 2011 03:26 |
|
|
Thanks for those links Bruce. |
|
Author |
RE: FreeAXP - Run as a service |
NeonJack
Member
Posts: 12
Joined: 30.03.10 |
Posted on January 14 2013 04:32 |
|
|
I have got FreeAXP running as a service, and it works very well indeed, following these links: you have to use the word "Application" where Tim Davis's article says "App-" and AppParameter must just be the "/CONFIGURATION_FILE="/path/to/whatever_your_conf_file_is_called.cfg" but otherwise it all works well. You can use the windows sc command to add a description after you have the service installed, if you want e.g.
sc description name_of_service "This is a description for the Freeaxp emulator application running as a service"
I would recommend setting the service as manual or Automatic (delayed start) because I think Windows has enough to be starting with getting all the rest of its stuff to support the system up and running before having to worry about FreeAXP. If you SET AUTO_ACTION BOOT and SET BOOTDEF_DEV ddua (i.e. your boot disk) and exit properly it will save that in the nvr file and automatically boot up next time your host machine reboots. |
|
Author |
RE: FreeAXP - Run as a service |
NeonJack
Member
Posts: 12
Joined: 30.03.10 |
Posted on January 14 2013 04:42 |
|
|
Following on from this, what would be particularly nice would be to intercept machine shutdown (or shutdown and restart) so that putty can be configured to logon to the console (OPA0) as system and issue a shutdown command, followed by a console firmware exit, before the host machine finally shuts up.
I am looking into this, but if anybody has the answer that would be great. |
|
Author |
RE: FreeAXP - Run as a service |
NeonJack
Member
Posts: 12
Joined: 30.03.10 |
Posted on January 16 2013 05:09 |
|
|
NeonJack wrote:
Following on from this, what would be particularly nice would be to intercept machine shutdown (or shutdown and restart) so that putty can be configured to logon to the console (OPA0) as system and issue a shutdown command, followed by a console firmware exit, before the host machine finally shuts up.
I am looking into this, but if anybody has the answer that would be great.
I have found a solution to this:-
You need ExtraPuTTY which has a script facility. Set the script to login to the system console as SYSTEM and then issue a SHUTDOWN command. put a 40 second or so wait command in then issue 'exit' (without quotes) at the firmware console prompt to make the emulator itself spindown. Windows will then stop the service as part of its shutdown.
Then, you create a batch file that calls putty (from the \extraputty\ directory) on the command line, specify -load "name of session" -startup "name of shutdown script" and then put this batch file into the shutdown files (searchon the Internet for "adding Windows shutdown tasks" to find out how to do this) so that it executes before Windows completes its shutdown.
Note that FreeAXP as a service relies on you not needing to change the configuration interactively, so, for example, it's no good putting in a "ask at runtime" selection for the NIC to use when FreeAXP starts running.. |
|
Author |
RE: FreeAXP - Run as a service |
lottabull
Member
Posts: 10
Location: USA
Joined: 14.02.08 |
Posted on April 26 2013 08:21 |
|
|
NeonJack, could you post a redacted copy of the (LUA?) login-and-shutdown script?
|
|
Author |
RE: FreeAXP - Run as a service |
NeonJack
Member
Posts: 12
Joined: 30.03.10 |
Posted on May 23 2013 23:32 |
|
|
Yes here we are:-
<?xml version="1.0"?>
<!--Registry file for ExtraPuTTY, Copyright 2011-->
<ExtraPuTTYTreeCmd>
<Position name="ExtraPuTTY" use="0">
<btlr name="bottom" value="0"/>
<btlr name="top" value="0"/>
<btlr name="left" value="0"/>
<btlr name="right" value="0"/>
</Position>
<Position name="PuTTY" use="0">
<btlr name="bottom" value="0"/>
<btlr name="top" value="0"/>
<btlr name="left" value="0"/>
<btlr name="right" value="0"/>
</Position>
<Options Locked="0"/>
<root name="Shutdown" RGB="16711680" lfHeight="-12" lfWidth="0" lfEscapement="0" lfOrientation="0" lfWeight="700" lfItalic="255" lfUnderline="1" lfStrikeOut="0" lfCharSet="0" lfOutPrecision="3" lfClipPrecision="2" lfQuality="1" lfPitchAndFamily="34" lfFaceName="Arial">
<childroot name="doShutup" type="2" loop="1" auto="0" RGB="128" lfHeight="-12" lfWidth="0" lfEscapement="0" lfOrientation="0" lfWeight="700" lfItalic="255" lfUnderline="0" lfStrikeOut="0" lfCharSet="0" lfOutPrecision="3" lfClipPrecision="2" lfQuality="1" lfPitchAndFamily="34" lfFaceName="Arial">
<childscenarii name="login" cmd=" " tempo="1000" mode="execute" CRLF="1" RGB="0" lfHeight="-12" lfWidth="0" lfEscapement="0" lfOrientation="0" lfWeight="400" lfItalic="0" lfUnderline="0" lfStrikeOut="0" lfCharSet="0" lfOutPrecision="3" lfClipPrecision="2" lfQuality="1" lfPitchAndFamily="34" lfFaceName="Arial"/>
<childscenarii name="username" cmd="SYSTEM" tempo="1000" mode="execute" CRLF="1" RGB="0" lfHeight="-12" lfWidth="0" lfEscapement="0" lfOrientation="0" lfWeight="400" lfItalic="0" lfUnderline="0" lfStrikeOut="0" lfCharSet="0" lfOutPrecision="3" lfClipPrecision="2" lfQuality="1" lfPitchAndFamily="34" lfFaceName="Arial"/>
<childscenarii name="pwd" cmd="put_your_login_password_here" tempo="1000" mode="execute" CRLF="1" RGB="0" lfHeight="-12" lfWidth="0" lfEscapement="0" lfOrientation="0" lfWeight="400" lfItalic="0" lfUnderline="0" lfStrikeOut="0" lfCharSet="0" lfOutPrecision="3" lfClipPrecision="2" lfQuality="1" lfPitchAndFamily="34" lfFaceName="Arial"/>
<childscenarii name="issue shutdown command" cmd="SHUTDOWN" tempo="1000" mode="execute" CRLF="1" RGB="0" lfHeight="-12" lfWidth="0" lfEscapement="0" lfOrientation="0" lfWeight="400" lfItalic="0" lfUnderline="0" lfStrikeOut="0" lfCharSet="0" lfOutPrecision="3" lfClipPrecision="2" lfQuality="1" lfPitchAndFamily="34" lfFaceName="Arial"/>
<childscenarii name="send CRLF" cmd=" <VK_RETURN>" tempo="30000" mode="execute" CRLF="1" RGB="0" lfHeight="-12" lfWidth="0" lfEscapement="0" lfOrientation="0" lfWeight="400" lfItalic="0" lfUnderline="0" lfStrikeOut="0" lfCharSet="0" lfOutPrecision="3" lfClipPrecision="2" lfQuality="1" lfPitchAndFamily="34" lfFaceName="Arial"/>
<childscenarii name="send CRLF" cmd=" <VK_RETURN>" tempo="30000" mode="execute" CRLF="1" RGB="0" lfHeight="-12" lfWidth="0" lfEscapement="0" lfOrientation="0" lfWeight="400" lfItalic="0" lfUnderline="0" lfStrikeOut="0" lfCharSet="0" lfOutPrecision="3" lfClipPrecision="2" lfQuality="1" lfPitchAndFamily="34" lfFaceName="Arial"/>
<childscenarii name="firmware exit" cmd="exit" tempo="1000" mode="execute" CRLF="1" RGB="0" lfHeight="-12" lfWidth="0" lfEscapement="0" lfOrientation="0" lfWeight="400" lfItalic="0" lfUnderline="0" lfStrikeOut="0" lfCharSet="0" lfOutPrecision="3" lfClipPrecision="2" lfQuality="1" lfPitchAndFamily="34" lfFaceName="Arial"/>
</childroot>
</root>
</ExtraPuTTYTreeCmd>
It's not infallible but seems to work well when running as part of the Windows Shutdown procedure as I explained earlier.
Most of the time it works OK when the host user is logged in, but it doesn't always work very well as part of a standalone Scheduler task... |
|