473,505 Members | 15,798 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

c# widows services...

jj
I have a changed my simple windows form application to simple service. It
collects file information.
My application uses WMI and I can collect file attributes from shared and
other nodes in the network.

However, with my service I can collect file attribute info only from the
local machine the servie is running NOT from other nodes.

Can somebody help me here....
Newbie here
thanks
Jul 14 '06 #1
4 1476
How do you propose to collect information from "nodes" on another machine (on
the network I assume) -- you don't specify. Your Windows Service runs under
certain credentials, that you can control. If the account it is running under
can't access folders on another machine, then it's up to you to change that.
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"jj" wrote:
I have a changed my simple windows form application to simple service. It
collects file information.
My application uses WMI and I can collect file attributes from shared and
other nodes in the network.

However, with my service I can collect file attribute info only from the
local machine the servie is running NOT from other nodes.

Can somebody help me here....
Newbie here
thanks
Jul 14 '06 #2
Hi jj,
If you look in the control panel at your service's properties (Log On
tab), you will probably see that your service is running under the
Local System account. When a process runs under this account, it has
different privileges than a process that runs interactively. One of
the major differences is that it does not have access to network
resources. You can verify this by changing the service to run under a
different account (pick "This account:") which does have the privileges
to access network resources.

Another major difference when running under the Local System account is
that you don't (by default) have access to the desktop session of the
logged in user. This means that if you try to have your service pop up
windows, etc... it might not work. The "interact with desktop" is
meant to solve this.

Hope this helps,
John

jj wrote:
I have a changed my simple windows form application to simple service. It
collects file information.
My application uses WMI and I can collect file attributes from shared and
other nodes in the network.

However, with my service I can collect file attribute info only from the
local machine the servie is running NOT from other nodes.

Can somebody help me here....
Newbie here
thanks
Jul 14 '06 #3
Please post your code or at least the part that deals with the WMI
connection.

Willy.

"jj" <jj@hotmail.comwrote in message
news:ey**************@TK2MSFTNGP03.phx.gbl...
|I have a changed my simple windows form application to simple service. It
| collects file information.
| My application uses WMI and I can collect file attributes from shared and
| other nodes in the network.
|
| However, with my service I can collect file attribute info only from the
| local machine the servie is running NOT from other nodes.
|
| Can somebody help me here....
| Newbie here
| thanks
|
|
Jul 15 '06 #4
This is not the OP's issue. Using WMI (and it's wrapper classes in
System.Management) you have to specify explicit credentials to connect to
remote WMI services when connecting from a process that runs as a local
account.

Willy.

"John Duval" <Jo********@gmail.comwrote in message
news:11**********************@h48g2000cwc.googlegr oups.com...
| Hi jj,
| If you look in the control panel at your service's properties (Log On
| tab), you will probably see that your service is running under the
| Local System account. When a process runs under this account, it has
| different privileges than a process that runs interactively. One of
| the major differences is that it does not have access to network
| resources. You can verify this by changing the service to run under a
| different account (pick "This account:") which does have the privileges
| to access network resources.
|
| Another major difference when running under the Local System account is
| that you don't (by default) have access to the desktop session of the
| logged in user. This means that if you try to have your service pop up
| windows, etc... it might not work. The "interact with desktop" is
| meant to solve this.
|
| Hope this helps,
| John
|
| jj wrote:
| I have a changed my simple windows form application to simple service.
It
| collects file information.
| My application uses WMI and I can collect file attributes from shared
and
| other nodes in the network.
| >
| However, with my service I can collect file attribute info only from the
| local machine the servie is running NOT from other nodes.
| >
| Can somebody help me here....
| Newbie here
| thanks
|
Jul 15 '06 #5

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

Similar topics

6
2539
by: cs | last post by:
I noticed there is some .net services on my winxp. One or two mention the CLR. Does that mean that my .net apps/services wont run before those services start? I need to run my service as early on...
2
6131
by: Fred | last post by:
What is the easiest and most cost effective method of converting a Widows Form output, within the programme, to PDF format for sending by Email. Code sample in C# would be appreciated. ...
3
6470
by: Matt D | last post by:
I've got two web services that use the same data types and that clients will have to consume. I read the msdn article on sharing types...
7
6003
by: Stu | last post by:
Hi, I have a web service which returns a record set and works well integrated with an asp dot net page. However if I decided to develop a unix app will i be able to read the dataset as it is...
2
2054
by: sdstraub | last post by:
I have created 5 services in my project, in the 1st service I set servicestorun = array of all 5 services, I have a project installer with 5 service installers, one for each service. I have code...
3
2911
by: m | last post by:
Hello, I have been trying to use orphan and widow control to prevent page breaks immediately after h1 elements (on a CV). I have validated the css and html, and used the following hoping this...
0
1787
by: krishnaraju | last post by:
HI to all, please help me.its urgent requirement. my question is this is the wsdl file i got from our client.please see at bottom. when iam trying to access that webmethods iam getting...
2
996
by: Robert Bravery | last post by:
HI all, I want to write a windows service. I also want to have a form for setting properties for the service. Can some one help me out, get me started or point me in the right direction ...
1
1475
by: vasanthiraajan | last post by:
I need to capture the "Ctrl+F4" in widows application
0
7218
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,...
0
7103
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...
0
7370
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...
1
7021
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...
0
7478
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...
0
5614
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,...
0
1532
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 ...
1
755
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
409
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...

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.