From d974289ac4879688c834b41384dd0373277d4173 Mon Sep 17 00:00:00 2001 From: Alex Hirsch Date: Wed, 20 Jul 2016 16:20:58 +0200 Subject: [PATCH] Remove onedrive run once hook for new users --- scripts/remove-onedrive.ps1 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/remove-onedrive.ps1 b/scripts/remove-onedrive.ps1 index 27e7484..695083f 100644 --- a/scripts/remove-onedrive.ps1 +++ b/scripts/remove-onedrive.ps1 @@ -33,6 +33,12 @@ mkdir -Force "HKCR:\Wow6432Node\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" sp "HKCR:\Wow6432Node\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" "System.IsPinnedToNameSpaceTree" 0 Remove-PSDrive "HKCR" +# Thank you Matthew Israelsson +echo "Removing run hook for new users" +reg load "hku\Default" "C:\Users\Default\NTUSER.DAT" +reg delete "HKEY_USERS\Default\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" /v "OneDriveSetup" /f +reg unload "hku\Default" + echo "Removing startmenu entry" rm -Force -ErrorAction SilentlyContinue "$env:userprofile\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\OneDrive.lnk"