Kcleanup Really Slow with 3.6

After our image deploys I have 3 post install tasks one to Join the domain and then,one to activate windows and one to activate office. All these tasks run fine and kcleanup starts after them. A black command prompt window comes up for kcleanup.exe and then it just sits there for a really long time like 20 to 30 minutes. Eventually it does work and the computer restarts and all the KACE files get properly deleted. But 30 minutes on that screen is ridiculous, that doubles my imaging time.

Also do I have to initiate my own restart? I don't have a restart task setup after all my post install tasks run. I didn't think that was required since it usually restarts on its own after all the tasks run.

when it reboots, be ready and boot into safe mode so no 3rd party programs run including kcleanup.

See if this take a long time, if yes then it is a system file problem.

Use regedit and go to the runonce key and turn off the kcleanup task and reboot so all other third party apps run and see if it is slow.

Then manually run the vb line you remove from the run once.

this should help you narrow it down to what is causing the lag. it could be driver discovery happening or some other program doing tasks which are delaying the kcleanup, or just be something wrong with the cleanup task for your image.

ok so safemode after the image deploys? Also I checked a few machines that had kcleanup running and they all had kcleanup.exe in the task manager running at 50% CPU. Don't know if that's a clue to anything.

We use a scripted installation. When SEP installs it updates its policy from the
SEP Manager which has the exclusion.
We excluded c:\kace\ and c:\kcleanup.exe.
Try adding the exclusions and see if when you image SEP updates policy.
I believe running the following forces a heartbeat which will update policy
smc.exe -updateconfig
The exclusions are in the registry so you could add them
but much better off letting policy do it.

I added the exclusion to the SEP Manager but it didn't seem to work. Maybe because since I have a WIM image. So I just setup a post install task to shut off SEP right at the start. kcleanup is almost instant right after that and SEP turns back on automatically on the restart. Seems like our issues are fixed. Thanks a ton Gavin!

Hey Paul. Disabling Symantec is a simple one liner ran as a BAT script. "C:\Program Files\Symantec\Symantec Endpoint Protection\smc" -stop Symantec automatically turns back on after the machine restarts.

Also worth noting, most enterprises run SEP with a password. In the documentation from Symantec they say to call the commands as such: "...\smc" -stop -p XXXXXXX
That didn't work for us. What we had to do was call the password before the stop command like this: "...\smc" -p XXXXXXXX -stop

I hope this helps save others time trying to get that working, or rather, stopping.

Don't be a Stranger!

Sign up today to participate,
stay informed, earn points and establish a reputation for yourself!