Hacker News new | ask | show | jobs
by jim_lawless 246 days ago
I asked ChatGPT to write a Windows GUI C program that looks for a running instance of the onedrive EXE at regular intervals and terminates it while keeping a running log of the attempts in a scrolling window. It took a few iterations to get what I wanted and it was simple to compile with GCC.

You can use a Powershell to see if onedrive.exe is running and kill it with the -force option to do something similar ( ps * onedrive * | kill -force ) with no spaces between the asterisks and the word onedrive, but that turned out to be a little heavier to have running continuously than I wanted.

If you use a process like this, you absolutely need to run it at intervals because the onedrive exe seems to execute at regular intervals.

3 comments

Hopefully everyone uses an Enterprise SKU of Windows so you can just control it with Group Policy.

On Enterprise, you can use its built-in App Locker features to block the execution of any Windows component. I've used it to block Windows Update completely at home after it filled my drive to the last byte and I was sick of my gaming box disobeying.

This will wreck havoc on your battery life, consider instead replacing onedrive.exe with a dummy executable and then using NTFS ACLs to deny "TrustedInstaller" permission to modify it
Why not just uninstall it via powershell scripts like those available from privacy.sexy?

I gutted OneDrive so hard it will likely never come back.

it'll come back in the next windows update