XymonPSClient 64/32 bit and service runner issues

David Baldwin david.baldwin at ausport.gov.au
Fri Oct 29 02:47:53 CEST 2010


All,

The Xymon powershell client is coming along, but I've run into some
annoying issues which are little to do with powershell itself and was
seeking some advice if anyone is more familiar with options available
for Windows for running services and 32/64 bit environments.

I was just testing on a 64-bit 2008 server, installed service from an
interactive shell, created a reg key with servers list I want to use
then started service. Problem was, it didn't find the reg keys. Turned
out that XYMONPSCLIENT.EXE (ABC-SRVANY.EXE) is running in 32-bit mode,
and despite the PDF doc suggesting it can run 64-bit apps, and that the
explicit path for powershell.exe appears to be the 64-bit version, it
started as 32-bit and couldn't find the reg key because it could only
see HKLM:\SOFTWARE as the HKLM:\SOFTWARE\WOW6432NODE subtree.

I could put in logic to detect that and explicitly use WOW6432NODE even
in 64-bit mode, but there's no reason to be running in 32-bit mode when
it should be possible to run 64-bit when running as a service. I also
have an issue with ABC-SRVANY.EXE, that if the child powershell process
dies for whatever reason, the service process is still running but it
doesn't seem to care, doesn't try to restart, doesn't exit (which would
allow Windows service restart options to take effect), just sits there!

Does anyone have any suggestions? If someone is able to write a basic
(.Net-based?) .EXE service runner that just calls a powershell script
and runs in 64-bit mode if it can, 32-bit otherwise that would seem
ideal. All it would need to do is start the child process, handle
service stop/start signals and manage the child process, and exit if the
child dies. Doesn't sound hard, but I have no development environment
for that available so don't really know where to start.

Thanks, David.

-- 
David Baldwin - IT Unit
Australian Sports Commission          www.ausport.gov.au
Tel 02 62147830 Fax 02 62141830       PO Box 176 Belconnen ACT 2616
david.baldwin at ausport.gov.au          Leverrier Street Bruce ACT 2617


-------------------------------------------------------------------------------------
Keep up to date with what's happening in Australian sport visit http://www.ausport.gov.au

This message is intended for the addressee named and may contain confidential and privileged information. If you are not the intended recipient please note that any form of distribution, copying or use of this communication or the information in it is strictly prohibited and may be unlawful. If you receive this message in error, please delete it and notify the sender.
-------------------------------------------------------------------------------------



More information about the Xymon mailing list