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

    Microsoft 365 install / update via snapin pack

    Scheduled Pinned Locked Moved Solved
    FOG Problems
    snapin office-365
    3
    11
    1.2k
    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.
    • P
      pauleb
      last edited by

      Hello,

      I created a snapin pack to Install Microsoft 365 that fog registers as successful run while it is not working.

      I already searched the forum and found similar attempts to install Microsoft 365, but none of the Topics are marked “solved”.

      My snapin pack has the structure:

      ./install.cmd
      ./Setup/setup.exe
      ./Setup/MS365-config-64-bit.xml
      

      Fog runs install.cmd which looks like:

      net use x: \\truenas\MS365 /USER:Guest /PERSISTENT:NO
      %~dp0Setup\setup.exe /configure %~dp0Setup\MS365-config-64-bit.xml
      net use x: /DELETE
      

      The relevant parts of the setup configuration .XML file are:

      <Configuration ID="5c579236-99be-41f4-ba55-91c6e3c0e212">
        <Info Description="Test" />
        <Add OfficeClientEdition="64" Channel="Current" SourcePath="x:" AllowCdnFallback="TRUE">
          <Product ID="O365ProPlusRetail">
                <Language ID="de-de" />
                <Language ID="en-us" />
              </Product>
        </Add>
        <Updates Enabled="TRUE" UpdatePath="x:" />
        <RemoveMSI />
        <Display Level="None" AcceptEULA="TRUE" />
      </Configuration>
      

      Running install.cmd as local Administrator from a command line with elevated privileges in a machine belonging to an AD is working fine.

      Running it via the analogue command to cmd.exe /c "[FOG_SNAPIN_PATH]\install.cmd, which is generated on the snapin pack page, with the full path via “RUN” on windows I get the same result (a popup window from setup.exe) as from a non-privileged command line. Therefore I think it should work when fog runs it as privileged SYSTEM user.

      Running it via snapin on the same machine creates a “successful” run with exit code 0 and a runtime of 2 seconds.

      The fog client log contains:

       07.03.2024 08:54:05 Client-Info Client Version: 0.13.0
       07.03.2024 08:54:05 Client-Info Client OS:      Windows
       07.03.2024 08:54:05 Client-Info Server Version: 1.5.10
       07.03.2024 08:54:05 Middleware::Response Success
       07.03.2024 08:54:05 SnapinClient Running snapin Install Microsoft 365
       07.03.2024 08:54:05 Middleware::Communication Download: https://192.168.0.43/fog/service/snapins.file.php?mac=44:37:E6:6F:32:8F&taskid=1376
       07.03.2024 08:54:06 SnapinClient C:\Program Files (x86)\FOG\tmp\MS365-x64-2.zip
       07.03.2024 08:54:06 SnapinClient Processing SnapinPack MS365-x64-2.zip
       07.03.2024 08:54:06 SnapinClient Extracting SnapinPack
       07.03.2024 08:54:06 Bus Emmiting message on channel: Notification
       07.03.2024 08:54:06 SnapinClient Starting snapin
       07.03.2024 08:54:06 SnapinClient Snapin finished
       07.03.2024 08:54:06 SnapinClient Return Code: 0
       07.03.2024 08:54:06 Bus Emmiting message on channel: Notification
       07.03.2024 08:54:06 Middleware::Communication URL: https://192.168.0.43/fog/service/snapins.checkin.php?taskid=1376&exitcode=0&mac=44:37:E6:6F:32:8F&newService&json
      

      Any hint on how to enable a higher log level on the client or alternative attempts to either debug the problem or another way to install / update Microsoft 365 would be highly appreciated.

      Thanks,

      Paul

      1 Reply Last reply Reply Quote 0
      • R
        rodluz Developer @pauleb
        last edited by

        @pauleb I use this powershell script for my M365 snappin. Hope it helps you.

        $username = "DOMAIN\USERNAME"
        $password = ConvertTo-SecureString "PASSWORD" -AsPlainText -Force
        $creds = New-Object System.Management.Automation.PSCredential $username, $password
        
        New-PSDrive -Persist -Name "Z" -PSProvider FileSystem -Root "\\SHARE\AppRepo" -Credential $creds
        
        Start-Process -Wait -FilePath "Z:\Microsoft\Microsoft365_x64\setup.exe" -ArgumentList '/configure "Z:\Microsoft\Microsoft365_x64\configuration.xml"' -NoNewWindow
        
        Remove-PSDrive -Name "Z"
        

        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

        P 1 Reply Last reply Reply Quote 1
        • P
          pauleb
          last edited by

          I just saw, that it is a duplicate of https://forums.fogproject.org/topic/12484/office-deployment-toolkit-2016-snapin-problem - sorry.

          Nonetheless, maybe there are solutions / better options now.

          R 1 Reply Last reply Reply Quote 0
          • R
            rodluz Developer @pauleb
            last edited by

            @pauleb I use this powershell script for my M365 snappin. Hope it helps you.

            $username = "DOMAIN\USERNAME"
            $password = ConvertTo-SecureString "PASSWORD" -AsPlainText -Force
            $creds = New-Object System.Management.Automation.PSCredential $username, $password
            
            New-PSDrive -Persist -Name "Z" -PSProvider FileSystem -Root "\\SHARE\AppRepo" -Credential $creds
            
            Start-Process -Wait -FilePath "Z:\Microsoft\Microsoft365_x64\setup.exe" -ArgumentList '/configure "Z:\Microsoft\Microsoft365_x64\configuration.xml"' -NoNewWindow
            
            Remove-PSDrive -Name "Z"
            

            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

            P 1 Reply Last reply Reply Quote 1
            • D
              DBCountMan
              last edited by

              I simply dropped the OfficeSetup.exe into the snapin and left everything else as is. It will install office or update Office if it is already installed.

              Screenshot from 2024-03-08 09-09-23.png

              P 1 Reply Last reply Reply Quote 0
              • P
                pauleb @rodluz
                last edited by

                @rodluz Thanks a lot!

                Your script is working flawlessly!

                Since it is doing more or less the same as mine with the difference, that you execute the setup from the mounted drive I also tried adapting my batch script.

                It seems it also works when the executable is ran from the temporarily mounted drive.

                net use z: \\truenas\MS365 /USER:Guest /PERSISTENT:NO
                z:\Setup\setup.exe /customize z:\Setup\MS365-config-64-bit.xml
                net use z: /DELETE
                

                and changing my configuration .XML file to:

                <Configuration ID="5c579236-99be-41f4-ba55-91c6e3c0e212">
                  <Info Description="Test" />
                  <Add OfficeClientEdition="64" Channel="Current" SourcePath="Z:\x64\" AllowCdnFallback="TRUE">
                    <Product ID="O365ProPlusRetail">
                          <Language ID="de-de" />
                          <Language ID="en-us" />
                        </Product>
                  </Add>
                  <Updates Enabled="TRUE" UpdatePath="Z:\x64\" />
                  <RemoveMSI />
                  <Display Level="None" AcceptEULA="TRUE" />
                </Configuration>
                

                Since nothing but the location of the executable and the config file changed I still cannot see where I went wrong. Since fog told me the snapin ran, I suppose that %~p0 worked as path substitution. It also is working in another snapin pack I use. So I can’t see why my snapin pack solution did not work.

                So much for documenting my results here.

                Thanks again!!

                1 Reply Last reply Reply Quote 0
                • P
                  pauleb @DBCountMan
                  last edited by

                  @DBCountMan
                  Thanks for your feedback, I am not sure what OfficeSetup.exe file you are using.

                  I wanted to configure Office on the fly when installing and update configuration. Therefore I preferred to use the solution offered by Microsoft via the Office deployment Tool and to create a configuration with the Office Customization Tool. Therefore I went with @rodluz 's solution.

                  D 1 Reply Last reply Reply Quote 0
                  • [[undefined-on, P pauleb, ]]
                  • D
                    DBCountMan @pauleb
                    last edited by DBCountMan

                    @pauleb When a 365 user logs into portal.office365.com and then goes to my account>install apps, they can download the Office installer, officesetup.exe. This is an online installer for Office.

                    P 1 Reply Last reply Reply Quote 0
                    • P
                      pauleb @DBCountMan
                      last edited by

                      @DBCountMan

                      Thanks for the update. Nice to know that this is also working.
                      My searches just showed using the office deployment tool and since I couldn’t be sure, that there is no user / license specific information in the setup - file and I don’t want to get into licensing issues with Microsoft I did not even try this.

                      D 1 Reply Last reply Reply Quote 0
                      • D
                        DBCountMan @pauleb
                        last edited by DBCountMan

                        @pauleb In our environment, pre-365 and pre-1G internet, we would use deployment tools to deploy Office from our local repositories using scripts and XMLs. For licensing we used KMS. Now with 365, all licensing is handled on the cloud, and we can install Office apps via internet. The OfficeSetup.exe file has no licensing embedded in it. It is simply a thin-installer that downloads the apps from the internet and installs them. Once complete, when the app starts for the first time it will ask for authentication to activate.

                        P 1 Reply Last reply Reply Quote 0
                        • P
                          pauleb @DBCountMan
                          last edited by

                          @DBCountMan Thanks for the clarification! I see your point. Your option is quite more straight forward. The benefits left for using ODT are the lower bandwidth use (with our 100 Mbit internet) and configuration options.
                          It’s great that there are multiple options!

                          1 Reply Last reply Reply Quote 0
                          • D
                            DBCountMan
                            last edited by

                            I had to make a correction. I meant to say pre-1Gbit internet not 10Gbit internet. We have 10G backbones (intranet) but not to the internet.

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

                            342

                            Online

                            12.0k

                            Users

                            17.3k

                            Topics

                            155.2k

                            Posts
                            Copyright © 2012-2024 FOG Project