Get the App
SLTechnology News&Howtos  ›  Development  › 

How to use vbs to display the command history saved in the run dialog box

Shulou Source: shulou.com Published: 2022-06-03 06:44:11 11月15日 Update

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!

Tags: History commands dialogs dialogs runs content articles learning help code easy to understand more organization knowledge editing industry information information channels channels research Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Tech Info Redmi Shulou Technology Docker Xiaomi