SOLVED Snapin not working as a Batch file xcopy
I have read several posts but couldn’t resolve my problem. We have some folders save on our shared NAS server (everyone has read and execute permission to this folder). The batch file itself runs fine when run on an individual client but when try to run as a Fog snapin, it doesn’t work add give error “SnapinClient Return Code: 4”, Please see below the Fog lo. Any suggestion??
everyone has read and execute permission to this folder
Is it really everyone as in anonymous without authentication or is it all users/group members of your organization? I ask because the FOG client is running as service and won’t have the same auth tokens as if you run the script as user.
@Quazz I use IP as previously I had some issues with hostname. The scripts works fine when run on a Win 10 client.
@gabbas Do you use the IP there or hostname? Perhaps they can’t find the hostname for some reason.
Does it work when running it normally on Windows 10?
Thanks for you reply. Its weird that same script works fine on Win 7 client but doesn’t work on Win10 (1803)? I have tried several things but still no success copying files and folder from a Network share to Win 10 clients. An exe or msi snapin (created with SFX maker works fine). I am using the following bat file ( I also tried to copy on both C and D driver):
xcopy "\\server\share\folder" "C:\folder\" /Y /E
As an aside, I recommend robocopy over xcopy if your clients are all windows 7 and up.
Anyway, the important thing to remember is that FOG Snapins run as the System user. This means that certain things won’t run as expected.
We’d need to know what your script looks like to determine what might be going wrong.