返回值 intButton 指示用户所单击的按扭编号。若用户在 natSecondsToWait 秒之前不单击按扭,则 intButton 设置为 -1 。
值 说明
1 “确定”按扭
2 “取消”按扭
3 “终止”按扭
4 “重试”按扭
5 “忽略”按扭
6 “是”按扭
7 “否”按扭
示例
Set WshShell = Wscript.CreateObject("Wscript.Shell")
WshShell.Popup "Where do you want to go today?"
请参阅
Wscript.Echo 方法
Wscript.Echo
Echo 方法在窗口(Wscript.exe 中)或“命令提示符”窗口(Cscript.exe 中)显示参数。
参数用空格分隔。在 Cscript.exe 中,该方法在显示最后一个参数之后输出一对回车/换行(CR LF)。
语法
Wscript.Echo [anyArg...]
示例
Wscript.Echo
Wscript.Echo 1, 2, 3
Wscript.Echo "Windows Scripting Host is cool."
WshShell.RegDelete
RegDelete 从注册表中删除名为 strName 的键或值。
语法
WshShell.RegDelete strName
参数
strName
如果 strName 以反斜杠 () 结束,则该方法删除键而不是值。
strName 参数必须以下列之一的根键名开始:
短根键名 长根键名
HKCU HKEY_CURRENT_USER
HKLM HKEY_LOCAL_MACHINE
HKCR HKEY_CLASSES_ROOT
HKEY_USERS
HKEY_CURRENT_CONFIG
示例
Set WshShell = Wscript.CreateObject("Wscript.Shell")
WshShell.RegDelete "HKCUScriptEngineValue" ' Delete value "Value"
WshShell.RegDelete "HKCUScriptEngineKey" ' Delete key "Key"
请参阅
WshShell.RegRead 方法、WshShell.RegWrite 方法
WshShell.RegRead
RegRead 方法返回名为 strName 的注册表键或值。
语法
WshShell.RegRead(strName) = strValue
参数
strName
如果 strName 以反斜杠 () 结束,则该方法返回键,而不是值。
strName 参数必须以下列根键名开始。
Short Long
HKCU HKEY_CURRENT_USER
HKLM HKEY_LOCAL_MACHINE
HKCR HKEY_CLASSES_ROOT
HKEY_USERS
HKEY_CURRENT_CONFIG
注释
RegRead 方法仅支持 REG_SZ、REG_EXPAND_SZ、REG_DWORD、REG_BINARY 和 REG_MULTI_SZ 数据类型。若注册表有其他数据类型,RegRead 返回 DISP_E_TYPEMISMATCH。
示例
Set WshShell = Wscript.CreateObject("Wscript.Shell")
WshShell.RegRead("HKCUScriptEngineVal") ' Read from value "Val"
WshShell.RegRead("HKCUScriptEngineKey") ' Read from key "Key"







