在Windows中的“运行”对话框中调整历史记录

00_mru_list_on_run_dialog

Do you use the Run dialog box often in Windows? If so, we offer some helpful tips for tweaking the dialog’s history, or the most recently used (MRU) list.

您是否经常在Windows中使用“运行”对话框? 如果是这样,我们将提供一些有用的技巧来调整对话框的历史记录或最近使用的(MRU)列表。

This article shows you how to delete single items, delete the entire history, disable the history, and even disable the Run dialog box, if you don’t want it to be available.

本文向您展示了如何删除单个项目,删除整个历史记录,禁用历史记录,甚至禁用“运行”对话框(如果您不希望它可用)。

NOTE: Disabling the Run command does not prevent users from running programs. There are other ways to find and run executable files.

注意:禁用运行命令不会阻止用户运行程序。 还有其他查找和运行可执行文件的方法。

The Run dialog box can be easily accessed by pressing Win + R. However, if you use the Start menu often, there is an easy way to enable the Run command on the Windows 7 or Vista Start menu, as it is not available there by default.

可以通过按Win + R轻松访问“运行”对话框。但是,如果经常使用“开始”菜单,则有一种简便的方法可以在Windows 7或Vista“开始”菜单上启用“运行”命令,因为该命令在此处不可用。默认。

从“运行”对话框的MRU列表中删除单个项目 (Delete a Single Item from the Run Dialog Box MRU List)

Removing single, selected items from the MRU list on the Run dialog box, required modifying the registry.

从“运行”对话框的“ MRU”列表中删除单个选定项,需要修改注册表。

NOTE: Before making any changes to the registry, be sure you back it up. We also recommend creating a restore point you can use to restore your system if something goes wrong.

注意:在对注册表进行任何更改之前,请确保将其备份 。 我们还建议您创建一个还原点,以便出现问题时用于还原系统

To open the registry editor, open the Run dialog box and enter “regedit.exe” in the Open edit box. Press Enter or click OK. You can also search for “regedit.exe” using the Start menu Search box.

要打开注册表编辑器,请打开“运行”对话框,然后在“打开”编辑框中输入“ regedit.exe”。 按Enter或单击确定。 您也可以使用“开始”菜单“搜索”框搜索“ regedit.exe”。

06_starting_regedit

If the User Account Control dialog box displays, click Yes to continue.

如果显示“用户帐户控制”对话框,请单击“是”继续。

NOTE: You may not see this dialog box, depending on your User Account Control settings.

注意:根据您的“ 用户帐户控制”设置 ,您可能看不到此对话框。

07_uac_dialog_regedit

Navigate to the following key in the tree on the left side of the Registry Editor window.

导航到“注册表编辑器”窗口左侧树中的以下项。

HKEY_CURRENT_USER/Software/Microsoft/Windows/CurrentVersion/Explorer/RunMRU

HKEY_CURRENT_USER /软件/ Microsoft / Windows / CurrentVersion / Explorer / RunMRU

Select the RunMRU key. Values display on the right side of the dialog box. Each item has a letter name. Note the letter that corresponds to the item you want to delete from the list and remember it. To delete an item, right-click on the name for that item and select Delete.

选择RunMRU项。 值显示在对话框的右侧。 每个项目都有一个字母名称。 请注意与您要从列表中删除的项目相对应的字母,并记住它。 要删除项目,请右键单击该项目的名称,然后选择“删除”。

08_selecting_delete_for_key

A warning dialog box displays to be sure you want to delete the value. It is alright to delete these values. However, be careful when deleting values and keys in the registry. Click Yes to continue.

显示一个警告对话框,以确保您要删除该值。 可以删除这些值。 但是,删除注册表中的值和键时要小心。 单击是继续。

09_delete_confirmation

Now, you must remove the letter for the item you deleted from the MRU list. Double-click the MRUList value.

现在,您必须从MRU列表中删除所删除项目的字母。 双击MRUList值。

10_double_clicking_mrulist

Delete the letter that corresponded with the item you deleted from the string of letters in the Value data edit box. Click OK.

从“数值数据”编辑框中的字母字符串中删除与您删除的项目相对应的字母。 单击确定。

11_deleting_b

Select Exit from the File menu to close the Registry Editor.

从文件菜单中选择退出以关闭注册表编辑器。

12_closing_registry_editor

The item has been removed from the MRU list on the Run dialog box.

该项目已从“运行”对话框的“ MRU”列表中删除。

13_item_deleted

禁用“运行”对话框历史记录而不丢失当前条目 (Disable the Run Dialog Box History Without Losing Current Entries)

There are a couple of methods for disabling the Run dialog box history list. If you want to preserve the list, in case you want to enable the history again later, use the registry method described in this section. Later in this article, we show you an easier method for disabling the history list. However, the list of commands in the history will be lost.

有两种方法可以禁用“运行”对话框历史记录列表。 如果要保留列表,以防将来要再次启用历史记录,请使用本节中介绍的注册表方法。 在本文的后面,我们将向您展示一种禁用历史记录列表的简便方法。 但是,历史记录中的命令列表将丢失。

To disable the Run dialog box history using the registry, open the Registry Editor as described earlier in this article. Navigate, again, to the following key.

若要使用注册表禁用“运行”对话框的历史记录,请按照本文前面所述打开注册表编辑器。 再次导航到以下键。

HKEY_CURRENT_USER/Software/Microsoft/Windows/CurrentVersion/Explorer/RunMRU

HKEY_CURRENT_USER /软件/ Microsoft / Windows / CurrentVersion / Explorer / RunMRU

Right-click on the RunMRU key and select Permissions from the popup menu.

右键单击RunMRU键,然后从弹出菜单中选择“权限”。

14_selecting_permissions

On the Permissions dialog box, click Add under the Group or user names box.

在“权限”对话框中,在“组或用户名”框下单击“添加”。

15_clicking_add_for_permissions

Enter “Everyone” in the Enter the object names to select edit box and click OK.

在输入对象名称以选择编辑框中输入“所有人”,然后单击“确定”。

16_entering_everyone

You are returned to the Permissions dialog box. Make sure “Everyone” is selected in the list of Group or user names and select the check box in the Deny column for the Read row in the Permissions for Everyone box. Click OK.

您将返回到“权限”对话框。 确保在“组”或用户名列表中选择了“每个人”,并选中“每个人的权限”框中的“读取”行的“拒绝”列中的复选框。 单击确定。

17_clicking_deny_access

A warning dialog box displays about Deny entries. Click Yes to accept your change and continue.

显示有关拒绝条目的警告对话框。 单击“是”接受更改并继续。

18_deny_permissions_warning

Notice that all the values including the MRUList value are gone from the list on the right side of the Registry Editor window. They are not actually gone, but hidden.

请注意,所有值(包括MRUList值)都从“注册表编辑器”窗口右侧的列表中删除。 它们实际上并没有消失,而是隐藏了。

19_permissions_applied

Close the Registry Editor and open the Run dialog box. Notice that the Open drop-down list that usually contains the history of commands entered is now empty. When you enter commands, they will not be kept in the history list. The list will remain empty.

关闭注册表编辑器,然后打开“运行”对话框。 请注意,通常包含输入命令历史记录的“打开”下拉列表现在为空。 输入命令时,它们将不会保留在历史记录列表中。 该列表将保持空白。

20_empty_history_list

If you want to restore the history list on the Run dialog box, open the Registry Editor again and navigate to the same key mentioned earlier. Right-click on the RunMRU key, select Permissions, and remove “Everyone” from the Group or user names list on the Permissions dialog box. Close the dialog box.

如果要在“运行”对话框中还原历史记录列表,请再次打开“注册表编辑器”,并导航到前面提到的相同项。 右键单击RunMRU键,选择“权限”,然后从“权限”对话框的“组或用户名”列表中删除“所有人”。 关闭对话框。

21_removing_everyone_group

Notice that the previous history list is restored on the Run dialog box.

请注意,先前的历史记录列表已在“运行”对话框中还原。

22_history_displaying_again

删除和禁用整个运行对话框历史记录 (Delete and Disable the Entire Run Dialog Box History)

Now, we will show you the easier way of deleting and disabling the Run dialog box history. Note that using this method permanently removes your existing list of previously entered commands. You can re-enable the list, but it will be empty until you enter new commands.

现在,我们将向您展示删除和禁用“运行”对话框历史记录的更简便方法。 请注意,使用此方法将永久删除您先前输入的命令的现有列表。 您可以重新启用该列表,但是在输入新命令之前,该列表将为空。

To delete the entire history on the Run dialog box, right-click on the Start orb and select Properties from the popup menu.

要在“运行”对话框中删除整个历史记录,请右键单击“开始”球,然后从弹出菜单中选择“属性”。

23_clicking_properties_for_start_menu

On the Taskbar and Start Menu Properties dialog box, select the Store and display recently opened programs in the Start menu check box so there is NO check mark in the box. Click OK.

在任务栏和“开始菜单属性”对话框上,选择“存储并在“开始”菜单中显示最近打开的程序”复选框,以便该框中没有复选标记。 单击确定。

24_clearing_list_on_start_menu_and_run_dialog

完全禁用运行对话框 (Disable the Run Dialog Box Completely)

You can easily remove the Run command from the Start menu by just unchecking the check box that enables the Run command. However, if you want to disable the Run dialog box completely, you can do so by making a change to the registry.

您只需取消选中启用“运行”命令的复选框,即可轻松地从“开始”菜单中删除“运行”命令 。 但是,如果要完全禁用“运行”对话框,则可以通过更改注册表来实现。

NOTE: Again, we recommend that before you make changes to the registry, be sure to back it up. We also recommend creating a restore point you can use to restore your system if something goes wrong.

注意:同样,我们建议您对注册表进行更改之前,请确保对其进行备份 。 我们还建议您创建一个还原点,以便出现问题时用于还原系统

This procedure not only removes the Run command from the Start menu, but also removes the New Task option from the Task Manager. This prevents you from restarting the explorer.exe process without restarting your computer. So, think about it seriously before deciding to disable the Run dialog box completely.

此过程不仅从“开始”菜单中删除“运行”命令,而且从“任务管理器”中删除“新任务”选项。 这样可以防止您在不重新启动计算机的情况下重新启动explorer.exe进程 。 因此,在决定完全禁用“运行”对话框之前,请认真考虑一下。

24a_new_task_option_in_task_manager

Open the Registry Editor by entering “regedit.exe” in the Search box on the Start menu. Click Yes on the User Account Control dialog box, if it displays.

通过在“开始”菜单上的“搜索”框中输入“ regedit.exe”来打开注册表编辑器。 如果显示,则在“用户帐户控制”对话框上单击“是”。

Navigate to the following key and select the Explorer key.

导航到以下键,然后选择资源管理器键。

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer

HKEY_CURRENT_USER \ Software \ Microsoft \ Windows \ CurrentVersion \ Policies \ Explorer

Right-click in an empty area in the right pane of the Registry Editor window and select New | DWORD (32-bit) Value from the popup menu.

右键单击“注册表编辑器”窗口右窗格中的空白区域,然后选择“新建” |“新建”。 DWORD(32位)弹出菜单中的值。

25_creating_new_dword

The text on the new value is selected.

选择新值上的文本。

26_new_value_highlighted

Type “NoRun” as the name for the new value and press Enter to accept it. Double-click on the new value.

输入“ NoRun”作为新值的名称,然后按Enter接受它。 双击新值。

27_double_clicking_norun

Enter “1” in the Value data edit box and click OK.

在“数值数据”编辑框中输入“ 1”,然后单击“确定”。

28_entering_1_as_value

The new value displays in the Data column.

新值将显示在“数据”列中。

29_new_value

Close the Registry Editor and restart your computer.

关闭注册表编辑器,然后重新启动计算机。

NOTE: Because disabling the Run dialog box also disables the New Task option in the Task Manager, you cannot just end the explorer.exe task and restart it. You must restart your computer.

注意:因为禁用“运行”对话框还会禁用“任务管理器”中的“新建任务”选项,所以您不能仅结束explorer.exe任务并重新启动它。 您必须重新启动计算机。

When you log back into your account, and press Win + R to try to access the Run dialog box, the following dialog box displays.

当您重新登录帐户并按Win + R尝试访问“运行”对话框时,将显示以下对话框。

30_restriction_on_win_r_key_combo

You can re-enable the Run dialog box by going back into the Registry Editor and deleting the NoRun key you created. However, we found that once we disabled the Run dialog box, we could not search for “regedit.exe” in the Start menu Search box to find and run the Registry Editor. It was not found.

您可以重新启用“运行”对话框,方法是回到“注册表编辑器”并删除您创建的NoRun项。 但是,我们发现,一旦禁用了“运行”对话框,就无法在“开始”菜单的“搜索”框中搜索“ regedit.exe”以查找并运行注册表编辑器。 找不到。

However, there is another way to easily find “regedit.exe.” Open Windows Explorer, select the C:\Windows directory, and enter “regedit.exe” in the Search box. Double-click on the “regedit.exe” file found in the C:\Windows directory to start the Registry Editor.

但是,还有另一种方法可以轻松找到“ regedit.exe”。 打开Windows资源管理器,选择C:\ Windows目录,然后在搜索框中输入“ regedit.exe”。 双击在C:\ Windows目录中找到的“ regedit.exe”文件以启动注册表编辑器。

31_search_for_regedit

Navigate to the following key again, selecting the Explorer key.

再次导航至以下键,选择“资源管理器”键。

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer

HKEY_CURRENT_USER \ Software \ Microsoft \ Windows \ CurrentVersion \ Policies \ Explorer

Right-click on the NoRun value and select Delete.

右键单击NoRun值,然后选择删除。

32_deleting_norun_value

Again, a warning dialog box displays to be sure you want to delete the value. Click Yes to continue.

再次显示警告对话框,以确保您要删除该值。 单击是继续。

33_confirm_value_delete_warning

You can also disable the Run dialog box using the Local Group Policy Editor.

您也可以使用本地组策略编辑器禁用“运行”对话框。

NOTE: The Local Group Policy Editor is not available in the Home and Starter editions of Windows 7.

注意:本地组策略编辑器在Windows 7的Home和Starter版本中不可用。

To start the Local Group Policy Editor, open the Start menu, enter “gpedit.msc” into the Search box, and press Enter or click on the link.

要启动本地组策略编辑器,请打开“开始”菜单,在“搜索”框中输入“ gpedit.msc”,然后按Enter或单击链接。

34_opening_gpedit

Navigate to the following item on the left side of the Local Group Policy Editor window. Scroll down in the list of settings on the right side to the Remove Run menu from Start Menu setting and double-click on it.

导航到“本地组策略编辑器”窗口左侧的以下项目。 在右侧的设置列表中向下滚动到“从开始菜单”设置中的“删除运行”菜单,然后双击它。

User Configuration\AdministrativeTemplates\Start Menu & Taskbar

用户配置\管理模板\开始菜单和任务栏

35_double_clicking_remove_run

On the dialog box that displays, select Enabled to turn on the option.

在显示的对话框中,选择“启用”以打开该选项。

36_enabling_remove_run_setting

Click OK to accept your change and close the dialog box.

单击“确定”接受更改,然后关闭对话框。

37_closing_remove_run_dialog

The State column reads Enabled once you turn on the option.

启用该选项后,“状态”列将显示为“已启用”。

38_remove_run_option_enabled

Select Exit from the File menu to close the Local Group Policy Editor.

从文件菜单中选择退出以关闭本地组策略编辑器。

39_closing_gpedit

To disable the setting again and enable the Run dialog box, go back into the Local Group Policy Editor and select Disabled or Not Configured.

要再次禁用设置并启用“运行”对话框,请返回“本地组策略编辑器”,然后选择“禁用”或“未配置”。

We found that disabling the Run dialog box not only prevented us from opening the Registry Editor from the Start menu Search box, but we also couldn’t open the Local Group Policy Editor that way. To open the Local Group Policy Editor after you have disabled the Run dialog box, open Windows Explorer, select the C:\Windows\System32 directory, and enter “gpedit.msc” in the Search box. Double-click on the “gpedit.msc” file found in the C:\Windows\System32 directory to start the Local Group Policy Editor.

我们发现禁用“运行”对话框不仅会阻止我们从“开始”菜单的“搜索”框中打开注册表编辑器,而且还无法以这种方式打开“本地组策略编辑器”。 要在禁用“运行”对话框后打开本地组策略编辑器,请打开Windows资源管理器,选择C:\ Windows \ System32目录,然后在“搜索”框中输入“ gpedit.msc”。 双击C:\ Windows \ System32目录中的“ gpedit.msc”文件以启动本地组策略编辑器。

翻译自: https://www.howtogeek.com/96763/tweak-the-history-in-the-run-dialog-box-in-windows/