Batch File Snapin stuck in-progress
-
Hi
SERVER
FOG Version: 1.5.0-RC-13
OS: CentOS 7CLIENT
Service Version: 0.11.14
OS: Win10 Pro 64bitDESCRIPTION
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
-
@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.