I have an old 32bit delphi application (with no source code), that is used as a windows service. It runs fine on windows 2003 32bit.
I do not know if it has been created as a service originally, or converted to one later on. It is supposed to get installed to the server using a /install
flag on the command line.
When attempting to install it on a Windows 2008 R2 virtual machine, I am getting an APPCRASH event in the event log.
The service is supposed to read a blob from a remote SQL Server instance and write it out to the local HD. It also reads some initialization data from the registry.
Is there any way I can install this application as a service on windows 2008 r2 64bit?
If not, are there any workarounds I can try?
What are your suggestions?
We've written quite a few of those Delphi 32-bits services ourselves, and the only thing that actually helps us "debug" the services running on servers (64-bit included) without the source code is Sysinternal's (now Microsoft Technet) Process Monitor.
In your specific case, I'd download Process Monitor (it's a simple executable) and run it and then set it up to filter only your service's .exe application. Look around for it's docs, but this is actually a very simple filter.
Keep Process Monitor running (filtered) on both machines while you start the service. Compare results from Process Monitor. I bet you have something like a missing registry key, or a missing directory or permission which causes the Delphi app to raise and Exception. This should be easy to spot on Process Monitor. Even more if you have a working machine to compare to.
I had the same problem, but Ricardo Pardini's hint with Process Monitor was the solution, I found out that the service (even at the time of just installing it) was looking for a dbExpress DLL which was not in the application directory nor in the search path. Copying the DLLs into the same folder resolved the problem.
Without access to the application or any trace why it might crash I can only offer some general ideas for what might help.
If it's just a POS (Plain Old Service ;) ) you can follow the instructions here http://support.microsoft.com/kb/251192 to manually install it as a service. That way you will get around a failing install routine if the application itself works.
You can also try to run it using the compatibility mode. Old Delphi applications can benefit a lot from this.
also ms has several app compatibilty updates to r2, so if you haven't hit windows update and download.
also can you run the app directly without the /install parameter?
It's probably trying to read something from the 64 bit version of windows rather than the 32 bit version of windows. Make sure that you have the 32 bit sql server client installed and functioning properly. Other than that post the appcrash which should tell you which DLL to put in wow32.
We have decided to keep running on a 32bit OS in the meantime and rewrite this app in .NET...
You didn't mention anything about UAC. Disable UAC altogether and try it again.