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

    Snapin Batch file stays in-progress

    Scheduled Pinned Locked Moved Solved
    FOG Problems
    4
    15
    1.5k
    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.
    • A
      Arjenbulkens
      last edited by

      It’s stuck in “In-progress” .

      this is the latest message in de fog log:

      306c6e38-8bd7-4d26-ab07-811d93391333-image.png

      1 Reply Last reply Reply Quote 0
      • george1421G
        george1421 Moderator
        last edited by

        While I don’t use snapins in my environment, I might think that the batch file has caused a pop-up message to be displayed. But since the applications are being installed in a hidden window no one is there is acknowledge the pop-up message so the task is stuck.

        So how would you go about debugging this? I would copy the batch file to the target computer and run it as Administrator. See if it executes without any prompts.

        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!

        A 1 Reply Last reply Reply Quote 1
        • A
          Arjenbulkens @george1421
          last edited by

          @george1421 said in Snapin Batch file stays in-progress:

          While I don’t use snapins in my environment, I might think that the batch file has caused a pop-up message to be displayed. But since the applications are being installed in a hidden window no one is there is acknowledge the pop-up message so the task is stuck.

          So how would you go about debugging this? I would copy the batch file to the target computer and run it as Administrator. See if it executes without any prompts.

          hi George,

          the batch file is without prompts. The batchfile deletes a registry key…

          fry_pF george1421G 2 Replies Last reply Reply Quote 0
          • fry_pF
            fry_p Moderator @Arjenbulkens
            last edited by

            @Arjenbulkens I would still try the method @george1421 mentioned just in case (run the script manually and see if any prompts show up). I use snapins quite frequently and have to test using this almost every time. Something is hanging it up and the most common issue for me is whatever I’m trying to run prompting for user input. The snapin method already hides stuff, but it may still be “trying” to prompt the user invisibly.

            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

            A 1 Reply Last reply Reply Quote 0
            • george1421G
              george1421 Moderator @Arjenbulkens
              last edited by

              @Arjenbulkens said in Snapin Batch file stays in-progress:

              The batchfile deletes a registry key

              What is the base path for the key? (HKLM, HKCU,??)

              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!

              A 1 Reply Last reply Reply Quote 0
              • A
                Arjenbulkens @george1421
                last edited by

                @george1421 HKLM

                george1421G 1 Reply Last reply Reply Quote 0
                • george1421G
                  george1421 Moderator @Arjenbulkens
                  last edited by

                  @Arjenbulkens OK what is the command you are using inside this batch file to delete the key?
                  The FOG Client runs as the user SYSTEM, so it should have full access to delete from HKLM. I’m still leaning towards an unanswered prompt doing this.

                  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!

                  A 1 Reply Last reply Reply Quote 0
                  • A
                    Arjenbulkens @fry_p
                    last edited by

                    @fry_p ok, i will try ^^

                    1 Reply Last reply Reply Quote 0
                    • A
                      Arjenbulkens @george1421
                      last edited by

                      @george1421

                      4c2d397b-19cf-4b79-8d2d-e84160df44b2-image.png

                      george1421G 2 Replies Last reply Reply Quote 0
                      • george1421G
                        george1421 Moderator @Arjenbulkens
                        last edited by

                        @Arjenbulkens This should work. But to debug what happens if you only run the delete command? Right now its not clear which command is causing it to hang, I might guess the delete key.

                        I also wonder what the logic is to delete the key and add it back, why not just use the add key to change its value?

                        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
                        • george1421G
                          george1421 Moderator @Arjenbulkens
                          last edited by

                          @Arjenbulkens I also wonder if its the full name of the base key that is at fault?

                          HKLM, HKCU, HKCR, HKU, and HKCC is from the MS doc for reg add
                          ref: https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/reg-add

                          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!

                          A 1 Reply Last reply Reply Quote 0
                          • A
                            Arjenbulkens @george1421
                            last edited by

                            @george1421 It was the delete line, now the snapin in completed successfully. But the registry key value is still the same…

                            When i run the bat file manually, it works fine 😞

                            george1421G 1 Reply Last reply Reply Quote 0
                            • george1421G
                              george1421 Moderator @Arjenbulkens
                              last edited by

                              @Arjenbulkens I’ve been trying to understand why this would fail if run by the fog snapin.

                              I reverse engineered the command and I came up with the same syntax as you.

                              REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v "AutoAdminLogon" /t "REG_SZ" /d "0" /f

                              I checked and on my system SYSTEM has full edit rights to that key too. You can execute the command from a raised admin prompt OK, so why can’t SYSTEM. I’m logged into a linux computer at the moment so I can’t test, but I know I’ve seen the “Run as Administrator” and “Run as another user”. I wonder if we can “run as another user” and pick SYSTEM as the user account. You WILL need to be a local administrator on the box to get the run as a different user prompt.

                              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
                              • S
                                Sebastian Roth Moderator
                                last edited by

                                @Arjenbulkens Please download Sysinternals PSExec and try this:

                                C:\Windows\system32>whoami
                                ...\Administrator
                                
                                C:\Windows\system32>PsExec.exe -S cmd.exe
                                
                                PsExec v2.2 - Execute processes remotely
                                Copyright (C) 2001-2016 Mark Russinovich
                                Sysinternals - www.sysinternals.com
                                
                                
                                Microsoft Windows [version 6.1.7601]
                                Copyright (c) 2009 Microsoft Corporation. Tous droits réservés.
                                
                                C:\Windows\system32>whoami
                                NT AUTHORITY\SYSTEM
                                
                                C:\Windows\system32>REG DELETE ...
                                ...
                                C:\Windows\system32>REG ADD ...
                                ...
                                

                                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
                                • S
                                  Sebastian Roth Moderator
                                  last edited by

                                  @Arjenbulkens Any news on this?

                                  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
                                  • First post
                                    Last post

                                  224

                                  Online

                                  12.0k

                                  Users

                                  17.3k

                                  Topics

                                  155.2k

                                  Posts
                                  Copyright © 2012-2024 FOG Project