We help IT Professionals succeed at work.

How to open network file?

gblxj asked
Medium Priority
Last Modified: 2013-12-03
Anybody know how to open a network file within NT services? I can't open any network files use CFile::OPen or CreateFile in my service, either can't open the files on my mapped network drive. Is there any oneknow how to do then?
Watch Question

Change the account of your service from LocalSystem to say Administrator.
To elaborate on the earlier comment.  The default service account, LOCAL SYSTEM has full privilege on the local machine but NO PRIVILEGE on a remote system.  So any request to access a remote resource like your files will fail.

To get around this, have the service run using an account that has the required local privilege as well as privilege on the remote system.  The administrator account is one possibility but I'd suggest you create another account specific to this purpose and use it.  I believe it is bad practice to run services using the administrator account.


Thanks,I see.

Explore More ContentExplore courses, solutions, and other research materials related to this topic.