0

I have a batch file, which i'm wanting to run as System, as the program the batch runs refuses to run as an administrator account through scheduled tasks. As a last resort, i'm wanting to run the scheduled task as the local system account. The batch file needs to save files in a network path, which is specified in the batch file. The problem is that the system user doesn't seem to have the needed access to write to the network locations. How can i give the local system user access to write to the network path?

Mooticus
  • 59
  • 10
  • Did you try using [`runas`](https://technet.microsoft.com/en-us/library/Bb490994.aspx) with an account that has the necessary permissions? – alldayremix Jul 29 '15 at 04:45
  • The local system users accesses the network using the computer account, COMPUTERNAME$. You need to give that account the appropriate permissions on the server. – Harry Johnston Jul 29 '15 at 04:57
  • @alldayremix: that would be a bad idea (unless absolutely unavoidable) because it means storing a password in a batch file. – Harry Johnston Jul 29 '15 at 04:58
  • I don't want to store passwords in a batch file. Going through and adding 200 computers to the permissions isn't going to be possible either. Using the admin account is looking like my only option, but the local system account is the only way i can actually run the batch. Running the batch file from scheduled task with my admin account, just isn't working. Is there a way to give a folder permissions for every computer to write to it? – Mooticus Jul 29 '15 at 05:12
  • I should also point out that my domain admin account does work, HOWEVER, only when i untick "do not store password". Due to GPO restrictions, this needs to work when ticked... – Mooticus Jul 29 '15 at 05:16
  • Well, how about granting permissions to the "Domain Computers" group? Or you could create a group of your own and add the relevant computers to it. – Harry Johnston Jul 29 '15 at 23:35
  • How I solved it was setting a new share drive, and setting up the share permissions for that drive. That allowed the domain computers group to access the drive, while also not giving everyone access. Exactly what I wanted. – Mooticus Jul 29 '15 at 23:46

0 Answers0