crazywolf2010
asked on
Windows scheduled task and shared drive mapping
Hi,
I am using scheduled task to schedule one of my batch file to delete files from a shared drive. When scheduled this file is returning errors "access denied". If I run the same batch file as logged in user, it all goes fine.
Does scheduled task run as user who submit task or run as system internal user?
How do I get shared mapping working thru batch script without revealing the password?
Many Thanks
I am using scheduled task to schedule one of my batch file to delete files from a shared drive. When scheduled this file is returning errors "access denied". If I run the same batch file as logged in user, it all goes fine.
Does scheduled task run as user who submit task or run as system internal user?
How do I get shared mapping working thru batch script without revealing the password?
Many Thanks
ASKER
Hi,
I don't have domain account with all privs. I wish to do it thru a machine admin account. I have domain account for mapping shared drive with limited privs.
Thanks
I don't have domain account with all privs. I wish to do it thru a machine admin account. I have domain account for mapping shared drive with limited privs.
Thanks
but if shared folder has set NTFS/share permission (they are cumulative) which does not allow local users (even admins) to modify (delete) its content you won´t be able to achieve this.
You has to work with account (set schedule task to un under this account) which has privilege to modify contend of your desired shared folder.
You has to work with account (set schedule task to un under this account) which has privilege to modify contend of your desired shared folder.
ASKER
Hi Mate,
Probably I didn't write my setup clearly, here are the details.
I have a machine admin user "admin" with all privs
I then have a Domain user with only limited privs to "SHARE" as "user"
Once I login at machine, I use net share command and use "user" credentials to map shared drive. I can run commands manually and they do work fine.
How do I replicate it at scheduled task?
Regards
Probably I didn't write my setup clearly, here are the details.
I have a machine admin user "admin" with all privs
I then have a Domain user with only limited privs to "SHARE" as "user"
Once I login at machine, I use net share command and use "user" credentials to map shared drive. I can run commands manually and they do work fine.
How do I replicate it at scheduled task?
Regards
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi,
I don't want user to login to fire this task. It's spooling,copying files at 5am.
Can I schedule it thru scheduled task but then the challenge is mapping shared drive.
Thanks
I don't want user to login to fire this task. It's spooling,copying files at 5am.
Can I schedule it thru scheduled task but then the challenge is mapping shared drive.
Thanks
the task is scheduld and will be proceed automatically at desired time and date under defined user credentials and with his permissions - no need to be logged as that user, it is enough to have PC powered on.
ASKER
That's great. I will test.
How does network share mapping will work under such scenario? Do I need to map that share on the machine explicitly after reboot? OR I have to use net use command within script?
Thanks
How does network share mapping will work under such scenario? Do I need to map that share on the machine explicitly after reboot? OR I have to use net use command within script?
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
For service account you can follow this MS basics:
http://technet.microsoft.com/en-us/library/cc739458%28v=ws.10%29.aspx