• Register
    • Login
    • Search
    • Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Solved Snapin not working as a Batch file xcopy

    FOG Problems
    3
    6
    369
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • G
      gabbas last edited by

      Hi,

      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??
      0_1537354882931_20f269eb-9881-44ae-8da3-ec0f2f84e942-image.png

      1 Reply Last reply Reply Quote 0
      • S
        Sebastian Roth Moderator last edited by

        @gabbas said in Snapin not working as a Batch file xcopy:

        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.

        Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

        Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

        1 Reply Last reply Reply Quote 0
        • G
          gabbas @Quazz last edited by

          @Quazz I use IP as previously I had some issues with hostname. The scripts works fine when run on a Win 10 client.

          1 Reply Last reply Reply Quote 0
          • Q
            Quazz Moderator @gabbas last edited by

            @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?

            G 1 Reply Last reply Reply Quote 0
            • G
              gabbas last edited by gabbas

              Hi,

              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
              Q 1 Reply Last reply Reply Quote 0
              • Q
                Quazz Moderator last edited by

                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.

                1 Reply Last reply Reply Quote 0
                • 1 / 1
                • First post
                  Last post

                75
                Online

                10.4k
                Users

                16.4k
                Topics

                150.5k
                Posts

                Copyright © 2012-2023 FOG Project