Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

can we create services?

Posted on 2004-08-09
7
Medium Priority
?
540 Views
Last Modified: 2010-04-14
can we put our own execute file into the services (in the administator tools) to make it start automatically? will the services run the execute file automatically after the windows start? Thank you..
0
Comment
Question by:vivian1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 34

Expert Comment

by:Dave_Dietz
ID: 11759090
Yes (depending on whether the executable is properly written to run as a service)

Yes (this is what services do....)

:-)

Dave Dietz
0
 

Author Comment

by:vivian1
ID: 11759349
Thank you for your answer, Dave.

But I need to how how to put our execute file into the services. Is it need to write some coding or just use some command to install the service? I wrote the execute file by using VB. Thanks.

vivian
0
 
LVL 34

Expert Comment

by:Dave_Dietz
ID: 11759468
See the following:

How To Create a User-Defined Service
http://support.microsoft.com/default.aspx?scid=kb;en-us;137890

This should get you going in the right direction.  :-)

Dave Dietz
0
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 

Author Comment

by:vivian1
ID: 11768983
Thank a lot..it's really help me to understand more about windows service.:)
I had try yesterday by following the instructions there. Anyway, it doesn't work.. everythg is ok at first, and i success to put in my service.
My execute file suppose to pop up a window with a button to click (form in VB). But, after I start the service, no window pop up...
and i look at the property of the service. i find out that the path to execute is C:\Reskit\srvany.exe.(the path where I put the instsrv and srvany). Is it the problem?

vivian
0
 
LVL 34

Accepted Solution

by:
Dave_Dietz earned 600 total points
ID: 11769080
The service should show srvany.exe as the executable.  Srvany takes a parameter that tells it what to execute as a service.

The problem is that a service shouldn't pop up dialog boxes unless it has been set to interact with the desktop. You can find this setting in the properties of the service.  The only problem here is that I'm not sure the setting would apply to the executable launched by srvany.

It almost sounds like this is a program you want to run when someone logs on.  Is this correct?  If so there are much better ways to accomplish what you are trying to do.  Let me know and I can go into more detail.

Dave Dietz
0
 

Author Comment

by:vivian1
ID: 11769231
Dave, you are right, after I set to interact with the desktop, it pop up the window.

Actually I used the pop up window for testing only. The thing I need to do is to write a program in VB. This program is to check database automatic for every 3 seconds right after the windows start. So i need to use it as a service.

Is it my program should write inside
Private Sub Form_Load() ? and then finally need to unload the form so that i no need to make it interact with the desktop?
Is it with the unload form will make the execute file stop and need to start again?

Thank a lot to Dave...you really help me a lot...:)

vivian
0
 
LVL 34

Expert Comment

by:Dave_Dietz
ID: 11769268
Now you're getting into VB programming and I'm afraid that a bit out of my range of expertise.

I would suggest posting a new question in the Visual Basic forum and see if one of the code gurus can help with that aspect of the issue....  :0-)

Dave Dietz
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
A while back, I ran into a situation where I was trying to use the calculated columns feature in SharePoint 2013 to do some simple math using values in two lists. Between certain data types not being accessible, and also with trying to make a one to…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question