使用 vbscript 更改控制台标题 [英] Change Console Title with vbscript

查看:20
本文介绍了使用 vbscript 更改控制台标题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法更改 cmd 标题?我写了一个vbs程序.但是dos标题不好.

is there a way to change the cmd title? I wrote a vbs program. But the dos title is bad.

名称是 c:\windows\system32\cscript.exe我试试:

The name ist c:\windows\system32\cscript.exe I try it with:

标题 the_name 和标题="姓名"

title the_name and title ="name"

但两者都不起作用.

感谢您的帮助.

推荐答案

不幸的是你 不能在脚本中使用任何 WSH 对象执行此操作.

唯一的方法是通过中介(使用 TITLE 命令的 .bat 或使用 %comspec% 参数的另一个脚本)启动脚本.

The only way to do it is to launch the script via an intermediary (a .bat using the TITLE command or another script using a %comspec% argument).

这篇关于使用 vbscript 更改控制台标题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆