473,761 Members | 9,480 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Creating a Windows Service

Hi

I have created a Windows Sesrvice through a reg file. This is the
content of the reg file:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACH INE\SYSTEM\Curr entControlSet\S ervices\User Admin
Agent]
"Description"=" Starts the User Process."

[HKEY_LOCAL_MACH INE\SYSTEM\Curr entControlSet\S ervices\User Admin Agent
\Parameters]
"Application"=" C:\\RunAgent\\U serProcess.cmd"

The service is created perfectly. What I want to do is the following.
When I stop the service I would like to kill/shutdown a process that
is initiated when the service is started. I have asked around how to
do it. I found out that it is possible but I have to add dependencies
when creating the Windows Service.
How can I create a dependency at the creation of the Windows Service?
And how can I make sure that this dependency is to shut down a
process(in this case java.exe)?

Any help will be appreciated.

Regards
Sep 11 '08 #1
0 1271

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

Similar topics

3
388
by: BobHutch | last post by:
I am trying to create a windows service using vb.net to read a sql table every half hour and copy all new records created within each half hour increment to another table. I also want to be able to email each new record to a specific person. This system will need to run automatically. I know I can do this using an exe com component using windows scheduler to trigger the com componet, but I think that I can create the same type of...
0
1616
by: Peter D. Dunlap | last post by:
I have a number of web sites on my 2003 server, each of the independent sites (i.e., not subdirectories of the localhost site). The way I have always set these up in the past is: 1. Create a directory "MySiteName" and a subdirectory "Site". 2. Share the "Site" subdirectory is "MySiteNameSite$", and give the local administrators group full access to the share. (The login I run under is a member of that group.)
2
11809
by: Val3 | last post by:
Hi all. I need to build dll(s) and windows services using VB .NET 2005 Express. When I make File/New project the windows contain only Windows application, Windows control library, Console application, DVD collection starter kit. How can I do? Any suggest? Thanks in advance. VAL
4
2361
by: SH | last post by:
I wish to create a program (really a Windows Service) that sits and waits for a client PC to communicate with it, but I can't come up with a good method of doing so. I want to have a service running on a server, waiting for clients to send it commands. The service would then do something based on the command and send the information back to the client. This is exactly what any database does. What is the best method for doing this? The...
3
1397
by: clsmith66 | last post by:
I hope this is just something stupid I'm missing and someone can easily point out my error. I'm trying to do a few turorials on windows services, and the couple I found so far just create an event log and write an entry on start and stop. I build the projects and install them fine, but when I run the service it starts and stops instantly. The service is not creating the custom event log I wanted it to but instead adds an error message in...
3
1155
by: Lenny Shprekher | last post by:
Hi, I am trying to open old VS2002 solution (windows service) under Windows 2003 SP1 but it crashes every time. However I couldn't create new blanc windows service solution too, same issue. Creating simple Windows Forms application works fine. Could you please help? Thanks!
2
1699
by: mail.microsoft.com | last post by:
Hi, I would like to write a service in C# and I have the need to display a UI with status information, statistics, etc. If I use the Windows Service project in C#, I noticed that the System.Windows namespace is not available to me in the intellisense when I type "using System.". What is the recommended procedure in C# / .NET for creating services that display UI's and need to allow interaction with the desktop?
1
6568
by: =?Utf-8?B?cm9zczYxMw==?= | last post by:
I'm puzzled by an error message encountered while creating a Windows Service. In particular, I'm creating a second Windows Service within a Windows Service project, using Visual Studio 2005. The first service works fine. The second service appears to be registered correctly; yet I get the "System error 1083 has occurred." doing a "NET START ServiceName" in the DOS window along with: "The executable program that this service is...
2
1783
by: teejayem | last post by:
I am having problems creating a Windows Service using Visual Studio 2005. Code as follows:- Imports System.IO Imports System.Net.Mail
0
9531
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9345
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10115
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9957
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9905
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9775
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6609
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5229
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3881
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

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.