1

Background:
If I install old installation package (created in 1998) the service starts without any problem.This package was created using InstallShield and project code is not available. It is using local deployment and all the dependent DLLs are in bin directory. It used custom installservice.exe (code for this also not available) to install lp30.exe as windows service.

What I am doing:
I need to create a working installable package on win2k8 using VS 2010. On VC++, I could create .msi & setup files using the files & folder structure and identified registry entries from old installation.

Problem:
In setup project, customization is done to invoke installservice.exe to install the lp30.exe as service. But the service start is ending with below error:

 "Error: 1053 The service did not respond to the start or control request in a timely fashion"

Analysis:
installservice.exe could not start the lp30.exe as service. It is failing at the library call to PS2FaxW.dll Function. This is a third party DLL dated back in 1998, source code of which is not available.

The DLLs are available at application path and do not require registry. I found they are loaded.But while profiling with dependencywalker, I see below error:

GetProcAddress(0x75790000 [KERNEL32.DLL], "IsTNT") called from "PS2FAXW.DLL" at address 0x10003F81 and returned NULL. Error: The specified procedure could not be found (127).

LoadLibraryA("\LincPag2.dll") returned NULL. Error: The specified module could not be found (126).

And finally exiting with

Exited "LP30.EXE" (process 0x1DE8) with code 126 (0x7E).    

Question:
I am using the same "installservice.exe" and same application (lp30.exe) for starting the service. But the behaviour is not as it was with old package. What other configurations, I might be missing in this scenario?

keaukraine
  • 5,315
  • 29
  • 54
  • I sometimes get the service cannot start issue due to login credentials or permissions. have you tried running the service as a local admin account to be sure its not permission related? – WraithNath Jan 04 '13 at 15:05

2 Answers2

1

The current directory for a service is, by default, the system32 folder as written in Current directory for Windows service is not what you expect. Also see this StackOverflow question What directory does a Windows Service run in?.

Essentially your service is trying to load the DLLs from system32, not the application directory. You could try putting the LincPag2.dll into system32 and see if that temporarily solves the problem. I don't think putting the DLLs in system32 is the best long term solution, but it could be a useful debugging step.

Community
  • 1
  • 1
Steve
  • 7,171
  • 2
  • 30
  • 52
0

Try calling the service with a command-line switch like this:

LP30.EXE /install

Does LP30.EXE produce any output to the console at all ?

Try using the "sc" command:

sc create LP30 binPath= "\"C:\Program Files\Foo\LP30.exe""

If all else fails, run the original (1998) program under Process Monitor to see exactly what it's doing.

Nothing 2 Lose
  • 180
  • 1
  • 3
  • 8