Question

I'm trying to register an atl service using

ExeName.exe /service

as described here: http://msdn.microsoft.com/en-us/library/74y2334x(VS.80).aspx

After doing so though, it's not appearing in my services control panel (the one that I get to by typing Services in the start box on vista).

I've tried to dig through the atl code to see where it handles the /service switch, but can't find it, although I can find code to handle /RegServer and /UnregServer

This used to work, I've somehow managed to register this service before. But, now I've moved its location and can't get it registered again. When I run ExeName.exe /service, it does start up as a Local Server if I do a /RegServer first, but I want it installed as a service.

Am I missing something, and do you know where the handling of the /service switch is done?

Was it helpful?

Solution 4

Check that you haven't accidentally typed some characters in the name of the function ParseCommandLine in class CAtlServiceModuleT defined in atlbase.h

If you do so, there's a version of this function also in the base class which will mean eveything will compile nicely, and it could take you all day to spot this daft mistake!

;-)

OTHER TIPS

Shot in the dark: Are you running on Vista? If so make sure you are running with full admin privleges. Otherwise it's possible you're registering this app via virtualization.

Same as JaredPar did, try command with Power Shell with full admin privileges.

Running with the CAtlServiceModule::Install method out of the box, you must use the correct capitals on each argument - "/Service", "/UnregServer", etc.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top