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

    snapin not working

    Scheduled Pinned Locked Moved Solved
    FOG Problems
    4
    7
    434
    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.
    • S
      scottedwards54
      last edited by

      Hi, I have created the following batch file:

      mkdir c:\AV
      copy \[server]\public"AV Install"\setup.exe c:\AV\ /z /y
      cd c:\AV
      start /WAIT c:\AV\setup.exe /s /w

      I have created a normal snapin, chosen batch script, uploaded the file. but when I run the snapin task it says on the computer that it has started it, and then almost instantly finishes it.

      It created the folder, but did not copy the file, and obviously did not start the setup file, to install the program. Now I checked the snapin settings for this again and noticed it automatically put in a snapin argument of /C now from what I know this tells cmd.exe to run the command and terminate, so it would appear that it is running the first command and terminating, which explains why the folder is created and nothing us is followed.

      So I thought lets remove the argument /C and see what happens, well now it is saying the task is running and running and running, you get the picture however it does do anything in the bat file?!

      Am I missing something, or is there something I am not accounting for?

      Any help would be gratefully recieved.

      Kind Regards

      Scott

      1 Reply Last reply Reply Quote 0
      • D
        Daniel Miller
        last edited by Daniel Miller

        I don’t think the copy command can find the file as specified. I have yet to come across any SMB path specifications that include the double quote character as part of the path. maybe you are intending to do something along the lines of :

        copy /z /y "\\\[server]\public\AV Install\setup.exe" c:\AV
        

        edit: forgot the restartable flag, although I don’t know how useful it is in this context.
        edit: forums don’t like the double backslash

        I have also found it can be helpful to dump the output of a file to a log of some sort during testing, either in the snapin script or by modifying the snapin arguments.

        1 Reply Last reply Reply Quote 0
        • S
          scottedwards54
          last edited by

          Hi Daniel,

          Thank you for your reply, I can confirm that this script works if you run it manually so I do not believe it to necessarily be a problem with the script itself just how the snapin is perhaps using it not entirely sure all new to the world of FOG :), and you can double quote only the section that has spaces in it and command prompt will read it correctly.

          I will try and dump the output to a file and see if that sheds anymore light

          Kind Regards,

          Scott

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

            @scottedwards54 On Windows the fog-client runs under the SYSTEM account. This will likely have no access to the UNC path share. Search the forums and you will find a few posts on this topic.

            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

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

              @Sebastian-Roth Many thanks for the reply, that would explain it 🙂 how would I work around this, would this be something for a snapin pack?

              D 1 Reply Last reply Reply Quote 0
              • D
                Daniel Miller @scottedwards54
                last edited by Daniel Miller

                @scottedwards54 If the installer is contained entirely in the one file, you could implement it as either a regular snap-in or a snap-in pack. The pack approach would be useful if files other than just the executable were involved, such as maybe a batch script in case the fog service couldn’t keep track of the installer process where the start invocation would for some reason or you wanted to do other things at the time of install. Altering the script to include setting up authentication to the smb share with net use would also be a solution, but could get substantially more involved depending on your environment, share configuration, and which editions of windows your clients are running.

                1 Reply Last reply Reply Quote 0
                • EduardoTSeoaneE
                  EduardoTSeoane
                  last edited by

                  Some options.

                  1º Use a snapin pack including the executable.
                  2º Put it in a ftp server and use a cmd ftp client to download it. (You can use the fog server/node as ftp and the built-in ftp client)

                  This two solutions works!!!

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

                  214

                  Online

                  12.1k

                  Users

                  17.3k

                  Topics

                  155.3k

                  Posts
                  Copyright © 2012-2024 FOG Project