vfong1982 Posted May 19, 2017 Posted May 19, 2017 Hi, We are finding the OneDrive component a bit of a nuisance on our network, as we use a separate drive mapping program to map a user's OneDrive account to a drive letter. So we've uninstalled OneDrive using the following script: taskkill /f /im OneDrive.exe %SystemRoot%\SysWOW64\OneDriveSetup.exe /uninstall rd "%UserProfile%\OneDrive" /Q /S rd "%LocalAppData%\Microsoft\OneDrive" /Q /S rd "%ProgramData%\Microsoft OneDrive" /Q /S REG Delete "HKEY_CLASSES_ROOT\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /f REG Delete "HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /f However, it appears to reinstall itself after a while. Any ideas?
gtg93 Posted May 19, 2017 Posted May 19, 2017 Although I'm yet to try this via a script over a site, I did the same as you except changed permissions to %SystemRoot%\SysWOW64\OneDriveSetup.exe on my personal machine to deny all for everyone (you'll need to take ownership first) and it hasn't returned. I made the assumption it reinstalled from the exe periodically or with Windows Updates... May just be a fluke that it hasn't reinstalled yet for me. 2
sted Posted May 19, 2017 Posted May 19, 2017 Although I'm yet to try this via a script over a site, I did the same as you except changed permissions to %SystemRoot%\SysWOW64\OneDriveSetup.exe on my personal machine to deny all for everyone (you'll need to take ownership first) and it hasn't returned. I made the assumption it reinstalled from the exe periodically or with Windows Updates... May just be a fluke that it hasn't reinstalled yet for me. ive done basically that before on domain pcs. I believe it comes back every time a new user logs on as part of the getting stuff ready screens but if they cant read the install file it just goes past it 3
ADMaster Posted May 19, 2017 Posted May 19, 2017 Onedrive setup is in the users run reg key, delete that and it will not install. Here are my commands to remove onedrive REG LOAD HKLM\DEFAULT $OSDISK\Users\Default\NTUSER.DAT reg delete HKLM\default\software\Microsoft\Windows\CurrentVersion\Run /v OneDriveSetup /f REG ADD "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnce" /v removeonedrive /t REG_SZ /d "%SystemRoot%\SysWOW64\OneDriveSetup.exe /uninstall" /f REG DELETE "HKEY_CLASSES_ROOT\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /f REG DELETE "HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /f REG UNLOAD HKLM\DEFAULT This is done during deployment so the default user profile effects every user of the machine. 2
Bob_the_Goon Posted October 2, 2017 Posted October 2, 2017 @ADMaster where do you place your batch file in your build process? We use MDT 2013 here.
ADMaster Posted October 2, 2017 Posted October 2, 2017 I use SCCM so may be different, but here you go.
free780 Posted October 2, 2017 Posted October 2, 2017 Just be careful in case you go to 1709 and want to use OneDrive.
ADMaster Posted October 2, 2017 Posted October 2, 2017 Just be careful in case you go to 1709 and want to use OneDrive. We're a Google apps school so I don't see that happening anytime soon.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now