Click here to Skip to main content
15,886,518 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello, Everybody.

I'm writing a service which runs javascript file with cscript.

I have two apps - client.exe and service.exe. Client sends the service a request to run cscript.exe with parameters.

The javascript file is for installing software - wpkg.js
I tried to create service to run as each type of LocalService, LocalSystem and NetworkService.

Would anyone help me understand LocalSystem's privilleges and what it can do exactly?
I'm concerned about if LocalSystem service can read all of registry keys.


Thanks,
Paul.
Posted

1 solution

From what Microsoft say[^] it looks like LocalSystem will have all the privilleges and access you will ever need.
However if you can run successfully as LocalService[^] then that may be considered a lower security risk and you may not need to audit every line of your code depending on your customer requirements.
 
Share this answer
 
Comments
Paul Zheng 18-Mar-13 8:28am    
Hi Matthew, I appreciate your first reply.

But when I tried to read registry key from service, it failed, while reading registry key from ordinary application succeeds. Have you got any idea what could be the cause of this problem?

Thanks,
Paul.
Matthew Faithfull 18-Mar-13 8:39am    
From the look of things this is going to be a specific issue with a particular Registry Key right not just a total failure to read any Registry Key?
If so then you'll need to examine the error you get back from the access attempt that fails, and you might want to try and retrieve and examine the ACL applicable to the key from the application that can access it. This should at least allow you to work out any privillege you need and don't have.
If you then add the details you've found to your question it will help others to help you.
Paul Zheng 20-Mar-13 8:51am    
Thanks for your recommendation. Here is another question.

If I get environment variable from the service I'm running as LocalSystem account, which varible will be fetched, User Variable or System Variable?
Matthew Faithfull 20-Mar-13 9:05am    
That's a good question and one I don't know the answer to. It should be straight forward enough to find out by experiment. I would expect you'll get the System Variable as LocalSystem isn't a real account but I wouldn't gaurantee it.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900