You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何定位Windows开机自动触发的PowerShell脚本文件位置?

定位并禁用开机自动启动的NumLock PowerShell脚本

排查启动项的关键位置:

  • 用户/公共开机启动文件夹
    按下Win + R,输入shell:startup回车,打开当前用户的开机启动目录,查找是否有指向C:\Users\andre\Downloads\Programs\NumLockOn.ps1的快捷方式或批处理文件,找到后直接删除即可。
    还可以输入shell:common startup检查公共启动文件夹,按同样方式处理。

  • 任务计划程序
    按下Win + S搜索「任务计划程序」并打开,左侧导航栏展开「任务计划库」,逐个检查任务,找到执行命令包含目标脚本路径的任务,右键选择禁用或删除。

  • 注册表启动项
    按下Win + R输入regedit打开注册表编辑器,导航到以下路径,查找值数据包含目标脚本路径的条目,右键删除:

    • HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run
    • HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run
    • HKEY_LOCAL_MACHINE\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Run
  • PowerShell配置文件
    打开PowerShell,输入Get-Content $PROFILE查看当前用户的配置文件,若存在调用该脚本的命令,删除对应行并保存。不知道配置文件路径的话,输入$PROFILE即可查看,若文件不存在则无需处理。

报错信息:

& : The term 'C:\Users\andre\Downloads\Programs\NumLockOn.ps1' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:2

  • &'C:\Users\andre\Downloads\Programs\NumLockOn.ps1'

    • CategoryInfo : ObjectNotFound: (C:\Users\andre...s\NumLockOn.ps1:String) [],
      CommandNotFoundException
    • FullyQualifiedErrorId : CommandNotFoundException

内容的提问来源于stack exchange,提问作者ALKochListon

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.22 08:06:24