How to use vbs to display the command history saved in the run dialog box
This article mainly shows you "how to use vbs to display the command history saved in the run dialog box", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "how to use vbs to display the command history saved in the run dialog box".
The code is as follows:
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
The above is all the contents of the article "how to use vbs to display the command history saved in the run dialog box". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!