CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    Join Date
    Apr 2010
    Posts
    13

    Question Simple windows service does not run under XP

    So I am trying to build a service for XP SP3 in VS2008, using the C++ Windows Service template.
    The VS2008 is sitting on a Vista machine, but I have an XP machine running in VmWare for testing.

    I have tested the service on Vista and it works perfectly, even self installing with "servicename -Install", all I have to do then is tell it to start, and it performs the tasks I require. However when copying the same binary I just ran over to the XP VM, and running the same command, I get: "The System cannot execute the specified program." I thought it was perhaps the VM had a lower vesion of .NET so I even installed .NET 3.5 and all of its service packs. Still no go.

    I am new to writing services for windows so I may be overlooking something obvious. Any help is appreciated.

  2. #2
    Join Date
    Apr 2010
    Posts
    13

    Re: Simple windows service does not run under XP

    Furthermore after running Dependency Walker on my service, it says it can't find ieshims.dll and wer.dll. How do I get VS2008 to make this service complete with everything it needs to run on the VM?

  3. #3
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: Simple windows service does not run under XP

    Quote Originally Posted by lilrangerabn View Post
    I thought it was perhaps the VM had a lower vesion of .NET so I even installed .NET 3.5 and all of its service packs. Still no go.
    If you wrote the service project in C++, then installed a newer version of .NET won't help.

    What you need to do is determine the dependencies of your application.

    Find depends.exe on the machine with Visual Studio installed and copy it over to the XP machine. Run your program under it and it will tell you if there are any missing dependencies. I suspect, you'll need to install the VC redistributables.

  4. #4
    Join Date
    Apr 2010
    Posts
    13

    Re: Simple windows service does not run under XP

    Quote Originally Posted by Arjay View Post
    What you need to do is determine the dependencies of your application.

    Find depends.exe on the machine with Visual Studio installed and copy it over to the XP machine. Run your program under it and it will tell you if there are any missing dependencies. I suspect, you'll need to install the VC redistributables.
    The dependencies missing are: IESHIMS.DLL and WER.DLL.

    I have seen several posts regarding this issue, some where resolved by ensuring IE8 was installed, which it is. Others by ensuring a release version was built, not a debug version. The first was a debug version but I just recently tried it with a release version and still the same issue.

    Are these DLLs in the VC redistributable?

  5. #5
    Join Date
    Apr 2010
    Posts
    13

    Re: Simple windows service does not run under XP

    Correction, I grabbed the wrong binary... it works with the release version.

  6. #6
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: Simple windows service does not run under XP

    Cool

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured