473,856 Members | 1,380 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Windows Service Question

Jm
Hi all

Im writing a windows service app that accepts some remote control commands
and reports to a database server. One command i would like to use is
basically remote execution. When i start a program from the windows service
it appears to launch under another user other than who is logged in (network
service ?) the service logs on as local system. Is impersonation where i
should be looking ? Or is there a specific way i should be launching
external programs ? Any help is greatly appreciated

Thanks
Nov 21 '05 #1
2 965
Hi Jm
Don't have to just run it as a system service , You can run this service
with the credentials of some user account ( from services , right click
your service , properties ' Log on , then choose this account instead of
local system account and enter the credentials of the user you want your
service to run under ). You need to change this however if the account
information changes.
Mohamed M .Mahfouz
Developer Support Engineer
ITWorx on behalf of Microsoft EMEA GTSC

Nov 21 '05 #2
Jm
Hi mohamed

Thanks for the reply. Yes i could do that, the only problem with that is
that i wont know the credentials of another user because it will be run by
end users with very little rights to the machines. There is another windows
service in place which that will pull the new version of the windows service
that im writing down from an update server so i dont actually go anywhere 9
out of 10 of the machines. Is there some other way that i could do this ?

"Mohamoss" <mo************ @egdsc.microsof t.com> wrote in message
news:M5******** ******@cpmsftng xa10.phx.gbl...
Hi Jm
Don't have to just run it as a system service , You can run this service
with the credentials of some user account ( from services , right click
your service , properties ' Log on , then choose this account instead of
local system account and enter the credentials of the user you want your
service to run under ). You need to change this however if the account
information changes.
Mohamed M .Mahfouz
Developer Support Engineer
ITWorx on behalf of Microsoft EMEA GTSC

Nov 21 '05 #3

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

Similar topics

1
1410
by: Shawn Buchanan-Cook | last post by:
Hello, I have created a windows service that executes a application (that has a user interface), and therefore I have the "Allow service to interact with desktop" checked... I have found that because of the "Allow service to interact with desktop" flag being turned on, I can not restart/reboot my system.... I do have the CanShutdown flag in my service set to "true"...
1
3876
by: Jack David | last post by:
How would I convert the following console app to a windows service?? using System; using System.IO; using FileProcessor;
3
2203
by: Nathan Kovac | last post by:
I have a feeling I am missing something simple, but I just can't find it. Perhaps someone can give me a lead on where to look. I will describe the issue then post my code to the web service. My issue is simply getting timers to work. I have a DatabaseManager.DataManagerFacade which contains a timer. Every 6 seconds it updates stock data using an online webservice. I wrote have 2 possible startup projects to make the service work. One...
1
1329
by: vul | last post by:
I created Windows Service in VB.Net with the name MSFaxListener. It should listen Windows Fax Service events and update SQL Server database when fax job changes it's status. In order to do that in OnStart event of MSFaxListener I'm trying to connect to MS Fax Service. I set Startup Type of MSFaxListener to Automatic, so it starts and listens. Sometimes it doesn't connect to MS Fax Service. I think it is because MS Fax Service did not start...
0
871
by: lcifers | last post by:
As mentioned in my earlier post regarding creating an application object from a Windows service, I have a Windows app that I'm migrating to a Windows service. This is the first time I have written a Windows service, and it has been pretty difficult. What I'm wondering is, should my application be a Windows Service. Here's a description of the functionality: Another program sends messages to MSMQ notifying that some document properties...
4
2145
by: ggillard | last post by:
Hi, I'm new to writing services and found it pretty easy using VB.NET. My service has an internal timer that fires every 3 seconds. Each time it fires it opens a SQL DB and looks for a specific set of records. Each record it finds it sends to SAP and then changes their status so they won't be sent again. When I run this code out side of a service ( I built a small
5
606
by: Tom | last post by:
Using multiple System.Timers.Timer objects in a Windows Service for performing multi-thread activities in a periodic fashion. Timers are AutoReset=false, to only have a single timer execution thread running at any given moment. Typically, timers will have an interval of 5 to 15 minutes. Conditionally, the interval may be set to 1 second (1000 ms) before the next call to Timer.Start(). Here is the question: if the interval is one...
4
1137
by: Gordon | last post by:
Hi; I have developed a VB.net app in a module that queries a database, loads the data into several arrays and then loops through the array. It then compares time data stored in the array with the current system time. If there is a match a program is then started. The apps purpose is be like the windows task scheduler. And I want to run it as service because it will run continuosly. I can't seen to find an example of where an app like...
0
9922
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
11066
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
10702
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
10801
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
10391
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...
1
7935
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7099
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();...
1
4584
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
2
4177
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.