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

    Fog Snapin not working 1.3.0-RC-8 Client 0.11.5

    Scheduled Pinned Locked Moved Unsolved
    FOG Problems
    2
    15
    2.3k
    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.
    • Wayne WorkmanW
      Wayne Workman
      last edited by

      All snapins run as the SYSTEM user (no, I’m not yelling, the user is all caps). This is the number 1 reason why scripts/programs will run manually, but not as a snapin.

      Can we have a copy of the script? Remove any sensitive data and replace those pieces with something else - so that the script is still structurally sound.

      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/

      K 1 Reply Last reply Reply Quote 0
      • K
        Kleber
        last edited by

        ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
        Batch Script:
        ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

        NET USE /USER:Domain\Servername \servername\deployment Password
        cscript \Server\deployment\Autologin\Autologin_Student.vbs

        :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
        VB Script:
        :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
        'Option Explicit

        'Global Vars
        	const HKLM = &H80000002
        	const COMPUTER = "."
        
        'Vars
        	dim objReg, objShell
        	dim strPath, strDefaultUserName, strDefaultPassword, strAutoAdminLogon, strDefaultDomainName, strAutoLogonCount, strForceAutoLogon
        	dim intGrade
        
        'Assign Vars
        	strPath = "SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\"
        	strDefaultUserName = "DefaultUserName"
        	strDefaultPassword = "DefaultPassword"
        	strAutoAdminLogon = "AutoAdminLogon"
        	strDefaultDomainName = "DefaultDomainName"
        	strAutoLogonCount = "AutoLogonCount"
        	strForceAutoLogon = "ForceAutoLogon"
        
        	Set WshShell = WScript.CreateObject("WScript.Shell")
        	If WScript.Arguments.length =0 Then
        	Set ObjShell = CreateObject("Shell.Application")
        	ObjShell.ShellExecute "wscript.exe", """" & _
        	WScript.ScriptFullName & """" &_
        	" RunAsAdministrator", , "runas", 1
        	Else		
        		
        		set objReg = GetObject("winmgmts:\\" & COMPUTER & "\root\default:StdRegProv")
        		set objShell = WScript.CreateObject("WScript.Shell")
        
        		objReg.SetStringValue HKLM, strPath, strDefaultUserName, "student" 'replace username with your username you want to use
        		objReg.SetStringValue HKLM, strPath, strDefaultPassword, "Password" 'replace password with your password you want to use
        		objReg.SetStringValue HKLM, strPath, strAutoAdminLogon, "1"
        		objReg.SetStringValue HKLM, strPath, strDefaultDomainName, "ET" 'replace domain with your domain
        		objReg.SetStringValue HKLM, strPath, strForceAutoLogon, "0"
        		objReg.DeleteValue HKLM, strPath, strAutoLogonCount
        
        	End If
        
        Wayne WorkmanW 1 Reply Last reply Reply Quote 0
        • K
          Kleber @Wayne Workman
          last edited by

          @Wayne-Workman

          These scripts worked on Fog 1.2 not sure what changed

          1 Reply Last reply Reply Quote 0
          • Wayne WorkmanW
            Wayne Workman @Kleber
            last edited by

            @Kleber Just at first glance, you’re using a 2-piece script. A batch file that gets access to a share, and runs a vb script.

            You don’t need to do that in fog trunk. you can upload the vb script directly, the new fog client is capable of running vb script. There’s a template for vb script, even, in the snapins creation area.

            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/

            K 1 Reply Last reply Reply Quote 0
            • K
              Kleber @Wayne Workman
              last edited by

              @Wayne-Workman
              Hi I tried doing it directly and it will not work.

              Wayne WorkmanW 1 Reply Last reply Reply Quote 0
              • Wayne WorkmanW
                Wayne Workman @Kleber
                last edited by

                @Kleber Can you include a try - catch in the script and send the error to a file on the c:\ drive?

                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/

                K 2 Replies Last reply Reply Quote 0
                • K
                  Kleber @Wayne Workman
                  last edited by

                  @Wayne-Workman

                  Hi, I believe that VB script doesn’t have a try/catch, if you know of a way please point me in the right direction.

                  1 Reply Last reply Reply Quote 0
                  • K
                    Kleber @Wayne Workman
                    last edited by

                    @Wayne-Workman

                    I went ahead and removed the fog client 0.11.5 and installed the legacy client on the computer and the script worked flawlessly. I am not sure why this is happening.

                    Wayne WorkmanW 1 Reply Last reply Reply Quote 0
                    • Wayne WorkmanW
                      Wayne Workman @Kleber
                      last edited by Wayne Workman

                      @Kleber Because all snapins run as SYSTEM, try to remove this line and see what happens:

                      " RunAsAdministrator", , "runas", 1
                      

                      Also, just thinking outloud here, no SYSTEM task can ever spawn a UI, ever. This is by design of Microsoft. It’s so users may never interact with any program that is running as SYSTEM.

                      So - I’m not entirely sure its even possible to cause SYSTEM to do a login.

                      Also think I need to ask @Joe-Schmitt to look. Sorry for pinging you so many times today, Joe.

                      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/

                      K 1 Reply Last reply Reply Quote 0
                      • K
                        Kleber @Wayne Workman
                        last edited by

                        @Wayne-Workman
                        The old client ran the script fine and it also runs under the system account. Maybe there is a bug with the new client.

                        Wayne WorkmanW 2 Replies Last reply Reply Quote 0
                        • Wayne WorkmanW
                          Wayne Workman @Kleber
                          last edited by Wayne Workman

                          @Kleber I’m not sure why it isn’t working. It could be a bug. We should wait for Joe’s response, he is the new client developer.

                          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
                          • Wayne WorkmanW
                            Wayne Workman @Kleber
                            last edited by

                            @Kleber I talked with Joe briefly about this, he suggests to add logging to the vb script. Basically, output every variable to a text file, put messages everywhere that get put into a text file. For example “About to execute line 15” and " About to execute line 16" or “About to do step 20”. Adding logging at every point in the script will let you know how far it gets, and can lead us to figuring out what’s wrong.

                            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/

                            K 1 Reply Last reply Reply Quote 0
                            • K
                              Kleber @Wayne Workman
                              last edited by

                              @Wayne-Workman Thanks for taking the time to help me with this. Currently, I can not even get a simple batch file to deploy to the computer. I will make a test script to log the vb script to see what the log outputs. I am also going to remove the part of the script that elevates the command, I usually do this because windows might throw a UAC prompt. I will get back to you on the results, hopefully sometime next week.

                              Thanks for all your help!

                              Wayne WorkmanW 1 Reply Last reply Reply Quote 0
                              • Wayne WorkmanW
                                Wayne Workman @Kleber
                                last edited by

                                @Kleber Here’s a basic example that uses powershell with snapins - testing working on Win10. https://forums.fogproject.org/topic/8348/reset-local-windows-account-password-1-3-0

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

                                192

                                Online

                                12.1k

                                Users

                                17.3k

                                Topics

                                155.4k

                                Posts
                                Copyright © 2012-2024 FOG Project