• Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
  • 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.
  • K
    Kleber
    last edited by Aug 13, 2016, 12:13 AM

    ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    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
    
    W 1 Reply Last reply Aug 13, 2016, 12:18 AM Reply Quote 0
    • K
      Kleber @Wayne Workman
      last edited by Aug 13, 2016, 12:15 AM

      @Wayne-Workman

      These scripts worked on Fog 1.2 not sure what changed

      1 Reply Last reply Reply Quote 0
      • W
        Wayne Workman @Kleber
        last edited by Aug 13, 2016, 12:18 AM

        @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 Aug 13, 2016, 12:18 AM Reply Quote 0
        • K
          Kleber @Wayne Workman
          last edited by Aug 13, 2016, 12:18 AM

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

          W 1 Reply Last reply Aug 13, 2016, 12:20 AM Reply Quote 0
          • W
            Wayne Workman @Kleber
            last edited by Aug 13, 2016, 12:20 AM

            @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 Aug 13, 2016, 12:24 AM Reply Quote 0
            • K
              Kleber @Wayne Workman
              last edited by Aug 13, 2016, 12:24 AM

              @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 Aug 13, 2016, 1:47 AM

                @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.

                W 1 Reply Last reply Aug 13, 2016, 1:52 AM Reply Quote 0
                • W
                  Wayne Workman @Kleber
                  last edited by Wayne Workman Aug 12, 2016, 7:56 PM Aug 13, 2016, 1:52 AM

                  @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 Aug 13, 2016, 2:04 AM Reply Quote 0
                  • K
                    Kleber @Wayne Workman
                    last edited by Aug 13, 2016, 2:04 AM

                    @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.

                    W 2 Replies Last reply Aug 13, 2016, 2:05 AM Reply Quote 0
                    • W
                      Wayne Workman @Kleber
                      last edited by Wayne Workman Aug 12, 2016, 8:06 PM Aug 13, 2016, 2:05 AM

                      @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
                      • W
                        Wayne Workman @Kleber
                        last edited by Aug 15, 2016, 5:08 PM

                        @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 Aug 18, 2016, 12:31 AM Reply Quote 0
                        • K
                          Kleber @Wayne Workman
                          last edited by Aug 18, 2016, 12:31 AM

                          @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!

                          W 1 Reply Last reply Aug 18, 2016, 1:02 AM Reply Quote 0
                          • W
                            Wayne Workman @Kleber
                            last edited by Aug 18, 2016, 1:02 AM

                            @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
                            1 / 1
                            • First post
                              12/15
                              Last post

                            295

                            Online

                            12.0k

                            Users

                            17.3k

                            Topics

                            155.2k

                            Posts
                            Copyright © 2012-2024 FOG Project