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

Rolling FOG out to US Site

Scheduled Pinned Locked Moved Solved
General
5
97
46.0k
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.
  • Q
    Quazz Moderator @RobTitian16
    last edited by Quazz Nov 17, 2016, 6:15 AM Nov 17, 2016, 12:13 PM

    @RobTitian16 Thinking about it, Windows might sometimes create a scripts folder instead of a Scripts folder.

    So we need to check for both.

    #if scripts exists then by default Scripts does not, but if scripts does not exist then it's still possible Scripts doesn't either
    if  [  -d "/ntfs/Windows/Setup/scripts" ] 
    then
      mv "/ntfs/Windows/Setup/scripts" "/ntfs/Windows/Setup/Scripts"
    else
      mkdir "/ntfs/Windows/Setup/Scripts"
    fi
    

    Since Windows doesn’t care about capitalization, you can safely rename it to a capitalized version. This will be overzealous with the mkdir, triggering in more cases than necessary, but since mkdir can’t do anything if the target exists, I don’t consider this to be problematic.

    1 Reply Last reply Reply Quote 0
    • R
      RobTitian16 @Quazz
      last edited by Nov 17, 2016, 12:26 PM

      @Quazz Unfortunately it’s still not copying the msi across.
      I wonder if it’s because of the quotations and if it doesn’t like them there.

      I’ve also noticed that with the following line, it doesn’t put “FOG Service Installer.msi” in quotes in the SetupComplete.cmd:

      echo "msiexec.exe /i "FOG Service Installer.msi" /quiet USETRAY=\"0\" WEBADDRESS=\"${FOGIP}\" " >> /ntfs/Windows/Setup/Scripts/SetupComplete.cmd
      
      Q 1 Reply Last reply Nov 17, 2016, 12:32 PM Reply Quote 0
      • Q
        Quazz Moderator @RobTitian16
        last edited by Quazz Nov 17, 2016, 6:34 AM Nov 17, 2016, 12:32 PM

        @RobTitian16 Try single quotes around the whole thing instead of double quotes

        echo 'msiexec.exe /i "FOG Service Installer.msi" /quiet USETRAY=\"0\" WEBADDRESS=\"${FOGIP}\" ' >> /ntfs/Windows/Setup/Scripts/SetupComplete.cmd
        

        As for the transfer thingy, only thing that springs to mind is that the origin file path is incorrect or the file doesn’t exist or something, so check that.

        If you can, boot a client in debug mode and try to copy it manually

        1 Reply Last reply Reply Quote 0
        • R
          RobTitian16 @Quazz
          last edited by RobTitian16 Nov 17, 2016, 7:37 AM Nov 17, 2016, 1:37 PM

          @Quazz I’ve just tried this with the debug mode enabled and I’ve realised the path to the Fog Service msi is incorrect (I’ve been going down a rabbit hole I dug myself).
          I need to get the FOGService.msi from the FOG server (/var/www/html/fog/client/FOGService.msi). How would I go about doing this in the SetupComplete.cmd?

          At the moment I literally have:

          echo "msiexec.exe /i "FOG Service Installer.msi" /quiet USETRAY=\"0\" WEBADDRESS=\"${FOGIP}\" " >> /ntfs/Windows/Setup/Scripts/SetupComplete.cmd
          

          Where “FOG Service Installer.msi” is, I need it to be the location mentioned above so it will pull the msi from the server (if that’s possible).

          Q G 3 Replies Last reply Nov 17, 2016, 1:40 PM Reply Quote 0
          • Q
            Quazz Moderator @RobTitian16
            last edited by Quazz Nov 17, 2016, 7:41 AM Nov 17, 2016, 1:40 PM

            @RobTitian16 I don’t see why you’d want to do that from SetupComplete when you can just copy it during the postdownload stage.

            You may still need to point to the absolute path the the msi installer on the windows drive, but I’m not sure.

            R 1 Reply Last reply Nov 17, 2016, 2:01 PM Reply Quote 1
            • G
              george1421 Moderator @RobTitian16
              last edited by george1421 Nov 17, 2016, 7:45 AM Nov 17, 2016, 1:42 PM

              @RobTitian16 OK that is where I was just circling back to (in my head). Where did “FOG Service Installer.msi” come from. When I go to http://<fog_server_ip>/fog/management/index.php?node=client and download the client I get “FOGService.msi” Me thinks you are tying to install the old FOG client (circa 1.2.0)

              <edit> now that I read the posts instead of looking at the pictures I see that you came to the same conclusion as I </edit>

              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!

              1 Reply Last reply Reply Quote 0
              • G
                george1421 Moderator @RobTitian16
                last edited by Nov 17, 2016, 1:43 PM

                @RobTitian16 And as for the setupcomplete.cmd, for the msi command you may need to specify the full path to the location of the MSI for msiexe to see.

                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!

                1 Reply Last reply Reply Quote 0
                • T
                  Tom Elliott @RobTitian16
                  last edited by Nov 17, 2016, 1:46 PM

                  @RobTitian16 You guys must remember. The scripts are running at the Client’s Scope.

                  Meaning, the check for the msi file is not going to work. Why?

                  The client (during imaging) does not have the “/root/trunk/packages/web/client/FogService/Fog Service Installer.msi” file on it. That (from what I can tell) is the location for the file as it sits on the Server when you run updates?

                  You might just simplify this and add the msi directly to the images/postdownloadscripts folder.

                  From the server run:

                  cp /var/www/fog/client/FOGService.msi /images/postdownloadscripts/
                  

                  THe copy line would then switch to:

                  (Changing _ with spaces of course)

                  [[_-f ${postdownpath}FOGService.msi_]] && cp ${postdownpath}FOGService.msi "/ntfs/Windows/Setup/Scripts/FOGService.msi"
                  

                  Then your msiexec command would be:

                  echo "msiexec.exe /i %windir%\Setup\Scripts\FOGService.msi /quiet USETRAY=\"0\" WEBADDRESS=\"${FOGIP}\" " >> /ntfs/Windows/Setup/Scripts/SetupComplete.cmd
                  

                  Just my two cents.

                  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

                  G R 2 Replies Last reply Nov 17, 2016, 1:48 PM Reply Quote 2
                  • G
                    george1421 Moderator @Tom Elliott
                    last edited by Nov 17, 2016, 1:48 PM

                    @Tom-Elliott No fair giving Rob the answer. Shame on you!!

                    Hint: You learn more from your mistakes than your successes.

                    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!

                    G 1 Reply Last reply Nov 17, 2016, 1:59 PM Reply Quote 1
                    • G
                      george1421 Moderator @george1421
                      last edited by Nov 17, 2016, 1:59 PM

                      @george1421 Rob, I know this a bit confusing to setup because FOS runs linux it can only leave things in the right spot for windows to find them when OOBE starts. Once everything is in the right spot windows will go, Oh I know what to do with that and process it.

                      I think through this whole thread, you never posted the target system OS. That may be important if the setupcomplete.cmd file is never really executed. You can have the setupcomplete.cmd file echo a value into a text file to prove if the batch file is actually running as a debugging step if needed.

                      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!

                      R 1 Reply Last reply Nov 17, 2016, 3:14 PM Reply Quote 0
                      • R
                        RobTitian16 @Quazz
                        last edited by Nov 17, 2016, 2:01 PM

                        @Quazz Yeah, I could copy it during the postdownload stage. But how would I do so? /var/www/html/fog/client/FOGService.msi doesn’t in the terminal in debug. I can only go as far as /var/www/ and that’s it (I’m not even sure if that’s on the FOG Server or where it’s looking to be honest…)

                        T Q 2 Replies Last reply Nov 17, 2016, 2:09 PM Reply Quote 0
                        • T
                          Tom Elliott @RobTitian16
                          last edited by Nov 17, 2016, 2:09 PM

                          @RobTitian16 That is why I suggested copying the FOGService.msi to the postdownloadscripts directory.

                          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

                          1 Reply Last reply Reply Quote 1
                          • R
                            RobTitian16 @Tom Elliott
                            last edited by Nov 17, 2016, 2:33 PM

                            @Tom-Elliott Sorry, for some reason when I posted I didn’t see everyone else’s responses (only Quazz’s).
                            I’ll give this a go 🙂 Thanks!

                            1 Reply Last reply Reply Quote 0
                            • Q
                              Quazz Moderator @RobTitian16
                              last edited by Nov 17, 2016, 2:50 PM

                              @RobTitian16 I didn’t even think about not having access client side because I copy files off my NAS by mounting it then copying.

                              I think Tom’s suggestion is the answer now.

                              1 Reply Last reply Reply Quote 0
                              • R
                                RobTitian16 @george1421
                                last edited by Nov 17, 2016, 3:14 PM

                                @george1421 Indeed, this is something I’ve just found out - the SetupComplete.cmd is there with the FOGService.msi, but the .cmd is never actually executed. The target OS’s are always Windows 7/8/10/Server 2008/2012 R2/2016.
                                I’m currently testing this with a Windows 7 x64 OS.
                                I can’t see where the post install script is actually telling the SetupComplete.cmd to run, though. I can see it copies, but nothing tells it to run.

                                T G 2 Replies Last reply Nov 17, 2016, 3:16 PM Reply Quote 0
                                • T
                                  Tom Elliott @RobTitian16
                                  last edited by Nov 17, 2016, 3:16 PM

                                  @RobTitian16 It will run as soon as the system completes sysprep steps (Setting up your device).

                                  The last thing it does is “SetupComplete.cmd”.

                                  The path should be:

                                  C:\Windows\Setup\Scripts\SetupComplete.cmd (though you can try with setupcomplete.cmd) as well.

                                  Of not, for Windows 8 and Windows 10, if the image is sysprepped using an OEM version of the software it will NOT run the setupcomplete.

                                  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

                                  R 1 Reply Last reply Nov 17, 2016, 3:18 PM Reply Quote 0
                                  • R
                                    RobTitian16 @Tom Elliott
                                    last edited by Nov 17, 2016, 3:18 PM

                                    @Tom-Elliott Ahh okay. Is there a way to run this without the image being sys-prepped?

                                    G 1 Reply Last reply Nov 17, 2016, 3:46 PM Reply Quote 0
                                    • G
                                      george1421 Moderator @RobTitian16
                                      last edited by Nov 17, 2016, 3:46 PM

                                      @RobTitian16 yes if you are using an unattend.xml file.

                                      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!

                                      R 1 Reply Last reply Nov 17, 2016, 4:02 PM Reply Quote 1
                                      • G
                                        george1421 Moderator @RobTitian16
                                        last edited by Nov 17, 2016, 3:50 PM

                                        @RobTitian16 said in Rolling FOG out to US Site:

                                        I can’t see where the post install script is actually telling the SetupComplete.cmd to run, though. I can see it copies, but nothing tells it to run.

                                        See I think there is where you may be a bit confused (and rightly so). The FOG post install scripts run in linux so they can’t touch any windows programs or windows behavior. All we are doing with the post install script is placing things where windows expects to find them. As Tom posted Windows OOBE will run what ever is in the setupcomplete.cmd file after OOBE is done and before the first login window is displayed. This is a windows thing and has nothing to do with fog other than fog placed that file there. That file could and should have been there when you captured your master image. But since it was not you are using the fog post install script to kind of patch what should have been there prior to image capture.

                                        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!

                                        1 Reply Last reply Reply Quote 1
                                        • R
                                          RobTitian16 @george1421
                                          last edited by Nov 17, 2016, 4:02 PM

                                          @george1421 I didn’t think the unattend.xml file would, considering you say in the tutorial:

                                          “Note: the unattend.xml file is only used if the reference image was sysprep’d before image capture.”
                                          Unless you’re basically saying to sysprep it. In which case… I guess I’ll have to as I can see the benefits of doing so now with this script, etc.
                                          Thanks for the help and support as always! It’s been a challenging one, but hopefully one that will be immensely beneficial 😄

                                          Q G 2 Replies Last reply Nov 17, 2016, 4:12 PM Reply Quote 0
                                          • 1
                                          • 2
                                          • 3
                                          • 4
                                          • 5
                                          • 5 / 5
                                          5 / 5
                                          • First post
                                            81/97
                                            Last post

                                          252

                                          Online

                                          12.0k

                                          Users

                                          17.3k

                                          Topics

                                          155.2k

                                          Posts
                                          Copyright © 2012-2024 FOG Project