OneDrive 0x8004DEEF Solutions

OneDrive 0x8004DEEF

CMD 安全修复指南


① 关闭 OneDrive

中文说明

打开 CMD(命令提示字元),普通权限即可。

执行:

taskkill /f /im OneDrive.exe

如果显示找不到 OneDrive 进程,不用担心,继续下一步即可。

🇬🇧 English

Open Command Prompt (CMD). Normal user permission is sufficient.

Run:

taskkill /f /im OneDrive.exe

If Windows says that the OneDrive process could not be found, don’t worry. Continue to the next step.


② 重置 OneDrive

中文说明

在 CMD 执行:

%localappdata%\Microsoft\OneDrive\OneDrive.exe /reset

等待 2–3 分钟。不要马上重复执行。

然后启动 OneDrive:

start "" "%localappdata%\Microsoft\OneDrive\OneDrive.exe"

检查 OneDrive 是否重新出现,然后尝试登录。

🇬🇧 English

In CMD, run:

%localappdata%\Microsoft\OneDrive\OneDrive.exe /reset

Wait for 2–3 minutes. Do not run the command repeatedly.

Then start OneDrive:

start "" "%localappdata%\Microsoft\OneDrive\OneDrive.exe"

Check whether the OneDrive icon appears again and try signing in.


③ 如果仍然出现 0x8004DEEF

中文说明

如果 OneDrive 仍然无法登录,并显示:

Error Code: 0x8004DEEF

继续执行以下命令:

del /f /q "%localappdata%\Microsoft\OneDrive\settings\PreSignInSettingsConfig.json"

如果出现:

Could Not Find...

不用担心。

这表示该文件不存在,可以继续下一步。

然后执行:

%localappdata%\Microsoft\OneDrive\OneDrive.exe /reset

等待约 2 分钟

再执行:

start "" "%localappdata%\Microsoft\OneDrive\OneDrive.exe"

然后再次尝试登录。

🇬🇧 English

If OneDrive still cannot sign in and shows:

Error Code: 0x8004DEEF

Run:

del /f /q "%localappdata%\Microsoft\OneDrive\settings\PreSignInSettingsConfig.json"

If you see:

Could Not Find...

Don’t worry.

It simply means that the file does not exist. Continue to the next step.

Then run:

%localappdata%\Microsoft\OneDrive\OneDrive.exe /reset

Wait approximately 2 minutes.

Then run:

start "" "%localappdata%\Microsoft\OneDrive\OneDrive.exe"

Try signing in again.


④ 检查 Windows 登录凭证

中文说明

如果还是无法登录,可以检查 Windows 储存的登录凭证。

执行:

cmdkey /list

可能会看到类似:

Target: MicrosoftAccount:user=xxxx
Target: OneDrive Cached Credential
Target: MicrosoftOffice16_Data:...

暂时不要删除任何凭证。

cmdkey /list 的完整结果复制出来,我们可以先确认哪些项目与 OneDrive / Microsoft 365 有关。

🇬🇧 English

If OneDrive still cannot sign in, we can check the credentials stored in Windows.

Run:

cmdkey /list

You may see entries such as:

Target: MicrosoftAccount:user=xxxx

Target: OneDrive Cached Credential

Target: MicrosoftOffice16_Data:...

Do not delete any credentials yet.

Copy the complete result of cmdkey /list and check which entries are related to OneDrive / Microsoft 365 before removing anything.


⚠️ 重要 / Important

目前不要执行以下操作:

rd /s /q "%localappdata%\Microsoft\OneDrive"

也不要删除 OneDrive 文件夹:

C:\Users\你的用户名\OneDrive

不要直接移除:

Settings → Accounts → Access work or school

🇬🇧 English

Do NOT perform the following actions at this stage:

Do not run:

rd /s /q "%localappdata%\Microsoft\OneDrive"

Do not delete your OneDrive folder:

C:\Users\YourUsername\OneDrive

Do not remove the account from:

Settings → Accounts → Access work or school

This is especially important if the computer is connected to a company Microsoft 365 Business account, because OneDrive, Office, Teams and SharePoint may share the same authentication environment.


建议执行顺序 / Recommended Order

① Close OneDrive

② Reset OneDrive

③ Delete OneDrive sign-in cache and Reset

④ Check Windows Credentials


最重要 / Important

先执行 ① → ②。

如果已经可以登录,就不需要继续执行后面的步骤。

🇬🇧 English

Start with Step ① → Step ②.

If OneDrive works normally after these steps, there is no need to continue with the remaining steps.