Click here to Skip to main content
13,044,467 members (58,193 online)
Rate this:
Please Sign up or sign in to vote.
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.

Posted 18-Mar-13 1:57am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

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.
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?

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)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170713.1 | Last Updated 20 Mar 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100