You could probably use this worklet to achieve what you’re doing without much hassle. You’ll have to upload the file to Automox though.
Here is the remediation for a worklet we are using to install a very large Autodesk package that we copy from an internal server. It works great. You need to make sure that the share has permission set for Authenticated Users since this is running under system using the computer account for authentication.
##Copy installer from local share. Package download times out when installer is included in policy
#Handle Exit Codes:
trap { $host.ui.WriteErrorLine($_.Exception); exit 90 }
###### Installing application on system ######
Try {
if (Test-Path -Path "C:\Program Files\Autodesk\webdeploy") {
Copy-Item "\\tyger\Deploy$\Autodesk\Fusion 360 Admin Install.exe" -Destination ".\Fusion 360 Admin Install.exe"
Start-Process -FilePath 'Fusion 360 Admin Install.exe' -ArgumentList ('--process uninstall --quiet') -Wait
Start-Process -FilePath 'Fusion 360 Admin Install.exe' -ArgumentList ('--quiet') -Wait
Write-Output "Fusion 360 Admin Install.exe..."
}
}
Catch { $Exception = $error[0].Exception.Message + "`nAt Line " + $error[0].InvocationInfo.ScriptLineNumber
Write-Output $Exception
exit 90
}