0

I have a scheduled task(batch script) for syncing data from a network driver everyday. The task is run as nt authority\system account. It works fine on Windows 7/2008/2012, but does not on Windows 10/2016 because the script is unable to access the network driver.

I did a test with PsExec. I'm pretty sure this issue exists only on Windows 10/2016.

Is there any configuration that I can change to fix this?

enter image description here

  • The local system account would need permission to access the file share. In a domain environment, this can be done by granting access to the file share to the domain account for the computer where this script is running. If you are not in a domain environment, you would not be able to use the local system account, and would have to run the script using a user account which exists on both machines and has been granted access to the file share. – Dawn Benton Jan 10 '17 at 5:18
  • @DawnBenton Thanks for your reply! The server is not in a domain environment. If I use a user account, I have to worry about the password, which is force to expire in 3 month according to our security policy. So this kind of behavior is introduced since Windows 10/2016? – hajimuz Jan 10 '17 at 5:33
  • @Momo Wait, your security policy force to change password every 3 months but allowing passwordless access via SYSTEM account ??? It kinda strange "security" policy... – Alex Jan 10 '17 at 6:17
  • @Alex Creating a scheduled task run as SYSTEM account is not a security concern I think. – hajimuz Jan 10 '17 at 6:44
  • @Momo You trying to access remote system that has password enforcement policy. You need to be authorized on remote system to be able to access remote file system, but you trying to login/access there(remote system) as SYSTEM account, without password which is means NO ANY SECURITY on remote side if it really allow network connection to authorize itself as SYSTEM account. If you running a task under specified user account then all actions will be done as specified user. – Alex Jan 10 '17 at 15:55
0

May be this workaround will suit you:
assign a letter for your network share with credentials; do your job; delete letter.
E.g.:
1. net use V: \\server\share /user:name1 passw2
2. copy file.txt V:\
3. net use V: /delete
(I guess you know what to put in place of name1 ant passw2)

If for some reason you have to put everything in one command line, separate commands with & or &&, e.g.:
net use V: \\server\share /user:name1 passw2 & copy file.txt V:\ & net use V: /delete

P.S. However, it seems single line command (commands separated with &) does not work in Windows7 :(

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.