• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login
    1. Home
    2. fogjam
    F
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 2
    • Best 1
    • Controversial 0
    • Groups 0

    fogjam

    @fogjam

    3
    Reputation
    159
    Profile views
    2
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    fogjam Unfollow Follow

    Best posts made by fogjam

    • RE: Normal Snapin deploy .reg file

      @Joe-Schmitt, I encountered the same issue after recently upgrading from FOG Server 0.32 and the old FOG Client to 1.4.4 and 0.11.12, respectively. Deploying the same snapin that previously modified the AutoAdminLogon key on Windows 7 64, no longer seemed to affect the registry (still deploying to the same OS).

      After some testing, I found that Windows File System redirection was the culprit. FOGService runs the snapin with the 32-bit executable (cmd.exe, cscript.exe, reg.exe, etc.) because Windows redirects %windir%\system32 to %windir%\SysWOW64. This caused my registry update to modify

      • HKLM\Software\Wow6432Node\Microsoft\Windows NT\CurrentVersion\Winlogon

      instead of

      • HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon

      Don’t know why my old FOG ecosystem was unaffected, but here are some workarounds I’m exploring on the snapin side (links document the ideas—YMMV):

      1. Prefix the command with %windir%\sysnative (only works on Windows 64 bit in a 32-bit shell), which can be done in directly in Snapin Run With or coded into the script
        File System Redirector mentions using %windir%\sysnative

      2. Create a symbolic link to call a 64-bit version of the executable
        Open 64bit command prompt in 32 bit command prompt

      3. Force REG.exe to write to 64-bit registry location with /reg:64
        https://ss64.com/nt/reg.html

      4. Example VB Script that sets Autologin - untested

      posted in Windows Problems
      F
      fogjam

    Latest posts made by fogjam

    • Snapin fails when arguments contain quotes

      I have noticed that batch script snapins, that run correctly without quotes, fail when the snapin arguments include them.

      To test, I created a simple batch script snapin file with the code:

      set parameter="%~1"
      echo %parameter%
      

      and pass these parameters to it:
      0_1525885409164_TestScriptSnapin.png

      The snapin

      • fails when Snapin Arguments contain quotes: e.g. "FooBar" > c:\test.txt
        c:\test.txt is created empty and fog.log shows:
        5/9/2018 12:07 PM Middleware::Response Success
        5/9/2018 12:07 PM SnapinClient Running snapin Test Script
        5/9/2018 12:07 PM SnapinClient C:\Program Files (x86)\FOG\tmp\test.bat
        5/9/2018 12:07 PM SnapinClient Starting snapin
        5/9/2018 12:07 PM SnapinClient Snapin finished
        5/9/2018 12:07 PM SnapinClient Return Code: 1

      • succeeds when Snapin Arguments do not include quotes: FooBar > c:\test.txt
        c:\test.txt contains the echoed parameter FooBar and fog.log shows:
        5/9/2018 12:10 PM Middleware::Response Success
        5/9/2018 12:10 PM SnapinClient Running snapin Test Script
        5/9/2018 12:10 PM SnapinClient C:\Program Files (x86)\FOG\tmp\test.bat
        5/9/2018 12:10 PM SnapinClient Starting snapin
        5/9/2018 12:10 PM SnapinClient Snapin finished
        5/9/2018 12:10 PM SnapinClient Return Code: 0

      Another snapin attempt (to install Dymo Label Software) fails to run with the required arguments DLS8Setup.8.7.exe /S /V”/qn /norestart”, but succeeds when manually executing from the host’s command line.

      I can workaround this problem by writing these into the batch file, but it would be handy to simply pass parameters with quotes.

      My environment: FOG 1.4.4 on Centos 7, client 0.11.12 on Windows 10.

      Thanks in advance!

      posted in Windows Problems
      F
      fogjam
    • RE: Normal Snapin deploy .reg file

      @Joe-Schmitt, I encountered the same issue after recently upgrading from FOG Server 0.32 and the old FOG Client to 1.4.4 and 0.11.12, respectively. Deploying the same snapin that previously modified the AutoAdminLogon key on Windows 7 64, no longer seemed to affect the registry (still deploying to the same OS).

      After some testing, I found that Windows File System redirection was the culprit. FOGService runs the snapin with the 32-bit executable (cmd.exe, cscript.exe, reg.exe, etc.) because Windows redirects %windir%\system32 to %windir%\SysWOW64. This caused my registry update to modify

      • HKLM\Software\Wow6432Node\Microsoft\Windows NT\CurrentVersion\Winlogon

      instead of

      • HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon

      Don’t know why my old FOG ecosystem was unaffected, but here are some workarounds I’m exploring on the snapin side (links document the ideas—YMMV):

      1. Prefix the command with %windir%\sysnative (only works on Windows 64 bit in a 32-bit shell), which can be done in directly in Snapin Run With or coded into the script
        File System Redirector mentions using %windir%\sysnative

      2. Create a symbolic link to call a 64-bit version of the executable
        Open 64bit command prompt in 32 bit command prompt

      3. Force REG.exe to write to 64-bit registry location with /reg:64
        https://ss64.com/nt/reg.html

      4. Example VB Script that sets Autologin - untested

      posted in Windows Problems
      F
      fogjam