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

Batch File Snapin stuck in-progress

Scheduled Pinned Locked Moved Unsolved
FOG Problems
2
2
512
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.
  • F
    fabzster
    last edited by Mar 22, 2018, 3:01 PM

    Hi

    SERVER
    FOG Version: 1.5.0-RC-13
    OS: CentOS 7

    CLIENT
    Service Version: 0.11.14
    OS: Win10 Pro 64bit

    DESCRIPTION
    I have a batch script that uses netsh to set the IP address based off the computername after the fog client changes the PC name and joins it to the domain.

    This runs and on the client it indicates that it has finished, which it does as the IP is populated as required, but the server for some reason does not know that it has completed leaving it in an in-progress status.

    This causes the script to enter a loop

    IPBatchfile

    REM Get IP from PC Name and set Ethernet IPv4 properties
    @ SET LastTwo=%COMPUTERNAME:~12,2%
    @ SET IPPrefix=10.0.0.
    @ SET Subnet=255.255.255.0
    @ SET Gateway=10.0.0.2
    @ SET DNS1=10.0.0.3
    @ SET DNS2=10.0.0.4
    
    Rem Join the prefix and the LastTwo together to get full IPPrefix
    SET IP=%IPPrefix%%LastTwo%
    
    
    netsh int ipv4 set address "Ethernet" static %IP% %Subnet% %Gateway%
    netsh int ipv4 add dnsserver "Ethernet" %DNS1% index=1
    netsh int ipv4 add dnsserver "Ethernet" %DNS2% index=2 
    

    I have attached the log for your perusal.[0_1521730842596_fog.log](Uploading 100%)

    Is this happening because it does not actually install anything, if so how could I get this to work.

    Your assistance is greatly appreciated

    W 1 Reply Last reply Mar 22, 2018, 3:35 PM Reply Quote 0
    • W
      Wayne Workman @fabzster
      last edited by Mar 22, 2018, 3:35 PM

      @fabzster The log file did not successfully upload, please try again.
      Your script is most likely failing because the FOG Client runs Snapins as the SYSTEM user, whereas when you’re manually running your script, it’s being ran as Administrator. I would suggest you add logging to your script so you can see what line it’s hanging on.

      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
        1/2
        Last post

      123

      Online

      12.2k

      Users

      17.4k

      Topics

      155.5k

      Posts
      Copyright © 2012-2024 FOG Project