Resolve with this :
Web FOG Settings :
-FOG Client - Hostname Changer was enabled : Now DISABLED
-General Settings / Change Hostname early was enabled : Now DISABLED
After disable this two settings it’s ok …
Problem solved.
Resolve with this :
Web FOG Settings :
-FOG Client - Hostname Changer was enabled : Now DISABLED
-General Settings / Change Hostname early was enabled : Now DISABLED
After disable this two settings it’s ok …
Problem solved.
@george1421
Hi George,
I advanced on the problem and i am very confused…
I identify problem is just after post download scripts.
I say that because in my multiple tests if i shutdown computer just after sed, cancel fog tasks and boot on Windows 10 1803 the name is correct !
See screenshot of step where i ientify problem occurs :
In tests where windows computer name is correct i shutdown computer just before this screen.

As i saw rubric “Changing hostname” i search in my web FOG Settings :
-FOG Client - Hostname Changer was enabled : Now DISABLED
-General Settings / Change Hostname early was enabled : Now DISABLED
After disable this two settings it’s ok …
2 months to identify this !
Problem solved.
Very thanks for your helps and guidance to post download scripts.
I was convinced that it was coming from Windows/Sysprep.
Don’t know why that did not bother Windows 10 1709.
Thanks again 
@george1421
Ok i hope problem comes from my postinstall scripts.
I will try this likes yours
Thanks for runway
@george1421
Yes i added what i have in my postinstall script (remember finally not empty)
You see bad things in this ?
@george1421
Sorry i don’t understand, what do you mean by :
well of course you know the lower case unattend.xml is wrong, correct?
For this test, i took this post install script, just putting commands in debug mode (shell) :
#!/bin/sh
#
. /usr/share/fog/lib/funcs.sh
hd=""
getHardDisk
sysproduct=""
doInventory
modele=$(echo $sysproduct|tr 'A-Z' 'a-z')
modele=$(echo $modele|sed -e 's/ //g')
# Récupération des infos du host a partir de FOG
wget -q -U '' -O /tmp/hinfo.txt "${web}service/hostinfo.php?mac=$mac"
chmod +x /tmp/hinfo.txt
. /tmp/hinfo.txt
if [ "$mode_r2" = "debug" ] ; then
bash
fi
if [ -n "$hd" ]; then
partsys=$hd'1'
partdata=$hd'2'
echo "* Using disk device : $hd"
echo "* Partition système : $partsys"
echo "* Partition de données : $partdata"
if [ "$mode_r2" = "debug" ] ; then
# Here i put my command for sysprep
bash
fi
echo "=> Copy Drivers"
cd /mnt/win/
if [ -e "/mnt/win/drivers" ] ; then
rm -r /mnt/win/drivers
fi
cp -a /mnt/clonages/pilotes/${modele}/${osid}/drivers /mnt/win
cd
umount /mnt/win
rm -f /tmp/hinfo.txt
fi
Hi George,
Yes
This is exactly what I do :
ComputerName of on my windows image template : MASTER10
Sysprep c:\Windows\Panther\Unattend.xml (source of you ,adaped to me) :
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<settings pass="windowsPE">
<component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SetupUILanguage>
<UILanguage>fr-FR</UILanguage>
</SetupUILanguage>
<InputLocale>040c:0000040c</InputLocale>
<SystemLocale>fr-FR</SystemLocale>
<UILanguage>fr-FR</UILanguage>
<UILanguageFallback>fr-FR</UILanguageFallback>
<UserLocale>fr-FR</UserLocale>
</component>
<component name="Microsoft-Windows-PnpCustomizationsWinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<DriverPaths>
<PathAndCredentials wcm:action="add" wcm:keyValue="1">
<Path>C:\drivers</Path>
</PathAndCredentials>
</DriverPaths>
</component>
</settings>
<settings pass="offlineServicing">
<component name="Microsoft-Windows-PnpCustomizationsNonWinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<DriverPaths>
<PathAndCredentials wcm:action="add" wcm:keyValue="1">
<Path>C:\drivers</Path>
</PathAndCredentials>
</DriverPaths>
</component>
</settings>
<settings pass="generalize">
<component name="Microsoft-Windows-Security-SPP" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SkipRearm>1</SkipRearm>
</component>
</settings>
<settings pass="specialize">
<component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<InputLocale>040c:0000040c</InputLocale>
<SystemLocale>fr-FR</SystemLocale>
<UILanguage>fr-FR</UILanguage>
<UILanguageFallback>fr-FR</UILanguageFallback>
<UserLocale>fr-FR</UserLocale>
</component>
<component name="Microsoft-Windows-Security-SPP-UX" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SkipAutoActivation>true</SkipAutoActivation>
</component>
<component name="Microsoft-Windows-SQMApi" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<CEIPEnabled>0</CEIPEnabled>
</component>
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ComputerName>W10CBB</ComputerName>
<CopyProfile>false</CopyProfile>
<RegisteredOrganization>UR2</RegisteredOrganization>
<RegisteredOwner>DSI</RegisteredOwner>
<TimeZone>Romance Standard Time</TimeZone>
</component>
<component name="Microsoft-Windows-UnattendedJoin" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Identification>
<Credentials>
<Domain>mydomain.com</Domain>
<Password>*****</Password>
<Username>*****</Username>
</Credentials>
<JoinDomain>mydomain.com</JoinDomain>
<MachineObjectOU>dc=mydomain,dc=com</MachineObjectOU>
</Identification>
</component>
</settings>
<settings pass="oobeSystem">
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<OOBE>
<HideEULAPage>true</HideEULAPage>
<HideOEMRegistrationScreen>true</HideOEMRegistrationScreen>
<HideOnlineAccountScreens>true</HideOnlineAccountScreens>
<HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
<NetworkLocation>Work</NetworkLocation>
<SkipUserOOBE>true</SkipUserOOBE>
<SkipMachineOOBE>true</SkipMachineOOBE>
<ProtectYourPC>1</ProtectYourPC>
<HideLocalAccountScreen>true</HideLocalAccountScreen>
</OOBE>
<RegisteredOrganization>UR2</RegisteredOrganization>
<RegisteredOwner>DSI</RegisteredOwner>
<TimeZone>Romance Standard Time</TimeZone>
</component>
</settings>
<cpi:offlineImage cpi:source="" xmlns:cpi="urn:schemas-microsoft-com:cpi" />
</unattend>
Before upload image :
c:\windows\system32\sysprep\sysprep.exe /quiet /generalize /oobe /shutdown /unattend:C:\Windows\Panther\Unattend.xml
Upload with FOG and deploy on other computer in debug mode
Verify if correct value :
echo $hostname => UC7774
echo $hostadou
Ok
ls /mnt/win/Windows/Panther/
Here i have problem because i have Unattend.xml but not unattend.xml (lower case)
I don’t know what i have foget ?
sed -i -e "s#<ComputerName>\([^<][^<]*\)</ComputerName>#<ComputerName>$hostname</ComputerName>#gi" /mnt/win/Windows/Panther/unattend.xml
=> Not such file or directory
sed -i -e "s#<MachineObjectOU>\([^<][^<]*\)</MachineObjectOU>#<MachineObjectOU>$hostadou</MachineObjectOU>#gi" /mnt/win/Windows/Panther/unattend.xml
=> Not such file or directory
I try anyway with Unattend.xml :
sed -i -e "s#<ComputerName>\([^<][^<]*\)</ComputerName>#<ComputerName>$hostname</ComputerName>#gi" /mnt/win/Windows/Panther/Unattend.xml
=> Ok
sed -i -e "s#<MachineObjectOU>\([^<][^<]*\)</MachineObjectOU>#<MachineObjectOU>$hostadou</MachineObjectOU>#gi" /mnt/win/Windows/Panther/Unattend.xml
=> Ok
Vérify result of sed :
cat /mnt/win/Windows/Panther/Unattend.xml | less
Ok good value
Reboot => computer join domain correctly in the correct OU but always named is WIN-XXXXX …
If i try
c:\windows\system32\sysprep\sysprep.exe /quiet /generalize /oobe /shutdown /unattend:C:\Windows\System32\Sysprep\sysprep.xml
Upload
After deploy in debug mode if i do ls /mnt/win/Windows/Panther/ here i have the unattend.xml (lower case)
I do same operation with sed but always WIN-XXXX
Maybe problem is here ?
Which is weird is the error on log file C:\Windows\Panther\UnattendGC\setupact.log :
[Shell Unattend] Running ‘specialize’ pass
[Shell Unattend] ComputerName in unattend [UC7774] matches the current ComputerName [UC7774]
[Shell Unattend] Skipping setting the same ComputerName
I don’t understand because my template windows i uploaded not have this computer name.
I hope i am clear but i don’t speak very good english.
I have also test to set in template image : Unattend.xml with UC7774 and correct OU with
c:\windows\system32\sysprep\sysprep.exe /quiet /generalize /oobe /shutdown /unattend:C:\Windows\Panther\Unattend.xml
If i reboot my template it’s correct named UC7774 and joined to domain
I don’t understand where is the problem 
Regards
@george1421 ,
Not better 
Maybe this comes from Active Directory
@george1421
You launch this command before upload your image (with upper U) :
c:\windows\system32\sysprep\sysprep.exe /quiet /generalize /oobe /shutdown /unattend:C:\Windows\Panther\Unattend.xml
And in your post-install script you copy and sed unattend.xml (lower case)
You keep Unattend.xml or your delete him in your post-install script ?
Or you keep unattend.xml and Unattend.xml in the same folder ?
Regards
@george1421
Thanks.
I would take care of the name of Unattend.xml
@george1421
1-I thought I saw somewhere that we should not use the unattend.xml in Panther during command sysprep before upload.
2/3- Sorry this look like this :
sed -i "s/UCXXXX/$hostname/" /mnt/win/Windows/System32/Sysprep/sysprep.xml
sed -i "s/UCXXXX/$hostname/" /mnt/win/Windows/Panther/unattend.xml
sed -i "s/ouxx/$hostadou/" /mnt/win/Windows/System32/Sysprep/sysprep.xml
sed -i "s/ouxx/$hostadou/" /mnt/win/Windows/Panther/unattend.xml
I also use debug and xml are correctly set at the end of script.
It’s true that it’s far-fetched but it always worked with windows 7 and windows 10 1709. But not with windows 10 1803 
I hope this is the problem, i try next week with only unattend.xml in Panther
@george1421
Thanks, i will do new test with this next week.
Actually i use this sed to modify xml :
sed -i "s/UCXXXX/$hostname/" /mnt/win/Windows/System32/Sysprep/sysprep.xml
sed -i "s/ouxx/$hostadou/" /mnt/win/Windows/Panther/unattend.xml
@sebastian-roth
Hi,
I use FOG 1.5.4
I have just done a new test and work on http but not https.
I use Firefox 61.0.1 64 bits without extensions.
I use on the host : Basic Task -> Advanced -> Wake-up
See my virtualhost conf for https :
<VirtualHost *:443>
KeepAlive Off
ServerName fog.mydomain
ServerAlias fog.mydomain
#<FilesMatch "\.php$">
# SetHandler "proxy:fcgi://127.0.0.1:9000/"
#</FilesMatch>
DocumentRoot /var/www/fog
<Directory /var/www/fog/>
DirectoryIndex index.php index.html index.htm
Require all granted
</Directory>
RewriteEngine On
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-d
RewriteRule ^/(.*)$ /fog/api/index.php [QSA,L]
# -------------------------------------------------------------------------
# SSL
#Header always set X-Frame-Options SAMEORIGIN
#Header always unset X-Frame-Options
SSLEngine on
SSLCertificateFile /etc/apache2/certs/XXX.pem
SSLCertificateKeyFile /etc/apache2/certs/private/XXX.key
SSLVerifyClient none
SSLVerifyDepth 3
BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown
# -------------------------------------------------------------------------
# Logs
LogLevel warn
ErrorLog ${APACHE_LOG_DIR}/fog-ssl-error.log
LogFormat "TO %v:%p FROM %h VIA %{X-Forwarded-For}i %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\" \"%{Content-Type}o\" %T %D" logstash
CustomLog ${APACHE_LOG_DIR}/fog-ssl-access.log logstash
</VirtualHost>
@george1421
Hi,
Yes same problem today even with your sysprep 
I take everything from scratch
Only difference is i do this command :
c:\windows\system32\sysprep\sysprep.exe /generalize /oobe /shutdown /unattend:C:\Windows\System32\Sysprep\sysprep.xml
And in my post deploy script i copy and sed to this
C:\Windows\System32\Sysprep\sysprep.xml
and
C:\Windows\Panther\unattend.xml
I go to try same command like you (in your command and FOG script it’s unattend.xml or Unattend.xml ?).
After doing your sysprep command and shutdown, you upload your image on FOG ?
In your post deploy script you use only sed or you use other tricks related to your image ? (cleanup files or folder or other)
Thanks
Thanks for your response.
Your method works on Windows 10 1803 ?
Have you an example of your template of unattend.xml ?
Hi,
I search feedback on methods to sysprep windows 10 1803 and join domain.
What are your methods :
-to sysprep your windows 10 1803
-And to join domain with the correct ComputerName (host name in fog web interface)
FOGprep still exist ? If yes how it works ?
Regards
I think found the problem but don’t know how to resolve this.
If i launch task on the web interface with HTTPS it’s not work.
But if i launch web interface with HTTP unsecure it’s work.
Ideas ?
Hi,
I have weird behavior with wake on lan with the web interface (basic tasks -> advanced -> wake-up)
This work only if i launch the task on the web interface from host in the same vlan.
If i test from host in other vlan (always with web interface), it’s not work.
I test from FOG server (who is in other vlan) : /usr/bin/wakeonlan 00:11:22:xx and it’s works
When we launch wake-up from web interface is it the server who send wakeonlan command or the host from which clic on the web interface ?
Regards
@george1421 Thanks it’s work with your sysprep.
Maybe options what i use are depreciate with W10 1803.
I go to create new sysprep from ADK 1803
@george1421 Thanks.
Next week i go try with same command line and xml of you.
I’m just going to delete rubric that don’t need and adapt my sed
@george1421
Thanks for your test.
1- My xml is ok in C:\Windows\Panther\unattend.xml and C:\Windows\System32\sysprep\sysprep.xml
2- This is not script that rename the computer. This is sysprep.
After doing modificiations on my windows image i launch sysprep like this :
sysprep /generalize /oobe /shutdown /unattend:C:\Windows\System32\sysprep\sysprep.xml
And after cloning the computer i set correct name in the xml (with sed function of linux)
See my sysprep.xml after cloning (computer have name WIN-XXXX instead of UC0001):
<?xml version='1.0' encoding='utf-8'?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<settings pass="specialize" wasPassProcessed="true">
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<CopyProfile>false</CopyProfile>
<ComputerName>UC0001</ComputerName>
<RegisteredOrganization>My Organisation</RegisteredOrganization>
<RegisteredOwner>IT</RegisteredOwner>
<TimeZone>Romance Standard Time</TimeZone>
</component>
<component name="Microsoft-Windows-Deployment" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ExtendOSPartition>
<Extend>true</Extend>
</ExtendOSPartition>
</component>
<component name="Microsoft-Windows-UnattendedJoin" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Identification>
<Credentials>
<Domain>mydomain.local</Domain>
<Password>*SENSITIVE*DATA*DELETED*</Password>
<Username>*SENSITIVE*DATA*DELETED*</Username>
</Credentials>
<DebugJoin>true</DebugJoin>
<JoinDomain>mydomain.local</JoinDomain>
<MachineObjectOU>OU=XX,OU=XX,OU=XX,OU=XX,DC=mydomain,DC=local</MachineObjectOU>
</Identification>
</component>
<component name="Microsoft-Windows-Security-SPP-UX" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SkipAutoActivation>false</SkipAutoActivation>
</component>
</settings>
<settings pass="generalize">
<component name="Microsoft-Windows-Deployment" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<DuplicatorDescription>IT</DuplicatorDescription>
</component>
<component name="Microsoft-Windows-Security-SPP" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SkipRearm>0</SkipRearm>
</component>
</settings>
<settings pass="oobeSystem" wasPassProcessed="true">
<component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<InputLocale>fr-fr</InputLocale>
<SystemLocale>fr-fr</SystemLocale>
<UILanguage>fr-fr</UILanguage>
<UILanguageFallback>fr-fr</UILanguageFallback>
<UserLocale>fr-fr</UserLocale>
</component>
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<OOBE>
<ProtectYourPC>1</ProtectYourPC>
<HideEULAPage>true</HideEULAPage>
<HideLocalAccountScreen>true</HideLocalAccountScreen>
<HideOEMRegistrationScreen>true</HideOEMRegistrationScreen>
<HideOnlineAccountScreens>true</HideOnlineAccountScreens>
<HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
</OOBE>
<UserAccounts>
<AdministratorPassword>*SENSITIVE*DATA*DELETED* </AdministratorPassword>
<LocalAccounts>
<LocalAccount wcm:action="add">
<Password>*SENSITIVE*DATA*DELETED*</Password>
<Name>*SENSITIVE*DATA*DELETED*</Name>
<Group>Administrateurs</Group>
</LocalAccount>
</LocalAccounts>
</UserAccounts>
</component>
</settings>
<cpi:offlineImage cpi:source="wim:c:/users/admin/desktop/install.wim#Windows 10 Pro" xmlns:cpi="urn:schemas-microsoft-com:cpi"> </cpi:offlineImage>
</unattend>