OneDrive missing post install but not removed within NTLite

chrcol

Member
Messages
95
Reaction score
15
I dont know when this started happening although I do have my older images so can test.

But I just noticed I have no onedrive binary at all on the system on the latest ISO I created but it isnt removed in ntlite.

From what I understand its normally in appdata/local so I guess my profile generation might be messed up somehow?

If relevant Windows 10 21H2 LTSC.

I see is an installer so I guess I could just silent install it.

Its missing on my old laptop as well so maybe it was never included and I installed it manually on my desktop ages ago. I might be wasting everyones time here, but will leave the thread here in case someone has some insights.
 
Last edited:
When you study the proper steps to remove OneDrive from an image, it's easier to understand the normal setup process.

Remove OneDrive setup file and its icon:
Code:
takeown /f %SystemRoot%\System32\OneDriveSetup.exe
icacls %SystemRoot%\System32\OneDriveSetup.exe /grant SYSTEM:f
del %SystemRoot%\System32\OneDriveSetup.exe

takeown /f %SystemRoot%\System32\OneDrive.ico
icacls %SystemRoot%\System32\OneDrive.ico /grant SYSTEM:f
del %SystemRoot%\System32\OneDrive.ico

Delete three Run tasks which install OneDrive. One each for NT Authority\Local Service, NetworkService, and Default User's profile:
Code:
reg delete "HKEY_USERS\S-1-5-19\Software\Microsoft\Windows\CurrentVersion\Run" /v OneDriveSetup /f
reg delete "HKEY_USERS\S-1-5-20\Software\Microsoft\Windows\CurrentVersion\Run" /v OneDriveSetup /f

reg load HKLM\DEFAULT C:\Users\Default\NTUSER.DAT
reg delete HKLM\DEFAULT\Software\Microsoft\Windows\CurrentVersion\Run /v OneDriveSetup /f
reg unload HKLM\DEFAULT
 
Thanks, I can confirm all reg keys are missing and no onedrive binary in system32 when I install from stock LTSC image.

What I ended up doing was just having the onedrive setup package left on desktop, since its a dumb installer not accepting any flags. Then its there for easy installation if I choose to use it on a device.
 
Last edited:
Back
Top