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

SnapinClient Return Code :5

Scheduled Pinned Locked Moved Solved
FOG Problems
5
7
943
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.
  • K
    khalid
    last edited by khalid May 20, 2019, 7:42 AM May 20, 2019, 1:41 PM

    Hello everybody, @EduardoTSeoane . I have three VMs in my lab; FOG server, Windows 10 client and a File server, I would like to install in client vm a program which is located on the file server using FOG server, and when I’m trying to deploy a script with batch snapin template, it strart runing but it finished with an error message (winodws 10 error code 5 as shown on the log file) which means that an acces denied has been reported.
    log file
    LOG.PNG
    batch file
    batch.PNG

    1 Reply Last reply Reply Quote 0
    • E
      EduardoTSeoane
      last edited by May 23, 2019, 8:36 AM

      System user has problems with net access, is a local system user.
      And wusa.exe i read that has some remoting problems.

      Try this:

      Use a Powershell Snapin Pack with an installation script and desired packages you want to install as contents.

      Into that Installation Powershell Script you must do.

      1º Elevate the script to Administrator user.
      2º Launch with Admin credentials an Start-Process or Invoke… to execute the installation.
      Maybe it works.

      Now I cant to write an example. I do it later this night.

      1 Reply Last reply Reply Quote 0
      • T
        Tom Elliott
        last edited by Tom Elliott May 20, 2019, 7:58 AM May 20, 2019, 1:57 PM

        The error code is coming from whatever program is running (the wusa.exe) command.

        A quick lookup shows:
        https://serverfault.com/questions/559287/what-does-wusa-exe-return-code-5-mean

        https://social.technet.microsoft.com/Forums/en-US/7243c65b-dc19-4f27-acb2-603edcf3d50f/error-code-5?forum=ITCG

        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 0
        • S
          Sebastian Roth Moderator
          last edited by May 20, 2019, 3:13 PM

          @khalid Problem might be that the fog-client runs as System Service. Maybe installing updates like this is not allowed by MS security.

          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
          • E
            EduardoTSeoane
            last edited by May 23, 2019, 8:36 AM

            System user has problems with net access, is a local system user.
            And wusa.exe i read that has some remoting problems.

            Try this:

            Use a Powershell Snapin Pack with an installation script and desired packages you want to install as contents.

            Into that Installation Powershell Script you must do.

            1º Elevate the script to Administrator user.
            2º Launch with Admin credentials an Start-Process or Invoke… to execute the installation.
            Maybe it works.

            Now I cant to write an example. I do it later this night.

            1 Reply Last reply Reply Quote 0
            • K
              khalid
              last edited by May 23, 2019, 10:12 AM

              Thank you all, I will try this right now

              Q 1 Reply Last reply May 24, 2019, 3:52 PM Reply Quote 0
              • Q
                Quazz Moderator @khalid
                last edited by May 24, 2019, 3:52 PM

                @khalid Another thing to try is to mount the NAS share as a Samba user and then access it using the assigned drive letter.

                1 Reply Last reply Reply Quote 0
                • E
                  EduardoTSeoane
                  last edited by May 24, 2019, 5:14 PM

                  Promised Example:

                  ## Elevate to admin the current Script Execution
                  If (-NOT ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator"))
                  {  
                  $arguments = "& '" + $myinvocation.mycommand.definition + "'"
                  Start-Process powershell -Verb runAs -ArgumentList $arguments
                  Break
                  }
                  ##Create credentials
                  $password = ConvertTo-SecureString 'MySecretPassword' -AsPlainText -Force
                  $user='useradmin'
                  $credential = New-Object System.Management.Automation.PSCredential ($user, $password)
                  ##Execute wusa.exe with parameters and useradmin credentials.
                  Start-Process -FilePath <path wusa.exe> -ArgumentList <arguments for wusa.exe> -Credential $credential -LoadUserProfile -PassThru
                  

                  This maybe works

                  With New-PSDrive you can mount samba and nfs shares if you have the nfs-infrastructure installed.

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

                  327

                  Online

                  12.0k

                  Users

                  17.3k

                  Topics

                  155.2k

                  Posts
                  Copyright © 2012-2024 FOG Project