Skip to content

修复自装小米电脑管家摄像头弹窗问题 #9

@MuskCheng

Description

@MuskCheng

前言

非小米笔记本自行安装小米电脑管家后因为摄像头驱动问题,每次启动的时候都会弹出“请确认摄像头状态”的弹窗,虽然不影响什么,但是很烦人。

于是就有了这个教程。本教程来自网络,经多方验证,可行。

操作方法

C:\Program Files\MI\XiaomiPCManager\版本号\PcControlCenter.dll
  • 拖入 dnSpy后依次打开如下路径
PcControlCenter.Services.UI.MainView.Instances/NotifyToastUIService/ShowCommonToast

  • 全选代码后点击右键——编辑方法(C#)

  • 修改为如下内容
// PcControlCenter.Services.UI.MainView.Instances.NotifyToastUIService
// Token: 0x06000EDC RID: 3804 RVA: 0x0000CF63 File Offset: 0x0000B163
public void ShowCommonToast(IToastModel model)
{
	this.LogDebug("NotifyToastUIService.ShowCommonToast");
	UIDispathHelper.TryEnqueue(delegate
	{
		if (this._toastWindow == null)
		{
			this._toastWindow = new NotifyToastWindow(typeof(NotifyToastPage), null);
		}
		if (model.Title == "请确认摄像头状态" || model.Title == "相机协同异常")
		{
			return;
		}
		this.ToastWindow.PreShowToastWindow();
		this._viewModel.ShowToast(model);
		this.ToastWindow.Activate();
	});
}
  • 如下为新增加内容**(小白要注意缩进关系,可以使用Tab键进行快速缩进操作)**
		if (model.Title == "请确认摄像头状态" || model.Title == "相机协同异常")
		{
			return;
		}
  • 之后依次点击编译——保存模块(此处需要更换保存路径,保存至桌面即可),之后关闭小米电脑管家,将此文件替换之后重启小米电脑管家即可完成修复工作。

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions