I'm attempting to use SCCM to run a batch file to copy a file from an app deployment to machine's %public%/desktop folder but am getting an 'Access is denied' error while running.
The script itself looks like this:
copy \\SCCMfqdn\DeployApp\fm-launcher\FM-Launcher.fmp12 %public%\desktop\Launcher.blah /Y
ECHO OFF
echo YOUR LAUNCHER FILE HAS BEEN COPIED
pause
exit
The error I am getting is just before 'Echo Off' and it states 'Access is denied'. If I run the script as an administrator it completes successfully.
Is there any way to accomplish what I am trying to do? Would it be better to use a group policy script? (I imagine it would have the same error?)
Thanks for any help!
Update: Per comments below it looks like the script MUST run as an admin to copy to the Public Desktop. Is there a way to script this with /runas or something? I see flags for user specifications but not for a password?