473,545 Members | 1,558 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Windows Service Application from Windows application

I have an application that I have been using for quite a while. It runs a print queue for remote printers connected over TCP/IP. It reads from a print_queue on a database server then sends the job to the correct printer. Its been working well for 3 years now. However I want to convert it so that it runs as a service(if the application gets closed the printers are down and product flow stops). I have my service application setup, and it appears to work and load the pallet program, however it does not show the monitoring form associated with the application. So I cannot for sure guarantee that it is running.. How can I do this? as well as minimize it to the system tray?

I have followed the tutorials that I have found, but I don't need to constantly write to the eventlog or monitor file access...

--
--Eric Cathell, MCSA
Nov 21 '05 #1
2 1123
I'm not too familiar with creating services, but by definition I think they
run wihtout a logged in user, meaning they will not display any UI because
they do not run on the desktop, but rather in the background.

If you want to track what the service is doing, there are certain ways to
make the OS aware of the service's status (it may even happen by default
when you install it as a service).

I can't tell you the code for this, but a simple and dirty solution is to
write to a log file or database table. Maybe make an entry every minute
stating the time/date and that the application is running.
"ECathell" <ec******@nospa m.com> wrote in message
news:eJ******** ******@TK2MSFTN GP09.phx.gbl...
I have an application that I have been using for quite a while. It runs a
print queue for remote printers connected over TCP/IP. It reads from a
print_queue on a database server then sends the job to the correct printer.
Its been working well for 3 years now. However I want to convert it so that
it runs as a service(if the application gets closed the printers are down
and product flow stops). I have my service application setup, and it appears
to work and load the pallet program, however it does not show the monitoring
form associated with the application. So I cannot for sure guarantee that it
is running.. How can I do this? as well as minimize it to the system tray?

I have followed the tutorials that I have found, but I don't need to
constantly write to the eventlog or monitor file access...

--
--Eric Cathell, MCSA
Nov 21 '05 #2
Thanks for the reply.

I am looking into now simply running the service, but then find
someway(remotin g and reflection?) to attach to it to monitor it. I know it
can be done because that is the way several programs I use appear to
work(sql server manager being one, Avalanche Wavelink another)

The base process or agent runs as a service then they have a GUI manager
that either displays the status(sql) or actually let you manage the agent
process(avalanc he). I think thats the route I am going to try and take...but
its gonna be a challenge methinks...
--
--Eric Cathell, MCSA
"Jim Underwood" <ja************ *@fallonclinic. com> wrote in message
news:uA******** ******@tk2msftn gp13.phx.gbl...
I'm not too familiar with creating services, but by definition I think
they
run wihtout a logged in user, meaning they will not display any UI because
they do not run on the desktop, but rather in the background.

If you want to track what the service is doing, there are certain ways to
make the OS aware of the service's status (it may even happen by default
when you install it as a service).

I can't tell you the code for this, but a simple and dirty solution is to
write to a log file or database table. Maybe make an entry every minute
stating the time/date and that the application is running.
"ECathell" <ec******@nospa m.com> wrote in message
news:eJ******** ******@TK2MSFTN GP09.phx.gbl...
I have an application that I have been using for quite a while. It runs a
print queue for remote printers connected over TCP/IP. It reads from a
print_queue on a database server then sends the job to the correct
printer.
Its been working well for 3 years now. However I want to convert it so
that
it runs as a service(if the application gets closed the printers are down
and product flow stops). I have my service application setup, and it
appears
to work and load the pallet program, however it does not show the
monitoring
form associated with the application. So I cannot for sure guarantee that
it
is running.. How can I do this? as well as minimize it to the system tray?

I have followed the tutorials that I have found, but I don't need to
constantly write to the eventlog or monitor file access...

--
--Eric Cathell, MCSA

Nov 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
7239
by: SP | last post by:
Hi All, I wrote a windows service which is supposed to stop after specified amount of time. I am calling OnStop() after specified time. OnStop() methods executed but I dont see the service stopping. Please advise how to stop the service. Thanks, SP
5
2677
by: pberna | last post by:
Dear all, I built a Web Form application to start and stop a Windows Service remotely. I successful tested the application on Windows 2000 server + IIS. I must include the ASPNET user to the Administration group (on server side) to have the necessary authorization to start a Windows Service (I don't understand why "Power User" rights are...
4
5574
by: Blaxer | last post by:
I have read approximately 30 articles now on various methods to make your vb.net application automatically update itself and I can't see how they apply to a vb.net windows services projects. The goal of the project is to write a windows service in vb.net that runs on many workstations that can automatically update itself from a central web...
2
6880
by: deko | last post by:
When to use a privileged user thread rather than a windows service? That's the question raised in a previous post . It was suggested that if the service needs to interact with a WinForms app (which is the UI used to adjust the actions taken by, and the schedule of the service), then a privileged user thread should be used in the UI - no...
7
2382
by: Ahmed Perlom | last post by:
Hi all, I am trying to start a windows application that has a GUI from a Windows service written in .NET 2.0. I have been searching on this for few days now with no avail. When using the System.Diagnostic.Process object to start the application (i.e Notepad), the new app runs and it is listed on the task manger list, but the GUI...
4
4162
by: tshad | last post by:
What would be a good way to check programmatically whether a service was running? We have a service that dies periodically and I need to check to see if this service is running. I know how to check to see if the status is in stopped or running mode. But that doesn't tell me if it is actually running. I need to know this so that if it...
3
13770
by: =?Utf-8?B?RGFuZGFuIFpoYW5n?= | last post by:
Now I have a web application, a web service and a SQL Server database. The Web application will invoke the web service, the web service invokes the SQL Server stored procedure. I let the web service run in an application pool which runs under a domain user, this domain user has permissions of accessing database and the connection to...
5
4250
by: sonali_reddy123 | last post by:
Hello all, I am trying to develop an application which will run as a windows service. The application should have Normal options available with service like start, stop and pause but along with this I need an option to show the windows application which my service has started as a result of its invokation. So I have written a service...
0
2678
by: =?Utf-8?B?U2ltb25EZXY=?= | last post by:
Hi All I would like to install the same Windows Service project on the same server under different names, one for each customer. I have been able to do it but I would like an expert opinion as to whether my solution is robust or whether there is a better way to do it. What I've been trying to do is to create a core project with different...
2
4469
by: =?Utf-8?B?dmlzaHJ1dGg=?= | last post by:
Hi, I have 2 applications running, one Windows application project and the other windows services project. I want to call my Windows application in my windows services. I want to run them as seperate process. If my windows application starts running,only if it completes fully, then my windows services should continue its execution. My...
0
7401
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7656
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7807
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7756
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5971
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3442
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1879
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1014
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
703
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.