views:

50

answers:

1

I have created a Windows Service that has a function that creates a new file.

It is running under "Local System account" with "Allow service to interact with desktop" set to true.

When running under this account can files be created locally?

I can't debug this to get the exact error as it is running in a Lab Manager environment that has no suitable debugger installed.

It looks to me to be a permissions problem based on when the service crashes so the simple answer I need before trying anything else is can this account create files on the Local System?

I can't seem to find a site with the answer...?

Any help would be greatly appreciated.

+1  A: 

"Allow service to interact with desktop" is only needed to be able to display messages for a logged in user.

Local System should have write access to local hard drives. You can not access mapped network drives or any other network resources for that matter.

jgauffin
What about a local folder that is shared on the network? Would that turn it into a network resource in the eyes of Windows even though the folder is on the local machine?
Dan Harris
I'm unsure if you use the UNC path ("\\computername\sharename"). Accessing it using a local path ("C:\sharedfolder") should work OK.
jgauffin
If you're in a domain, the service will authenticate with the domain computer account to other systems. If not on a domain, you'll need to use NetUseAdd to specify a remote username and password to set up the remote path.
Chris Smith