当前位置:主页 > 脚本语言 > VBS >

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

时间:2021-03-28 09:15:59 | 栏目:VBS | 点击:

复制代码 代码如下:

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

您可能感兴趣的文章:

相关文章