首页 > 编程 > VBScript > 正文

显示运行对话框内保存的命令历史的vbs

2020-07-26 11:55:21
字体:
来源:转载
供稿:网友
复制代码 代码如下:

Const HKEY_CURRENT_USER = &H80000001

strComputer = "."

Set objRegistry = GetObject("winmgmts://" & strComputer & "/root/default:StdRegProv")

strKeyPath = "Software/Microsoft/Windows/CurrentVersion/Explorer/RunMRU"
objRegistry.EnumValues HKEY_CURRENT_USER, strKeyPath, arrValueNames, arrValueTypes

For Each strValue in arrValueNames
If Len(strValue) = 1 Then
objRegistry.GetStringValue HKEY_CURRENT_USER,strKeyPath,strValue,strRunCommand
intLength = Len(strRunCommand)
strRunCommand = Left(strRunCommand, intLength - 2)
Wscript.Echo strRunCommand
End If
Next

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表