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

Fog 1.1.2: VBScript Fail

Scheduled Pinned Locked Moved
FOG Problems
4
11
4.0k
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 Jul 30, 2014, 8:39 PM

    trying to run a VBscript to do a autologin script for a user and it does not launch. I have disable firewall, UAC, and any antivirus from the system. I notice that the fog client logs keeps saying “SnapinClient The system cannot find the file specified”. I can launch the script in windows 7 and it work with no problems. I also created a batch file that creates a file in the c:\ drive and this manged to work with no problems. I would appreciate any ideas in resolving this matter. Below I have placed the code for the script and the client logs.

    Thanks,

    Kleber

    [B]Script Code:[/B]
    [B][/B]
    '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 objReg = GetObject(“winmgmts:\” & COMPUTER & “\root\default:StdRegProv”)
    set objShell = WScript.CreateObject(“WScript.Shell”)

    objReg.SetStringValue HKLM, strPath, strDefaultUserName, "username '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, “domain” 'replace domain with your domain
    objReg.SetStringValue HKLM, strPath, strForceAutoLogon, “0”
    objReg.DeleteValue HKLM, strPath, strAutoLogonCount

    [B]Client log file below:[/B]
    [B][/B]
    7/30/2014 4:21 PM FOG::SnapinClient Attempting to connect to fog server…
    7/30/2014 4:21 PM FOG::SnapinClient Module is active…
    7/30/2014 4:21 PM FOG::SnapinClient Snapin Found:
    7/30/2014 4:21 PM FOG::SnapinClient ID: 82
    7/30/2014 4:21 PM FOG::SnapinClient RunWith: %windir%\syswow64\cscript.exe
    7/30/2014 4:21 PM FOG::SnapinClient RunWithArgs: /B
    7/30/2014 4:21 PM FOG::SnapinClient Name: Autologin_Student
    7/30/2014 4:21 PM FOG::SnapinClient Created: 2014-07-30 16:28:39
    7/30/2014 4:21 PM FOG::SnapinClient Args:
    7/30/2014 4:21 PM FOG::SnapinClient Reboot: No
    7/30/2014 4:21 PM FOG::SnapinClient Starting FOG Snapin Download
    7/30/2014 4:21 PM FOG::SnapinClient Download complete.
    7/30/2014 4:21 PM FOG::SnapinClient Starting FOG Snapin Installation.
    7/30/2014 4:21 PM FOG::SnapinClient The system cannot find the file specified
    7/30/2014 4:21 PM FOG::SnapinClient at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
    at FOG.SnapinClient.startWatching()
    7/30/2014 4:21 PM FOG::SnapinClient Attempting to connect to fog server…
    7/30/2014 4:21 PM FOG::SnapinClient Module is active…
    7/30/2014 4:21 PM FOG::SnapinClient No Tasks found for: 00:50:56:C0:00:01|00:50:56:C0:00:08|9C:8E:99:F5:D4:5A
    7/30/2014 4:21 PM FOG::GUIWatcher Message found, attempting to notify GUI!
    7/30/2014 4:22 PM FOG::GUIWatcher Dispatch OK!

    1 Reply Last reply Reply Quote 0
    • K
      Kleber
      last edited by Jul 30, 2014, 8:40 PM

      This post is deleted!
      1 Reply Last reply Reply Quote 0
      • J
        Junkhacker Developer
        last edited by Jul 30, 2014, 8:43 PM

        what arguments did you set up on the snapin profile?
        i believe vbs scripts require that you specify the executable to use, and 32bit/64 bit systems need to have different ones specified
        [url]http://www.fogproject.org/wiki/index.php/Supported_Snapin's_and_Command_Line_Switches[/url]

        signature:
        Junkhacker
        We are here to help you. If you are unresponsive to our questions, don't expect us to be responsive to yours.

        1 Reply Last reply Reply Quote 0
        • S
          SuP3R_Ch1cKeN
          last edited by Jul 30, 2014, 9:49 PM

          I would try adding this to the “Snapin Run With”[CODE]%SystemRoot%\SysWOW64\cscript.exe[/CODE]

          This works better then “C:\Windows\System32\cscript.exe” incase the systemroot is something other than C:\ and if I recall right this runs the cscript in 32-bit mode and will execute on both 64-bit and 32-bit systems properly.

          FOG Server OS: CentOS 7
          FOG Version: FOG 1.2.0

          1 Reply Last reply Reply Quote 0
          • K
            Kleber
            last edited by Jul 30, 2014, 10:07 PM

            I have tried the following :

            SnapinClient RunWith: %windir%\syswow64\cscript.exe
            SnapinClient RunWith: %windir%\system32\cscript.exe
            SnapinClient RunWith: c:\windows\syswow64\cscript.exe
            SnapinClient RunWith: c:\windows\system32\cscript.exe

            I will try the code below and let you guys know how it goes:

            %SystemRoot%\SysWOW64\cscript.exe

            1 Reply Last reply Reply Quote 0
            • K
              Kleber
              last edited by Jul 30, 2014, 11:23 PM

              This post is deleted!
              1 Reply Last reply Reply Quote 0
              • K
                Kleber
                last edited by Jul 30, 2014, 11:57 PM

                This post is deleted!
                1 Reply Last reply Reply Quote 0
                • K
                  Kleber
                  last edited by Aug 1, 2014, 2:00 AM

                  [quote=“SuP3R_Ch1cKeN, post: 34479, member: 4306”]I would try adding this to the “Snapin Run With”[CODE]%SystemRoot%\SysWOW64\cscript.exe[/CODE]

                  This works better then “C:\Windows\System32\cscript.exe” incase the systemroot is something other than C:\ and if I recall right this runs the cscript in 32-bit mode and will execute on both 64-bit and 32-bit systems properly.[/quote]

                  [INDENT]I tried running the script with %systemroot%\Syswow64\Cscript.exe under the “Snaping Run With”. The script did not run, below see the results of the log file:

                  [CODE]7/30/2014 7:17 PM FOG::SnapinClient Attempting to connect to fog server…
                  7/30/2014 7:17 PM FOG::SnapinClient Module is active…
                  7/30/2014 7:17 PM FOG::SnapinClient Snapin Found:
                  7/30/2014 7:17 PM FOG::SnapinClient ID: 84
                  7/30/2014 7:17 PM FOG::SnapinClient RunWith: %systemroot%\system32\cscript.exe
                  7/30/2014 7:17 PM FOG::SnapinClient RunWithArgs:
                  7/30/2014 7:17 PM FOG::SnapinClient Name: Student Autologin
                  7/30/2014 7:17 PM FOG::SnapinClient Created: 2014-07-30 19:27:55
                  7/30/2014 7:17 PM FOG::SnapinClient Args:
                  7/30/2014 7:17 PM FOG::SnapinClient Reboot: No
                  7/30/2014 7:17 PM FOG::SnapinClient Starting FOG Snapin Download
                  7/30/2014 7:17 PM FOG::SnapinClient Download complete.
                  7/30/2014 7:17 PM FOG::SnapinClient Starting FOG Snapin Installation.
                  7/30/2014 7:17 PM FOG::SnapinClient The system cannot find the file specified
                  7/30/2014 7:17 PM FOG::SnapinClient at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
                  at FOG.SnapinClient.startWatching()
                  7/30/2014 7:17 PM FOG::SnapinClient Attempting to connect to fog server…
                  7/30/2014 7:17 PM FOG::SnapinClient Module is active…
                  7/30/2014 7:17 PM FOG::SnapinClient No Tasks found for: 00:50:56:C0:00:01|00:50:56:C0:00:08|9C:8E:99:F5:D4:5A
                  7/30/2014 7:17 PM FOG::GUIWatcher Message found, attempting to notify GUI!
                  7/30/2014 7:17 PM FOG::GUIWatcher Dispatch Failed!
                  7/30/2014 7:17 PM FOG::GUIWatcher Message found, attempting to notify GUI!
                  7/30/2014 7:17 PM FOG::GUIWatcher Dispatch Failed!
                  7/30/2014 7:17 PM FOG::GUIWatcher Message found, attempting to notify GUI!
                  7/30/2014 7:17 PM FOG::GUIWatcher Dispatch Failed!
                  7/30/2014 7:17 PM FOG::GUIWatcher Message found, attempting to notify GUI!
                  7/30/2014 7:17 PM FOG::GUIWatcher Dispatch Failed!
                  7/30/2014 7:17 PM FOG::GUIWatcher Message found, attempting to notify GUI!
                  7/30/2014 7:17 PM FOG::GUIWatcher Dispatch Failed!
                  7/30/2014 7:17 PM FOG::GUIWatcher Message found, attempting to notify GUI!
                  7/30/2014 7:17 PM FOG::GUIWatcher Dispatch Failed!
                  7/30/2014 7:17 PM FOG::GUIWatcher Message found, attemp[/CODE][/INDENT]
                  [SIZE=11px] [/SIZE]

                  1 Reply Last reply Reply Quote 0
                  • K
                    Kleber
                    last edited by Aug 1, 2014, 2:01 AM

                    [quote=“Junkhacker, post: 34473, member: 21583”]what arguments did you set up on the snapin profile?
                    i believe vbs scripts require that you specify the executable to use, and 32bit/64 bit systems need to have different ones specified
                    [URL='http://www.fogproject.org/wiki/index.php/Supported_Snapin’s_and_Command_Line_Switches’]http://www.fogproject.org/wiki/index.php/Supported_Snapin’s_and_Command_Line_Switches[/URL][/quote]

                    SnapinClient RunWith: %windir%\syswow64\cscript.exe
                    SnapinClient RunWith: %windir%\system32\cscript.exe
                    SnapinClient RunWith: c:\windows\syswow64\cscript.exe
                    SnapinClient RunWith: c:\windows\system32\cscript.exe

                    1 Reply Last reply Reply Quote 0
                    • K
                      Kleber
                      last edited by Aug 3, 2014, 6:05 AM

                      I tested to push a snapin on a computer that I know used t I work with fog 0.32 and I get the same error messages. I also tested a snapin pushing a SFX file and also an MSI, all gave the same error. The only file I can successfully push is BAT/CMD file. I am no expert but it seems that any snapin that requires the “Snapin Run With” give the error “the system cannot find the file specified”. Could it be a bug ?

                      1 Reply Last reply Reply Quote 0
                      • X
                        x23piracy
                        last edited by Aug 3, 2014, 9:56 AM

                        Hi,

                        FYI snapin client does not expand system variables, so don’t use them they don’t work:
                        [quote=“Jbob, post: 34657, member: 21733”]Can confirm that the snapin client does [B]not[/B] expand system variables. Adding this feature to my todo list with high priority. The reason is that the snapin client uses:

                        [code]p.StartInfo.FileName = strRunWith;[/code]

                        instead of

                        [code]p.StartInfo.FileName = Environment.ExpandEnvironmentVariables(strRunWith);[/code]

                        In the mean time you may just set the “Snapin Run With” to msiexec.exe, this will automatically find the file if it has been added to the system path, which windows does by default.[/quote]
                        [url]http://fogproject.org/forum/threads/fog-snapins-and-windows-system-variables.11288/#post-34657[/url]

                        cscript is in path you should call cscript msiexec and so on. without any path

                        To check what’s in PATH open a command prompt and type:
                        [CODE]echo %path%[/CODE]

                        That will give you (normally) a list of directorys that are in path, that means every executable file that belongs to a path directly can be run without any path to the binary:

                        [CODE]C:\Users\Administrator>echo %path%
                        C:\Program Files\SFX-CreatoR;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Com
                        mon;C:\Program Files (x86)\Business Objects\Common\3.5\bin\NOTES;C:\Program Fil
                        es (x86)\Business Objects\Common\3.5\bin\NOTES\DATA;C:\Windows\system32;C:\Wind
                        ows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Prog
                        ram Files\Calibre2;C:\Program Files (x86)\H-JTAG V0.4.0;C:\Program Files (x86)
                        Ford Motor Company\IDS\Runtime;C:\Program Files (x86)\MakeMsi" ;C:\Program Files
                        (x86)\GNU\GnuPG\pub[/CODE]

                        Regards X23

                        ║▌║█║▌│║▌║▌█

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

                        171

                        Online

                        12.0k

                        Users

                        17.3k

                        Topics

                        155.2k

                        Posts
                        Copyright © 2012-2024 FOG Project