Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Services and windows interaction

Status
Not open for further replies.

krushpof

Programmer
Jul 4, 2003
72
CA
Riddle me this:

Why are we so limited with our interaction with windows when we use a service?Why is my services,being the owner, starts app that are unable to:

1)receive parameters
2)communicate with novell client and server
3)unable to do a simple msg command to a terminal server?

I mean,sure i understand we need to be cautious with what is installed,but what more can service do that a normal not controlled app would do?

I mean sure, if the service owner is local system and don't require password,well restriction is understandable,but if i use a admin user with as PASSWORD, why can't i use it full access?Why is local system only user that can interact with desktop, but can't use a g** d*** connection made by current user to send to other?

Why can i do socket connection but not use existing client server connection..I DON'T UNDERSTAND!

Ouf!!! thsi was not meant for venting,but it got to that!!

Anyway, if someone aS answer for all this, i'd be happy to read your opinion on all these subject

Good day!
 
It's all about compromise. The service is designed to be a highly robust program that simply runs silently in the background doing it's work. To help this cause, services are cut off from many of Windows' features to reduce the chance of a chain reaction should a particular program fail.

1. Services can receive command-line parameters. Use the Param property of your TService object.

2. I was going to suggest authentication issues, but it appears you have already checked this. Make sure you've set your service up to be interactive (both in the TService object, and in the Windows Service Manager startup options).

3. Unsure what a simple Msg command is.

Also not sure what you're trying to do when you say cannot use an existing client server connection. What sort of connection and what are you trying to do?
 
Hello Griffyn ,

Yes i understand the compromise.But i was wondering why the only service owner able to interact with desktop is the local system?Why if we put the service owner as an full access admin user it cannot interact with desktop.

It's actually not really important that it interact with desktop,but why only the non password able owner?

What i am trying to do, is a services that constantly monitors certains data on a far away historien server to monitor snapshots and catch changing states and if conditions are met,starts an exec that sends warning to supervisors through mail,It dials through modem to page thechs and engineer on call that shift,sends warning to operators through as400 device session and sends message to that same user to it's windows session on a thin-client on a citrix server.

Since they are terminal and don't own an ip on the network,we cannot do a net send,so we decided to send messages through the novell connection to it's session,since it's user base and not ip/station based.

I have found an sdk to use the novell client possibility,but as a service,might i be local system or current user as owner, i cannot use connections already made.Creating an authentified connection on novell server through code is still to be achieved and novell develloper forum don't answer quation very much.

The only time they have answered me was to tell me that the error number meant that the password was wrong,but i could write anything as a user like "blabla" and i still get the same error, which means it has nothing to do with password, and that an error code description is easy enough to find that i don't need someone to answer this, but to tell me why it gives me that, when it is clearly not that error.


Anyhow,got off subject

For the parameters, i meant the service is passing parameters to the exe so that it knows which data cause it's execution and like that knows where to find who it has to warn.But the exec don't get the parameters.

The msg command seems fairly new windows command and are base on a user instead of ip,but it needs to pass through a server to find to who this belongs.This solution, was found yesterday,but we have the same problem as with novell,it doesn't use the connection establish when it is the services that starts it.

To have this command work on normal condition, we need to have a connection establish between the station and the citrix server,but all we need is a normal windows connection.I mean all i need to do is open once through the run command the server share, and then i can use that all the time.But not with the service if it calls the exe.

So anyhow, what i think ,since i can connact to a smtp server through socket, and connect to as400 through client access, is i need to create the connection every time,so that the program can use it.I just hate the fact that it just cannot use existing client-server connection(novell) or existing sharing connection with citrix server for msg command.

Now i am waisting to much time on the novell case, and i will go for a share connect so i can use the msg instead.If i am right,it should work.

So basicly, i feel like the services are to restricted and i don't understand why it connot used connections made by a session open by it's owner current connection and why the only owner able to interact with desktop is the local system.

Thank you for your answer!

I will check the interactivity in the Tservice propreties,maybe that will help somehow!


 
Well,

The interactive property just makes the services interact with desktop by default.It was a question i didn't get an answer, now i can install it without users interaction for this part.But it does not regulate the rest.

But thank, i am glad to have this answer:)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top