Service status of FOGServcie cannot be changed after deployment
I know this topic has been discussed many times, but I have not found a solution to my problem.
I have just refueled several PCs with a new image of the latest version of Windows10 Enterprise N 2021 LTSC. Unfortunately, the FOGService is not switched from disabled.
I am using FOG Server version 22.214.171.124 and FOG Client version 0.12.1.
In audit mode I have created the file setupcomplete.cmd under C:\Windows\Setup\Scripts, since it contains other commands to clean up I know this will be executed.
Before closing via Sysprep I have set the FOGService to disabled and via the setupcomplete.cmd the service should later be set back to delayed start which unfortunately does not work. I also tried it with automatic start without delay, as well as without the blank between the start=delayed-auto or start=auto. But this is not the error.
I tested the command on an installed client and in the normal CMD I get the error:
[SC] OpenService ERROR 5: Access denied
Same by using the net start command.
Only when I start the CMD with administrator right the command works.
Has anything changed here with Windows10 in Enterprise?
I don’t know if it’s important or interesting, but on one of 16 PCs the FOGService wasn’t to be found under the services although the PC was fueled with the same image.
Here is the content of my setupcomplete.cmd:
del /Q /F c:\windows\system32\sysprep\unattend.xml del /Q /F c:\windows\panther\unattend.xml del %0 sc config FOGService start= delayed-auto net start FOGService
cross linking posts that appear to have similar issues: https://forums.fogproject.org/topic/16327/windows-10-21h2-fogservice-not-starting
my setupcomplete.cmd contains a few commands before the FOGService, like deleting the unattend.xml. Since the files are deleted, I assume that the setupcomplete.cmd is also executed.
we are also experiencing this where it appears the SetupComplete is running but not being run as an Administrator so unable to make changes/start the service as my colleague has experienced. in the post below
@motd Your root question is something that Microsoft needs to answer. The setupcomplete.cmd should run as an elevated admin. If that has changed then it will be a problem.
Can you confirm that the setupcomplete.cmd file is actually running?
Something as simple as
echo Hello> c:\flag.txtshould create a file to confirm that the batch file is actually running.
why must the FOGService be deactivated before closing with Sysprep?
This one is a bit easier to answer. As soon as the fog service starts running it checks into the FOG server to see if it has things to do. Rename system is one. The problem is the fog service will start doing its thing before OOBE is complete, causing a reboot in the middle of OOBE botching the setup.
apparently no one has an idea.
general question, why must the FOGService be deactivated before closing with Sysprep?
Wouldn’t it also be possible to just stop the service and set it to delayed-auto? Or what is the problem here since the wiki says the service must be disabled bevor sysprep.