如何让 QPCore 服务开机不启动,需要时才启动

2025-10-22 02:50:42

1、打开记事本,将下面的代码粘贴到记事本中并保存为 QPCore.bat,注意区分32位和64位操作系统。

64位操作系统使用的代码:

@echo off

:main

cls

@echo QPCore 服务控制器

@echo --------------------

  set /a v1=0

  for /f "skip=3 tokens=4" %%i in ('sc query "QPCore"') do if /i "%%i"=="RUNNING" set /a v1=1

  set /a svssum=v1

  if /i "%svssum%"=="0" goto p1

    @echo QPCore 服务正在运行

    set /a cnum=2

    set /p cnum=请选择[1-停止服务  2-退出(缺省)]:

    set /a cnum=%cnum%+1

    goto p_%cnum%

  :p1

    @echo QPCore 服务已经停止

    set /a cnum=2

    set /p cnum=请选择[1-运行服务  2-退出(缺省)]:

    set /a cnum=%cnum%+1

    if /i "%cnum%"=="2" set /a cnum=1

    goto p_%cnum%

  :p_1

    set /a v1=0

    for /f "skip=3 tokens=4" %%i in ('sc query "QPCore"') do if /i "%%i"=="RUNNING" set /a v1=1

    if /i "%v1%"=="0" (

      ren "C:\Windows\System32\drivers\QQProtectX64.sys.bak" "QQProtectX64.sys"

      ren "C:\Program Files (x86)\Common Files\Tencent\QQProtect1" "QQProtect"

      sc config QPCore start= auto

      sc start "QPCore"

    )

    pause

    goto main

  :p_2

    for /f "skip=3 tokens=4" %%i in ('sc query "QPCore"') do if /i "%%i"=="RUNNING" (

      taskkill /f /im QQProtect.exe

      sc config QPCore start= demand

      ren "C:\Windows\System32\drivers\QQProtectX64.sys" "QQProtectX64.sys.bak"

      ren "C:\Program Files (x86)\Common Files\Tencent\QQProtect" "QQProtect1" 

    )

    pause

    goto main

  :p_3

    exit

32位操作系统使用的代码:

@echo off

:main

cls

@echo QPCore 服务控制器

@echo --------------------

  set /a v1=0

  for /f "skip=3 tokens=4" %%i in ('sc query "QPCore"') do if /i "%%i"=="RUNNING" set /a v1=1

  set /a svssum=v1

  if /i "%svssum%"=="0" goto p1

    @echo QPCore 服务正在运行

    set /a cnum=2

    set /p cnum=请选择[1-停止服务  2-退出(缺省)]:

    set /a cnum=%cnum%+1

    goto p_%cnum%

  :p1

    @echo QPCore 服务已经停止

    set /a cnum=2

    set /p cnum=请选择[1-运行服务  2-退出(缺省)]:

    set /a cnum=%cnum%+1

    if /i "%cnum%"=="2" set /a cnum=1

    goto p_%cnum%

  :p_1

    set /a v1=0

    for /f "skip=3 tokens=4" %%i in ('sc query "QPCore"') do if /i "%%i"=="RUNNING" set /a v1=1

    if /i "%v1%"=="0" (

      ren "C:\Windows\System32\drivers\QQProtect.sys.bak" "QQProtect.sys"

      ren "C:\Program Files\Common Files\Tencent\QQProtect1" "QQProtect"

      sc config QPCore start= auto

      sc start "QPCore"

    )

    pause

    goto main

  :p_2

    for /f "skip=3 tokens=4" %%i in ('sc query "QPCore"') do if /i "%%i"=="RUNNING" (

      taskkill /f /im QQProtect.exe

      sc config QPCore start= demand

      ren "C:\Windows\System32\drivers\QQProtect.sys" "QQProtect.sys.bak"

      ren "C:\Program Files\Common Files\Tencent\QQProtect" "QQProtect1" 

    )

    pause

    goto main

  :p_3

    exit

2、运行刚才保存的 QPCore.bat 批处理文件(windows 10 系统请右键点击文件选择以管理员身份运行),可以看到以下界面:

如何让 QPCore 服务开机不启动,需要时才启动

3、输入 1 然后确定,则会看到以下界面:

如何让 QPCore 服务开机不启动,需要时才启动

4、这样 QPCore 服务就被停止了,而且启动方式也被设置为手动。重新启动计算机后,发现 QPCore 服务并没有自动运行。但这时 QQ 就无法打开了,打开后显示以下界面:

如何让 QPCore 服务开机不启动,需要时才启动

5、因为 QQ 程序依赖 QPCore 服务,所以 QPCore 服务没有运行的情况下也不能使用 QQ 了,如果要使用 QQ,还是需要启动 QPCore 服务的。由于 QPCore 被停止了,而且它(QQProtect.exe)所在的文件夹也被改了名,所以 QPCore 服务用管理工具里的服务控制台是无法启动的。那么还是需要用刚才的批处理文件来启动它。运行 QPCore.bat,可以看到以下界面:

如何让 QPCore 服务开机不启动,需要时才启动

6、输入 1 然后确定,则会看到以下界面:

如何让 QPCore 服务开机不启动,需要时才启动

7、这样 QPCore 又和原来一样启动了,并且可以随系统启动而自动启动,而且 QQ 也可以打开了。

8、另外如果你在使用批处理文件时发现提示拒绝访问,说明 QPCore 服务的启动状态没能改成手动,但这并不影响重启后不会启动 QPCore 服务,重新运行服务并启动 QQ,然后关闭QQ再用批处理停止服务就不会提示拒绝访问了。

如何让 QPCore 服务开机不启动,需要时才启动

声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
猜你喜欢