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

Snapin not working as a Batch file xcopy

Scheduled Pinned Locked Moved Solved
FOG Problems
3
6
925
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 Sep 19, 2018, 11:01 AM

    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
    • Q
      Quazz Moderator
      last edited by Sep 19, 2018, 2:59 PM

      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
      • G
        gabbas
        last edited by gabbas Sep 21, 2018, 2:48 AM Sep 21, 2018, 8:47 AM

        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 Sep 21, 2018, 8:55 AM Reply Quote 0
        • Q
          Quazz Moderator @gabbas
          last edited by Sep 21, 2018, 8:55 AM

          @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 Sep 21, 2018, 9:12 AM Reply Quote 0
          • G
            gabbas @Quazz
            last edited by Sep 21, 2018, 9:12 AM

            @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
            • S
              Sebastian Roth Moderator
              last edited by Sep 21, 2018, 5:08 PM

              @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
              • 1 / 1
              1 / 1
              • First post
                5/6
                Last post

              244

              Online

              12.0k

              Users

              17.3k

              Topics

              155.2k

              Posts
              Copyright © 2012-2024 FOG Project