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

Snapins again

Scheduled Pinned Locked Moved
General
6
14
3.7k
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.
  • R
    robza
    last edited by May 30, 2016, 1:16 PM

    Hello,
    my conf:
    fog subversion 7931
    I’m trying run bat script via fog to install MS office.
    Here is snapin config:
    0_1464614068645_fogsnapin.png
    Here is script:

    mkdir c:\office2016
    %systemroot%\system32\xcopy \\upow-8.intranet\public\Office2016_PL_32B\ c:\office2016  /y /d /e /c /i /f /h /k /v /s 
    cd c:\office2016
    setup.exe /adminfile Unattended.msp
    

    Folder c:\office2016 is created by script, but nothing else.
    I receive in fog.log this error:

    ---------------------------------SnapinClient---------------------------------
    ------------------------------------------------------------------------------
     30.05.2016 15:04 Client-Info Client Version: 0.10.6
     30.05.2016 15:04 Client-Info Client OS:      Windows
     30.05.2016 15:04 Client-Info Server Version: 7931
     30.05.2016 15:04 Middleware::Response Success
     30.05.2016 15:04 SnapinClient Snapin Found:
     30.05.2016 15:04 SnapinClient     ID: 918
     30.05.2016 15:04 SnapinClient     RunWith: cmd.exe
     30.05.2016 15:04 SnapinClient     RunWithArgs: /c
     30.05.2016 15:04 SnapinClient     Name: Office 2016_32_PL_cmd
     30.05.2016 15:04 SnapinClient     File: office2016_pl_32x.bat
     30.05.2016 15:04 SnapinClient     Created: 2016-05-30 13:04:16
     30.05.2016 15:04 SnapinClient     Args: 
     30.05.2016 15:04 SnapinClient     Action: 
     30.05.2016 15:04 Middleware::Communication Download: http://fog-server/fog/service/snapins.file.php?mac=D0:17:C2:93:BB:2F||00:00:00:00:00:00:00:E0|00:00:00:00:00:00:00:E0&taskid=918
     30.05.2016 15:04 SnapinClient C:\Program Files (x86)\FOG\tmp\office2016_pl_32x.bat
     30.05.2016 15:04 Bus {
      "self": true,
      "channel": "Notification",
      "data": "{\r\n  \"title\": \"Installing Office 2016_32_PL_cmd\",\r\n  \"message\": \"Please do not shutdown until this is completed\",\r\n  \"subjectID\": \"snapin-Office 2016_32_PL_cmd\"\r\n}"
    }
     30.05.2016 15:04 Bus Emmiting message on channel: Notification
     30.05.2016 15:04 SnapinClient Starting snapin...
     30.05.2016 15:04 SnapinClient Snapin finished
     30.05.2016 15:04 SnapinClient Return Code: 1
     30.05.2016 15:04 Bus {
      "self": true,
      "channel": "Notification",
      "data": "{\r\n  \"title\": \"Office 2016_32_PL_cmd Installed\",\r\n  \"message\": \"Installation has finished and is now ready for use\",\r\n  \"subjectID\": \"snapin-Office 2016_32_PL_cmd\"\r\n}"
    }
     30.05.2016 15:04 Bus Emmiting message on channel: Notification
     30.05.2016 15:04 Middleware::Communication URL: http://fog-server/fog/service/snapins.checkin.php?taskid=918&exitcode=1&mac=D0:17:C2:93:BB:2F||00:00:00:00:00:00:00:E0|00:00:00:00:00:00:00:E0&newService&json
    

    Some time ago I submitted this problem, but then this script worked out.
    Any help, suggestions appreciated.
    Regards

    F 1 Reply Last reply Jun 1, 2016, 1:46 AM Reply Quote 0
    • Q
      Quazz Moderator
      last edited by Quazz May 30, 2016, 7:53 AM May 30, 2016, 1:50 PM

      Does the script work manually?

      Might want to try start /wait instead of cmd /c

      R 1 Reply Last reply May 30, 2016, 7:37 PM Reply Quote 0
      • X
        x23piracy
        last edited by x23piracy May 30, 2016, 7:57 AM May 30, 2016, 1:52 PM

        said in Snapins again:

        \upow-8.intranet\public\Office2016_PL_32B\

        is this share readable by everyone and not only every authenticated user?
        If this is a domain computer you have to be authenticated else it won’t work.

        Try to open that share while you are logged in with a local user (not domain authenticated) and try to run the script manually.

        Why do you copy whole installation directory to the destination to install? Why not running directly via network, it’s time wasting to copy
        infront. For example:

        \\upow-8.intranet\public\Office2016_PL_32B\setup.exe /adminfile \\upow-8.intranet\public\Office2016_PL_32B\Unattended.msp
        

        Regards X23

        ║▌║█║▌│║▌║▌█

        R 1 Reply Last reply May 30, 2016, 7:49 PM Reply Quote 0
        • T
          Tom Elliott
          last edited by May 30, 2016, 2:55 PM

          As I’ve said before, I’m fairly sure batch scripts don’t work nicely on UNC paths. You can use batch to map a unc path but running filea directly from unc always seems hit or miss. While you can do it manually, sometimes, scripts don’t seem to like doing it.

          Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

          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

          Q 1 Reply Last reply May 30, 2016, 3:00 PM Reply Quote 0
          • Q
            Quazz Moderator @Tom Elliott
            last edited by May 30, 2016, 3:00 PM

            @Tom-Elliott I’ve never had issues copying files straight from UNC paths though, although I use copy /y instead of xcopy most of the time so results may vary.

            T 1 Reply Last reply May 30, 2016, 3:03 PM Reply Quote 0
            • T
              Tom Elliott @Quazz
              last edited by May 30, 2016, 3:03 PM

              @Quazz I didn’t pay close enough attention and didn’t see the xcopy of the file. That said maybe the OP can try using copy /y vs. xcopy?

              Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

              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

              Q 1 Reply Last reply May 30, 2016, 3:05 PM Reply Quote 0
              • Q
                Quazz Moderator @Tom Elliott
                last edited by May 30, 2016, 3:05 PM

                @Tom-Elliott Also, adding the backslash to the targetpath is sometimes necessary, I seem to recall copy commands asking if it’s a file or directory when that’s not specified, lol.

                1 Reply Last reply Reply Quote 0
                • R
                  robza @Quazz
                  last edited by May 30, 2016, 7:37 PM

                  @Quazz
                  Yes script run manually work.
                  With /wait instead /c task stuck.

                  Q 1 Reply Last reply May 30, 2016, 7:44 PM Reply Quote 0
                  • Q
                    Quazz Moderator @robza
                    last edited by May 30, 2016, 7:44 PM

                    @robza Start /wait , not cmd /wait?

                    R 1 Reply Last reply May 31, 2016, 6:34 AM Reply Quote 0
                    • R
                      robza @x23piracy
                      last edited by May 30, 2016, 7:49 PM

                      @x23piracy
                      This share is readable for everyone. It is no domain computer (it is linux with samba).
                      Script run manualy works perfectly.
                      Running snapin with this content:

                      \\upow-8.intranet\public\Office2016_PL_32B\setup.exe /adminfile \\upow-8.intranet\public\Office2016_PL_32B\Unattended.msp
                      

                      in fog.log got this:

                      ---------------------------------SnapinClient---------------------------------
                      ------------------------------------------------------------------------------
                       30.05.2016 21:41 Client-Info Client Version: 0.10.6
                       30.05.2016 21:41 Client-Info Client OS:      Windows
                       30.05.2016 21:41 Client-Info Server Version: 7931
                       30.05.2016 21:41 Middleware::Response Success
                       30.05.2016 21:41 SnapinClient Snapin Found:
                       30.05.2016 21:41 SnapinClient     ID: 922
                       30.05.2016 21:41 SnapinClient     RunWith: cmd.exe
                       30.05.2016 21:41 SnapinClient     RunWithArgs: /C
                       30.05.2016 21:41 SnapinClient     Name: Office 2016_32_PL_cmd
                       30.05.2016 21:41 SnapinClient     File: office2016_pl_32.cmd
                       30.05.2016 21:41 SnapinClient     Created: 2016-05-30 19:41:25
                       30.05.2016 21:41 SnapinClient     Args: 
                       30.05.2016 21:41 SnapinClient     Action: 
                       30.05.2016 21:41 Middleware::Communication Download: http://fog-server/fog/service/snapins.file.php?mac=D0:17:C2:93:BB:2F||00:00:00:00:00:00:00:E0|00:00:00:00:00:00:00:E0&taskid=922
                       30.05.2016 21:41 SnapinClient C:\Program Files (x86)\FOG\tmp\office2016_pl_32.cmd
                       30.05.2016 21:41 Bus {
                        "self": true,
                        "channel": "Notification",
                        "data": "{\r\n  \"title\": \"Installing Office 2016_32_PL_cmd\",\r\n  \"message\": \"Please do not shutdown until this is completed\",\r\n  \"subjectID\": \"snapin-Office 2016_32_PL_cmd\"\r\n}"
                      }
                       30.05.2016 21:41 Bus Emmiting message on channel: Notification
                       30.05.2016 21:41 SnapinClient Starting snapin...
                       30.05.2016 21:41 SnapinClient Snapin finished
                       30.05.2016 21:41 SnapinClient Return Code: 1
                       30.05.2016 21:41 Bus {
                        "self": true,
                        "channel": "Notification",
                        "data": "{\r\n  \"title\": \"Office 2016_32_PL_cmd Installed\",\r\n  \"message\": \"Installation has finished and is now ready for use\",\r\n  \"subjectID\": \"snapin-Office 2016_32_PL_cmd\"\r\n}"
                      }
                       30.05.2016 21:41 Bus Emmiting message on channel: Notification
                       30.05.2016 21:41 Middleware::Communication URL: http://fog-server/fog/service/snapins.checkin.php?taskid=922&exitcode=1&mac=D0:17:C2:93:BB:2F||00:00:00:00:00:00:00:E0|00:00:00:00:00:00:00:E0&newService&json
                      

                      Nothing happend.

                      1 Reply Last reply Reply Quote 0
                      • R
                        robza @Quazz
                        last edited by May 31, 2016, 6:34 AM

                        @Quazz
                        With start /wait got this in log:

                         31.05.2016 08:31 Client-Info Client Version: 0.10.6
                         31.05.2016 08:31 Client-Info Client OS:      Windows
                         31.05.2016 08:31 Client-Info Server Version: 7931
                         31.05.2016 08:31 Middleware::Response Success
                         31.05.2016 08:31 SnapinClient Snapin Found:
                         31.05.2016 08:31 SnapinClient     ID: 929
                         31.05.2016 08:31 SnapinClient     RunWith: start
                         31.05.2016 08:31 SnapinClient     RunWithArgs: /wait
                         31.05.2016 08:31 SnapinClient     Name: Office 2016_32_PL_cmd
                         31.05.2016 08:31 SnapinClient     File: office2016_pl_32_z.bat
                         31.05.2016 08:31 SnapinClient     Created: 2016-05-31 06:31:02
                         31.05.2016 08:31 SnapinClient     Args: 
                         31.05.2016 08:31 SnapinClient     Action: 
                         31.05.2016 08:31 Middleware::Communication Download: http://fog-server/fog/service/snapins.file.php?mac=D0:17:C2:93:BB:2F||00:00:00:00:00:00:00:E0|00:00:00:00:00:00:00:E0&taskid=929
                         31.05.2016 08:31 SnapinClient C:\Program Files (x86)\FOG\tmp\office2016_pl_32_z.bat
                         31.05.2016 08:31 Bus {
                          "self": true,
                          "channel": "Notification",
                          "data": "{\r\n  \"title\": \"Installing Office 2016_32_PL_cmd\",\r\n  \"message\": \"Please do not shutdown until this is completed\",\r\n  \"subjectID\": \"snapin-Office 2016_32_PL_cmd\"\r\n}"
                        }
                         31.05.2016 08:31 Bus Emmiting message on channel: Notification
                         31.05.2016 08:31 SnapinClient Starting snapin...
                         31.05.2016 08:31 SnapinClient ERROR: Could not start snapin
                         31.05.2016 08:31 SnapinClient ERROR: Unable to find file
                         31.05.2016 08:31 Middleware::Communication URL: http://fog-server/fog/service/snapins.checkin.php?taskid=929&exitcode=-1&mac=D0:17:C2:93:BB:2F||00:00:00:00:00:00:00:E0|00:00:00:00:00:00:00:E0&newService&json
                        ------------------------------------------------------------------------------
                        
                        1 Reply Last reply Reply Quote 0
                        • Wayne WorkmanW
                          Wayne Workman
                          last edited by May 31, 2016, 10:25 PM

                          xcopy supports UNC paths. Ever since I found that out, I stopped doing mapped drives in scripts.

                          Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!
                          Daily Clean Installation Results:
                          https://fogtesting.fogproject.us/
                          FOG Reporting:
                          https://fog-external-reporting-results.fogproject.us/

                          1 Reply Last reply Reply Quote 0
                          • F
                            fry_p Moderator @robza
                            last edited by Jun 1, 2016, 1:46 AM

                            @robza and @Wayne-Workman, just thinking out here. So we know the script runs flawlessly manually. Sorry if this is a silly question, but which user do you run it as? I believe the snapins run as SYSTEM (i think, correct me if I’m wrong). Could this have anything to do with the discrepancy we are seeing?

                            Like open source community computing? Why not do it for a good cause?
                            Use your computer/server for humanitarian projects when it is idle!
                            https://join.worldcommunitygrid.org?recruiterId=1026912

                            Wayne WorkmanW 1 Reply Last reply Jun 1, 2016, 2:20 PM Reply Quote 1
                            • Wayne WorkmanW
                              Wayne Workman @fry_p
                              last edited by Jun 1, 2016, 2:20 PM

                              @fry_p They do run as the SYSTEM user. One thing to do is redirect output to a log file for every line. Then you will be able to see where it fails.

                              Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!
                              Daily Clean Installation Results:
                              https://fogtesting.fogproject.us/
                              FOG Reporting:
                              https://fog-external-reporting-results.fogproject.us/

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

                              224

                              Online

                              12.0k

                              Users

                              17.3k

                              Topics

                              155.2k

                              Posts
                              Copyright © 2012-2024 FOG Project