Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to make an exe running as one of NT service?

Status
Not open for further replies.

accuransx

Programmer
Joined
Sep 23, 2000
Messages
62
Location
MY
I've compile my exe and how can i make this exe as my NT service?
 
There is a utility in the Windows NT Resource Kit called "srvany" that will do this for you. There is a good article in TechNet on the details. Take a look at article Q137890 on the TechNet CD or at Search the KnowledgeBase for that doc number.

Hope this helps... 8-) - Bill

"You can get anything you want out of life, if you'll just help enough other people get what they want" - Zig Ziglar
 
There is also an OCX (NTSVC.OCX) that is available for D/L from MS or from the Resource Kit that will automatically make any NT program into an NT service. I have used this OCX several times in the past and it works great.
- Jeff Marler B-)
 
I've try with SRVANY.EXE and part of my problem settled. I've also tried NTSVC.OCX and yes it can make them an NT services. BUT my problem now is, whenever I log off, my service stop functioning, although it shows that it is running ok in the Service Manager. If i press stop and start it again, it's working ok. How to solve this?
 
Really!? Wow, it (NTSVC.OCX) has always worked well for my services. Here are a few quick quesions . . .

Do you have it set to start automatically?

Under what user ID is the service to run?

Do you allow it to interact with the desktop?

When you come in and it is not working (even though the service manager shows that it is) can you see the program in the process list?

Finally, do you get any errors (either visible to the user or appearing in the event log)?

I know that ntsvc will work . . . I just think you might be having a configuration problem. - Jeff Marler B-)
 
my service still down when i log off. Anybody could help??
 
see previous questions . . . - Jeff Marler B-)
 
MSDN has loads of bumf about how to use NTSVR but only seems to have the uncompiled C. Where can I get a compiled version of this ?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top