我使用多个使用不同用户凭据的资源管理器窗口,我想知道是否有一种方法可以为每个窗口设置一个静态标题,以便能够确定哪个窗口使用哪个用户凭据,例如窗口标题设置为“用户abc”-因为标题更改为当前打开的目录,这在多个窗口打开时有时会引起混淆
我正在寻找尽可能简单的解决方案,批处理,VBScript等,可以很容易地从命令行或脚本文件运行,不需要任何编译,转换或安装特定的软件,例如:
open explorer.exe title="custom title"
到目前为止,我还没有找到任何脚本可以处理-第三方应用程序是不可能的。
不知道这是不是可能的,试着找了几天什么都没有找到。
2条答案
按热度按时间ulmd4ohb1#
可以使用PowerShell更改文件资源管理器Windows的标题。
要获取所有资源管理器窗口的句柄,请使用此COM对象。
stackoverflow - Powershell script to list all open Explorer windows
要获取最上面的文件资源管理器窗口的句柄,可以使用
stackoverflow -将文件资源管理器当前工作目录传递给PowerShell脚本
要更改所选文件资源管理器的标题,请使用适当的句柄。
下面的示例中使用的句柄是最上面的资源管理器窗口。
Pete Hinchley: Changing Window Titles using PowerShell
x9ybnkn62#
根据here,它可以为iexplorer(internet explorer)执行此操作,因此通过盲目猜测,可能可以以相同的方式为explorer windows〉run〉regedit.exe HKEY_CURRENT_USER〉Software〉Microsoft〉Windows〉CurrentVersion〉Explorer执行此操作,并使用字符串作为值类型,窗口标题作为值名称
通过改变主题,可以实现相同或相似的目标,here解释的所有内容都可以通过批处理脚本完成。