Solved How do I prevent OneDrive from activating when setting up new laptop?


Make it an option most people will miss and once you have them, Hit them in the wallet.
Exactly! Make Store Files Locally Only the obvious option, that's like kicking the potential customer right out of the store!
 

My Computers

System One System Two

  • OS
    Windows 11
    Computer type
    PC/Desktop
    Manufacturer/Model
    ASUS ROG Strix
  • Operating System
    Windows 11
    Computer type
    Laptop
    Manufacturer/Model
    ASUS VivoBook
Hello, :alien:

Usually, you'll see this screen below during Windows Setup. You'll have to click/tap on the small Only save files to this PC link instead of Next button to not sync with OneDrive.
Hi, well I just got a brand new HP laptop with Win11 and there was NO such prompt during setup with anything about OneDrive or where to save files.

I wound up here after I found Desktop, Downloads, Documents, etc folders located in C:\Users\username\OneDrive instead of just C:\Users\username. After reading here I was shocked that I'd missed the option while setting up, so I reset the PC and watched VERY carefully... NOPE! There was no page to uncheck "Only save files to this PC". Windows 11 setup must now be configured to enable syncing to OneDrive by default.

This is what I did, which seems to have restored normal Windows folder hierarchy:

OneDrive Settings:
Backup tab, Manage backup, it showed Desktop, Documents, Pictures all being backup, clicked Stop Backup on each
Office tab, unchecked Use Office applications to sync Office files that I open
Account tab, Choose Folders, screen says "Choose what you want to be available on your "OneDrive" folder", unchecked Make all files available
Settings tab, unchecked Start OneDrive automatically when I sign into windows

restarted PC

File Explorer, all Quick Access icons said "stored locally"; then checked properties of each one (Desktop, Downloads, Documents, Pictures, Music, Videos) and their locations were all C:\Users\username... WOOHOO!

restarted PC just in case

OneDrive Settings: Account tab, clicked Unlink This PC

restarted PC again just in case

Control Panel, Programs & Features, uninstalled OneDrive
 

My Computer

System One

  • OS
    Windows 11
Hi, well I just got a brand new HP laptop with Win11 and there was NO such prompt during setup with anything about OneDrive or where to save files.

I wound up here after I found Desktop, Downloads, Documents, etc folders located in C:\Users\username\OneDrive instead of just C:\Users\username. After reading here I was shocked that I'd missed the option while setting up, so I reset the PC and watched VERY carefully... NOPE! There was no page to uncheck "Only save files to this PC". Windows 11 setup must now be configured to enable syncing to OneDrive by default.

This is what I did, which seems to have restored normal Windows folder hierarchy:

OneDrive Settings:
Backup tab, Manage backup, it showed Desktop, Documents, Pictures all being backup, clicked Stop Backup on each
Office tab, unchecked Use Office applications to sync Office files that I open
Account tab, Choose Folders, screen says "Choose what you want to be available on your "OneDrive" folder", unchecked Make all files available
Settings tab, unchecked Start OneDrive automatically when I sign into windows

restarted PC

File Explorer, all Quick Access icons said "stored locally"; then checked properties of each one (Desktop, Downloads, Documents, Pictures, Music, Videos) and their locations were all C:\Users\username... WOOHOO!

restarted PC just in case

OneDrive Settings: Account tab, clicked Unlink This PC

restarted PC again just in case

Control Panel, Programs & Features, uninstalled OneDrive

Hello, and welcome. :alien:

Yeah, unfortunately, OneDrive is turned on and used by default now when setting up a Microsoft account during Windows Setup.
 

My Computers

System One System Two

  • OS
    Windows 11 Pro for Workstations
    Computer type
    PC/Desktop
    Manufacturer/Model
    Custom self build
    CPU
    Intel i7-8700K 5 GHz
    Motherboard
    ASUS ROG Maximus XI Formula Z390
    Memory
    64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz (F4-3600C18D-32GTZR)
    Graphics Card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING (11GB GDDR5X)
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    2 x Samsung Odyssey G75 27"
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Samsung 990 PRO M.2,
    4TB Samsung 990 PRO M.2,
    8TB WD MyCloudEX2Ultra NAS
    PSU
    Seasonic Prime Titanium 850W
    Case
    Thermaltake Core P3 wall mounted
    Cooling
    Corsair Hydro H115i
    Keyboard
    Logitech wireless K800
    Mouse
    Logitech MX Master 3
    Internet Speed
    1 Gbps Download and 35 Mbps Upload
    Browser
    Google Chrome
    Antivirus
    Microsoft Defender and Malwarebytes Premium
    Other Info
    Logitech Z625 speaker system,
    Logitech BRIO 4K Pro webcam,
    HP Color LaserJet Pro MFP M477fdn,
    APC SMART-UPS RT 1000 XL - SURT1000XLI,
    Galaxy S23 Plus phone
  • Operating System
    Windows 11 Pro
    Computer type
    Laptop
    Manufacturer/Model
    HP Spectre x360 2in1 14-eu0098nr (2024)
    CPU
    Intel Core Ultra 7 155H 4.8 GHz
    Memory
    16 GB LPDDR5x-7467 MHz
    Graphics card(s)
    Integrated Intel Arc
    Sound Card
    Poly Studio
    Monitor(s) Displays
    14" 2.8K OLED multitouch
    Screen Resolution
    2880 x 1800
    Hard Drives
    2 TB PCIe NVMe M.2 SSD
    Internet Speed
    Intel Wi-Fi 7 BE200 (2x2) and Bluetooth 5.4
    Browser
    Chrome and Edge
    Antivirus
    Windows Defender and Malwarebytes Premium
Hello, and welcome. :alien:

Yeah, unfortunately, OneDrive is turned on and used by default now when setting up a Microsoft account during Windows Setup.
Ahh, figured that... and for a while it's also been that you can't opt to use a local PC account during setup either - you HAVE to enter or create a Microsoft (online) account... though you can switch the PC to a local account after setup is completed (unless that's changed also).
 

My Computer

System One

  • OS
    Windows 11
Ahh, figured that... and for a while it's also been that you can't opt to use a local PC account during setup either - you HAVE to enter or create a Microsoft (online) account... though you can switch the PC to a local account after setup is completed (unless that's changed also).

Luckily, you can set up a local account using step 21 below during Windows Setup.

 

My Computers

System One System Two

  • OS
    Windows 11 Pro for Workstations
    Computer type
    PC/Desktop
    Manufacturer/Model
    Custom self build
    CPU
    Intel i7-8700K 5 GHz
    Motherboard
    ASUS ROG Maximus XI Formula Z390
    Memory
    64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz (F4-3600C18D-32GTZR)
    Graphics Card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING (11GB GDDR5X)
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    2 x Samsung Odyssey G75 27"
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Samsung 990 PRO M.2,
    4TB Samsung 990 PRO M.2,
    8TB WD MyCloudEX2Ultra NAS
    PSU
    Seasonic Prime Titanium 850W
    Case
    Thermaltake Core P3 wall mounted
    Cooling
    Corsair Hydro H115i
    Keyboard
    Logitech wireless K800
    Mouse
    Logitech MX Master 3
    Internet Speed
    1 Gbps Download and 35 Mbps Upload
    Browser
    Google Chrome
    Antivirus
    Microsoft Defender and Malwarebytes Premium
    Other Info
    Logitech Z625 speaker system,
    Logitech BRIO 4K Pro webcam,
    HP Color LaserJet Pro MFP M477fdn,
    APC SMART-UPS RT 1000 XL - SURT1000XLI,
    Galaxy S23 Plus phone
  • Operating System
    Windows 11 Pro
    Computer type
    Laptop
    Manufacturer/Model
    HP Spectre x360 2in1 14-eu0098nr (2024)
    CPU
    Intel Core Ultra 7 155H 4.8 GHz
    Memory
    16 GB LPDDR5x-7467 MHz
    Graphics card(s)
    Integrated Intel Arc
    Sound Card
    Poly Studio
    Monitor(s) Displays
    14" 2.8K OLED multitouch
    Screen Resolution
    2880 x 1800
    Hard Drives
    2 TB PCIe NVMe M.2 SSD
    Internet Speed
    Intel Wi-Fi 7 BE200 (2x2) and Bluetooth 5.4
    Browser
    Chrome and Edge
    Antivirus
    Windows Defender and Malwarebytes Premium
Hi, well I just got a brand new HP laptop with Win11 and there was NO such prompt during setup with anything about OneDrive or where to save files.

I wound up here after I found Desktop, Downloads, Documents, etc folders located in C:\Users\username\OneDrive instead of just C:\Users\username. After reading here I was shocked that I'd missed the option while setting up, so I reset the PC and watched VERY carefully... NOPE! There was no page to uncheck "Only save files to this PC". Windows 11 setup must now be configured to enable syncing to OneDrive by default.

This is what I did, which seems to have restored normal Windows folder hierarchy:

OneDrive Settings:
Backup tab, Manage backup, it showed Desktop, Documents, Pictures all being backup, clicked Stop Backup on each
Office tab, unchecked Use Office applications to sync Office files that I open
Account tab, Choose Folders, screen says "Choose what you want to be available on your "OneDrive" folder", unchecked Make all files available
Settings tab, unchecked Start OneDrive automatically when I sign into windows

restarted PC

File Explorer, all Quick Access icons said "stored locally"; then checked properties of each one (Desktop, Downloads, Documents, Pictures, Music, Videos) and their locations were all C:\Users\username... WOOHOO!

restarted PC just in case

OneDrive Settings: Account tab, clicked Unlink This PC

restarted PC again just in case

Control Panel, Programs & Features, uninstalled OneDrive
I wonder if @Brink can turn the process in a tutorial?
 

My Computer

System One

  • OS
    Windows 10 Pro
I wonder if @Brink can turn the process in a tutorial?

:alien:





 

My Computers

System One System Two

  • OS
    Windows 11 Pro for Workstations
    Computer type
    PC/Desktop
    Manufacturer/Model
    Custom self build
    CPU
    Intel i7-8700K 5 GHz
    Motherboard
    ASUS ROG Maximus XI Formula Z390
    Memory
    64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz (F4-3600C18D-32GTZR)
    Graphics Card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING (11GB GDDR5X)
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    2 x Samsung Odyssey G75 27"
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Samsung 990 PRO M.2,
    4TB Samsung 990 PRO M.2,
    8TB WD MyCloudEX2Ultra NAS
    PSU
    Seasonic Prime Titanium 850W
    Case
    Thermaltake Core P3 wall mounted
    Cooling
    Corsair Hydro H115i
    Keyboard
    Logitech wireless K800
    Mouse
    Logitech MX Master 3
    Internet Speed
    1 Gbps Download and 35 Mbps Upload
    Browser
    Google Chrome
    Antivirus
    Microsoft Defender and Malwarebytes Premium
    Other Info
    Logitech Z625 speaker system,
    Logitech BRIO 4K Pro webcam,
    HP Color LaserJet Pro MFP M477fdn,
    APC SMART-UPS RT 1000 XL - SURT1000XLI,
    Galaxy S23 Plus phone
  • Operating System
    Windows 11 Pro
    Computer type
    Laptop
    Manufacturer/Model
    HP Spectre x360 2in1 14-eu0098nr (2024)
    CPU
    Intel Core Ultra 7 155H 4.8 GHz
    Memory
    16 GB LPDDR5x-7467 MHz
    Graphics card(s)
    Integrated Intel Arc
    Sound Card
    Poly Studio
    Monitor(s) Displays
    14" 2.8K OLED multitouch
    Screen Resolution
    2880 x 1800
    Hard Drives
    2 TB PCIe NVMe M.2 SSD
    Internet Speed
    Intel Wi-Fi 7 BE200 (2x2) and Bluetooth 5.4
    Browser
    Chrome and Edge
    Antivirus
    Windows Defender and Malwarebytes Premium
@Brink The bits and pieces are certainly there, but what I meant was pulling it all together in a single script to make a new Windows computer as if OneDrive never existed on it.

To borrow a word from a previous poster, MS changes the 'minefield' every so often to virtually force install OneDrive on every new Windows computer.

Rather than navigating every change of the 'minefield', let MS install OneDrive on the new computer.

Then the single script exorcises OneDrive from the new computer (y)
 

My Computer

System One

  • OS
    Windows 10 Pro
@Brink The bits and pieces are certainly there, but what I meant was pulling it all together in a single script to make a new Windows computer as if OneDrive never existed on it.

To borrow a word from a previous poster, MS changes the 'minefield' every so often to virtually force install OneDrive on every new Windows computer.

Rather than navigating every change of the 'minefield', let MS install OneDrive on the new computer.

Then the single script exorcises OneDrive from the new computer (y)

Unfortunately, I don't think that's possible since these settings are not in the registry. :(

Maybe this:

 

My Computers

System One System Two

  • OS
    Windows 11 Pro for Workstations
    Computer type
    PC/Desktop
    Manufacturer/Model
    Custom self build
    CPU
    Intel i7-8700K 5 GHz
    Motherboard
    ASUS ROG Maximus XI Formula Z390
    Memory
    64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz (F4-3600C18D-32GTZR)
    Graphics Card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING (11GB GDDR5X)
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    2 x Samsung Odyssey G75 27"
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Samsung 990 PRO M.2,
    4TB Samsung 990 PRO M.2,
    8TB WD MyCloudEX2Ultra NAS
    PSU
    Seasonic Prime Titanium 850W
    Case
    Thermaltake Core P3 wall mounted
    Cooling
    Corsair Hydro H115i
    Keyboard
    Logitech wireless K800
    Mouse
    Logitech MX Master 3
    Internet Speed
    1 Gbps Download and 35 Mbps Upload
    Browser
    Google Chrome
    Antivirus
    Microsoft Defender and Malwarebytes Premium
    Other Info
    Logitech Z625 speaker system,
    Logitech BRIO 4K Pro webcam,
    HP Color LaserJet Pro MFP M477fdn,
    APC SMART-UPS RT 1000 XL - SURT1000XLI,
    Galaxy S23 Plus phone
  • Operating System
    Windows 11 Pro
    Computer type
    Laptop
    Manufacturer/Model
    HP Spectre x360 2in1 14-eu0098nr (2024)
    CPU
    Intel Core Ultra 7 155H 4.8 GHz
    Memory
    16 GB LPDDR5x-7467 MHz
    Graphics card(s)
    Integrated Intel Arc
    Sound Card
    Poly Studio
    Monitor(s) Displays
    14" 2.8K OLED multitouch
    Screen Resolution
    2880 x 1800
    Hard Drives
    2 TB PCIe NVMe M.2 SSD
    Internet Speed
    Intel Wi-Fi 7 BE200 (2x2) and Bluetooth 5.4
    Browser
    Chrome and Edge
    Antivirus
    Windows Defender and Malwarebytes Premium
@Brink The bits and pieces are certainly there, but what I meant was pulling it all together in a single script to make a new Windows computer as if OneDrive never existed on it.

To borrow a word from a previous poster, MS changes the 'minefield' every so often to virtually force install OneDrive on every new Windows computer.

Rather than navigating every change of the 'minefield', let MS install OneDrive on the new computer.

Then the single script exorcises OneDrive from the new computer (y)
I have batch script that maybe you are looking for.
 

Attachments

  • Manage_OneDrive.bat
    4.1 KB · Views: 2

My Computer

System One

  • OS
    Windows 11
    Computer type
    PC/Desktop
    Manufacturer/Model
    HP Pavilion
    CPU
    AMD Ryzen 7 5700G
    Motherboard
    Erica6
    Memory
    Micron Technology DDR4-3200 16GB
    Graphics Card(s)
    NVIDIA GeForce RTX 3060
    Sound Card
    Realtek ALC671
    Monitor(s) Displays
    Samsung SyncMaster U28E590
    Screen Resolution
    3840 x 2160
    Hard Drives
    SAMSUNG MZVLQ1T0HALB-000H1
I find it unbelievable the land mines you have to sidestep to not accept using MS services.
Gettin to be a dictatorship!

They ought to update the EULA to include: "If you don't use OneDrive, you can't use Windows"

View attachment 56543
I'm pretty sure you have to use Apple services/account to set up their devices too...
 

My Computer

System One

  • OS
    Windows 11 Pro 23H2 (RP channel)
    Computer type
    PC/Desktop
    Manufacturer/Model
    Gigabyte
    CPU
    AMD Ryzen 5900X 12-core
    Motherboard
    X570 Aorus Xtreme
    Memory
    64GB Corsair Platinum RGB 3600MHz CL16
    Graphics Card(s)
    MSI Suprim X 3080 Ti
    Sound Card
    Soundblaster AE-5 Plus
    Monitor(s) Displays
    ASUS TUF Gaming VG289Q
    Screen Resolution
    3840x2160
    Hard Drives
    Samsung 990 Pro 2TB
    Samsung 980 Pro 2TB
    Samsung 970 Evo Plus 1TB
    Samsung 870 Evo 4TB
    Samsung T7 Touch 1TB
    PSU
    Asus ROG Strix 1000W
    Case
    Corsair D750 Airflow
    Cooling
    Noctua NH-D15S
    Keyboard
    Asus ROG Flare
    Mouse
    Logitech G903 with PowerPlay charger
    Internet Speed
    500Mb/sec
    Browser
    Microsoft Edge
    Antivirus
    Windows Defender
@FreeBooter Can you post a flowchart and/or pseudocode of what your batch script does?
1 - Enable OneDrive Integration

2 - Disable OneDrive Integration

3 - Remove OneDrive from Navigation Pane

4 - Add OneDrive to Navigation Pane

5 - Turn On OneDrive Run at Startup

6 - Turn Off OneDrive Run at Startup

7 - Uninstall OneDrive

Code:
(Net session >nul 2>&1)||(PowerShell start """%~0""" -verb RunAs & Exit /B)



:_CHOICE

Cls & Mode CON  LINES=20 COLS=50 & Color 0E & Title Created By FreeBooter
Echo.
Echo.
Echo.
Echo        1 - Enable OneDrive Integration 
Echo.       
Echo        2 - Disable OneDrive Integration
Echo.
Echo        3 - Remove OneDrive from Navigation Pane   
Echo.       
Echo        4 - Add OneDrive to Navigation Pane
Echo.
Echo        5 - Turn On OneDrive Run at Startup   
Echo.       
Echo        6 - Turn Off OneDrive Run at Startup
Echo.
Echo        7 - Uninstall OneDrive
Echo.
Set /p input=:^>

If Not %input%==1 (Goto :_A) Else (Goto :_Enable)

:_A
If Not %input%==2  (Goto :_B) Else (Goto :_Disable)

:_B
If Not %input%==3  (Goto :_C) Else (Goto :_Remove)

:_C
If Not %input%==4  (Goto :_D) Else (Goto :_RegRestore)

:_D
If Not %input%==5  (Goto :_E) Else (Goto :_EnableRun)

:_E
If Not %input%==6  (Goto :_F) Else (Goto :_DisableRun)

:_F
If Not %input%==7  (:_CHOICE) Else (Goto :_Uninstall)




:_Disable

Reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows\OneDrive" /v "DisableFileSyncNGSC" /t REG_DWORD /d "1" /f


Goto :Restart



:_Enable

Reg.exe delete "HKLM\SOFTWARE\Policies\Microsoft\Windows\OneDrive" /v "DisableFileSyncNGSC" /f

Goto :Restart


:_Remove

Reg.exe add "HKCU\Software\Classes\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /v "System.IsPinnedToNameSpaceTree" /t REG_DWORD /d "0" /f
Reg.exe delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /f

Goto :Restart


Cls & Mode CON  LINES=11 COLS=60 & Color 0E & Title Created By FreeBooter
Echo.
Echo.
Echo.
Echo.
Echo            Removing OneDrive from Navigation Pane 
Echo.
Echo.
Echo.
Ping -n 6 localhost >Nul
Goto :Restart


:_RegRestore

Reg.exe add "HKCU\Software\Classes\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /v "System.IsPinnedToNameSpaceTree" /t REG_DWORD /d "1" /f
Reg.exe add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /ve /t REG_SZ /d "OneDrive - Personal" /f



Cls & Mode CON  LINES=11 COLS=60 & Color 0E & Title Created By FreeBooter
Echo.
Echo.
Echo.
Echo.
Echo            Adding OneDrive from Navigation Pane 
Echo.
Echo.
Echo.
Ping -n 6 localhost >Nul
Goto :Restart



:_EnableRun

Reg.exe add "HKCU\Software\Microsoft\Windows\CurrentVersion\Run" /v "OneDrive" /t REG_SZ /d "\"C:\Program Files\Microsoft OneDrive\OneDrive.exe\" /background" /f

Goto :Restart


:_DisableRun

Reg.exe delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Run" /v "OneDrive" /f

Goto :Restart

:_Uninstall

IF DEFINED ProgramFiles(x86) (%SystemRoot%\SysWOW64\OneDriveSetup.exe /uninstall) Else (%SystemRoot%\System32\OneDriveSetup.exe /uninstall)

Exit



:Restart
Cls
echo.
echo.
echo You will need to restart the PC.
echo.
CHOICE /C:YN /M "Do you want to restart the PC now?"
IF ERRORLEVEL 2 goto :_CHOICE
IF ERRORLEVEL 1 goto yes

:yes
shutdown /r /f /t 00
 

My Computer

System One

  • OS
    Windows 11
    Computer type
    PC/Desktop
    Manufacturer/Model
    HP Pavilion
    CPU
    AMD Ryzen 7 5700G
    Motherboard
    Erica6
    Memory
    Micron Technology DDR4-3200 16GB
    Graphics Card(s)
    NVIDIA GeForce RTX 3060
    Sound Card
    Realtek ALC671
    Monitor(s) Displays
    Samsung SyncMaster U28E590
    Screen Resolution
    3840 x 2160
    Hard Drives
    SAMSUNG MZVLQ1T0HALB-000H1
1 - Enable OneDrive Integration

2 - Disable OneDrive Integration

3 - Remove OneDrive from Navigation Pane

4 - Add OneDrive to Navigation Pane

5 - Turn On OneDrive Run at Startup

6 - Turn Off OneDrive Run at Startup

7 - Uninstall OneDrive

Code:
(Net session >nul 2>&1)||(PowerShell start """%~0""" -verb RunAs & Exit /B)



:_CHOICE

Cls & Mode CON  LINES=20 COLS=50 & Color 0E & Title Created By FreeBooter
Echo.
Echo.
Echo.
Echo        1 - Enable OneDrive Integration
Echo.      
Echo        2 - Disable OneDrive Integration
Echo.
Echo        3 - Remove OneDrive from Navigation Pane  
Echo.      
Echo        4 - Add OneDrive to Navigation Pane
Echo.
Echo        5 - Turn On OneDrive Run at Startup  
Echo.      
Echo        6 - Turn Off OneDrive Run at Startup
Echo.
Echo        7 - Uninstall OneDrive
Echo.
Set /p input=:^>

If Not %input%==1 (Goto :_A) Else (Goto :_Enable)

:_A
If Not %input%==2  (Goto :_B) Else (Goto :_Disable)

:_B
If Not %input%==3  (Goto :_C) Else (Goto :_Remove)

:_C
If Not %input%==4  (Goto :_D) Else (Goto :_RegRestore)

:_D
If Not %input%==5  (Goto :_E) Else (Goto :_EnableRun)

:_E
If Not %input%==6  (Goto :_F) Else (Goto :_DisableRun)

:_F
If Not %input%==7  (:_CHOICE) Else (Goto :_Uninstall)




:_Disable

Reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows\OneDrive" /v "DisableFileSyncNGSC" /t REG_DWORD /d "1" /f


Goto :Restart



:_Enable

Reg.exe delete "HKLM\SOFTWARE\Policies\Microsoft\Windows\OneDrive" /v "DisableFileSyncNGSC" /f

Goto :Restart


:_Remove

Reg.exe add "HKCU\Software\Classes\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /v "System.IsPinnedToNameSpaceTree" /t REG_DWORD /d "0" /f
Reg.exe delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /f

Goto :Restart


Cls & Mode CON  LINES=11 COLS=60 & Color 0E & Title Created By FreeBooter
Echo.
Echo.
Echo.
Echo.
Echo            Removing OneDrive from Navigation Pane
Echo.
Echo.
Echo.
Ping -n 6 localhost >Nul
Goto :Restart


:_RegRestore

Reg.exe add "HKCU\Software\Classes\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /v "System.IsPinnedToNameSpaceTree" /t REG_DWORD /d "1" /f
Reg.exe add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /ve /t REG_SZ /d "OneDrive - Personal" /f



Cls & Mode CON  LINES=11 COLS=60 & Color 0E & Title Created By FreeBooter
Echo.
Echo.
Echo.
Echo.
Echo            Adding OneDrive from Navigation Pane
Echo.
Echo.
Echo.
Ping -n 6 localhost >Nul
Goto :Restart



:_EnableRun

Reg.exe add "HKCU\Software\Microsoft\Windows\CurrentVersion\Run" /v "OneDrive" /t REG_SZ /d "\"C:\Program Files\Microsoft OneDrive\OneDrive.exe\" /background" /f

Goto :Restart


:_DisableRun

Reg.exe delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Run" /v "OneDrive" /f

Goto :Restart

:_Uninstall

IF DEFINED ProgramFiles(x86) (%SystemRoot%\SysWOW64\OneDriveSetup.exe /uninstall) Else (%SystemRoot%\System32\OneDriveSetup.exe /uninstall)

Exit



:Restart
Cls
echo.
echo.
echo You will need to restart the PC.
echo.
CHOICE /C:YN /M "Do you want to restart the PC now?"
IF ERRORLEVEL 2 goto :_CHOICE
IF ERRORLEVEL 1 goto yes

:yes
shutdown /r /f /t 00
This is IMHO a collection of scripts to deal with the various manifestations of OneDrive, not unlike the collection of tutorials that Brink has. It is not the single script that eliminates OneDrive as if it never existed on a new computer.
 

My Computer

System One

  • OS
    Windows 10 Pro

My Computers

System One System Two

  • OS
    Windows 11 Pro
    Computer type
    Laptop
    Manufacturer/Model
    Dell XPS 15 9510 OLED
    CPU
    11th Gen i9 -11900H
    Memory
    32 GB 3200 MHz DDR4
    Graphics Card(s)
    NVIDIA® GeForce® RTX 3050Ti
    Monitor(s) Displays
    15.6" OLED Infinity Edge Touch
    Screen Resolution
    16:10 Aspect Ratio (3456 x 2160)
    Hard Drives
    1 Terabyte M.2 PCIe NVMe SSD
    2 Thunderbolt™ 4 (USB Type-C™)
    1 USB 3.2 Gen 2 (USB Type-C™)
    SD Card Reader (SD, SDHC, SDXC)
    Internet Speed
    900 Mbps Netgear Orbi + 2 Satellites
    Browser
    Microsoft Edge (Chromium) + Bing
    Antivirus
    Microsoft Windows Security (Defender)
    Other Info
    Microsoft 365 subscription
    Microsoft OneDrive 1TB Cloud
    Microsoft Outlook
    Microsoft OneNote
    Microsoft PowerToys
    Microsoft Visual Studio
    Microsoft Visual Studio Code
    Macrium Reflect
    Dell Support Assist
    Dell Command | Update
    LastPass Password Manager
    Amazon Kindle
    Interactive Brokers Trader Workstation
    Lightroom/Photoshop subscription
  • Operating System
    Windows 11 Pro
    Computer type
    Tablet
    Manufacturer/Model
    Microsoft Surface Pro 7
    CPU
    i5
    Memory
    8 GB
    Hard Drives
    256GB SSD
    Internet Speed
    900 Mbps Netgear Orbi + 2 Satellites
    Browser
    Microsoft Edge (Chromium) + Bing
    Antivirus
    Microsoft Windows Security (Defender)
    Other Info
    Microsoft 365 subscription (Office)
    Microsoft OneDrive 1TB Cloud
    Microsoft Outlook
    Microsoft OneNote
    Microsoft Visual Studio
    Amazon Kindle
    Interactive Brokers Trader Workstation
    Lightroom/Photoshop subscription
This is IMHO a collection of scripts to deal with the various manifestations of OneDrive, not unlike the collection of tutorials that Brink has. It is not the single script that eliminates OneDrive as if it never existed on a new computer.
I think you did not understand when i said maybe this script OP looking for, i never said this is the script.
 

My Computer

System One

  • OS
    Windows 11
    Computer type
    PC/Desktop
    Manufacturer/Model
    HP Pavilion
    CPU
    AMD Ryzen 7 5700G
    Motherboard
    Erica6
    Memory
    Micron Technology DDR4-3200 16GB
    Graphics Card(s)
    NVIDIA GeForce RTX 3060
    Sound Card
    Realtek ALC671
    Monitor(s) Displays
    Samsung SyncMaster U28E590
    Screen Resolution
    3840 x 2160
    Hard Drives
    SAMSUNG MZVLQ1T0HALB-000H1
I think you did not understand when i said maybe this script OP looking for, i never said this is the script.
In your previous post #30, you responded to me, not to the OP.

1694991448657.png
 

My Computer

System One

  • OS
    Windows 10 Pro

My Computer

System One

  • OS
    Windows 11
    Computer type
    PC/Desktop
    Manufacturer/Model
    HP Pavilion
    CPU
    AMD Ryzen 7 5700G
    Motherboard
    Erica6
    Memory
    Micron Technology DDR4-3200 16GB
    Graphics Card(s)
    NVIDIA GeForce RTX 3060
    Sound Card
    Realtek ALC671
    Monitor(s) Displays
    Samsung SyncMaster U28E590
    Screen Resolution
    3840 x 2160
    Hard Drives
    SAMSUNG MZVLQ1T0HALB-000H1
Luckily, you can set up a local account using step 21 below during Windows Setup.

WOW -- that's incredible! Awesome tip, thank you!
 

My Computer

System One

  • OS
    Windows 11

Latest Support Threads

Back
Top Bottom