New
#1
Remove OneDrive from windows 10 image
How to remove OneDrive completely from Windows 10 image.
1 - Mount the image:
Dism /Mount-wim /WimFile:<install.wim location> /index:1 /MountDir:<mountdir>
2 - Erase OneDriveSetup.exe
del <mountdir>\windows\system32\onedrivesetup.exe or del <mountdir>\windows\syswow64\onedrivesetup.exe
3 - Delete the run key from the default user
reg load HKLM\test <mountdir>\Users\default\ntuser.dat
Then go to regedit and delete: HKLM\test\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\OneDriveSetup
4 - Unload registry
reg unload HKLM\test
5 - Unmount the image
dism /UnMount-wim /MountDir:<mountdir> /commit
Done..