自动登录后如何锁定Windows PC

Windows 10's lock screen asking for a PIN.

On Windows, automatic sign-in is convenient because you can have your PC launch programs when it starts. You can even have your PC automatically boot at specific times. For improved security, you can have Windows 10 automatically lock itself and require a password after automatic sign-in.

在Windows上, 自动登录非常方便,因为您可以在启动 PC 时启动其启动程序 。 您甚至可以让PC在特定时间自动启动 。 为了提高安全性,您可以让Windows 10自动锁定自身,并在自动登录后要求输入密码。

运作方式 (How This Works)

With automatic lock at sign-in, your PC will automatically sign in and launch and startup programs when it boots—but it will lock itself and you’ll have to enter your password to use it. This isn’t as secure as avoiding automatic sign-in as your user account password will still be stored and automatically entered by the system, but it’s better than just having your PC automatically start and offer an unrestricted desktop.

启用登录时自动锁定功能后,您的PC会在启动时自动登录并启动和启动程序-但它会自行锁定,您必须输入密码才能使用它。 这不像避免自动登录那样安全,因为您的用户帐户密码仍将被系统存储并自动输入,但是比让PC自动启动并提供不受限制的台式机要好。

To do this, all you have to do is make Windows run the following command when it signs in:

为此,您要做的就是让Windows登录后运行以下命令:

rundll32.exe user32.dll, LockWorkStation

This command will lock your system. It accomplishes the same function as pressing Windows+L. There are a variety of ways to make Windows run it at sign-in, including in Group Policy. However, the simplest way is just by adding a Lock shortcut to your Startup folder.

此命令将锁定您的系统。 它完成与按Windows + L相同的功能。 有多种方法可以使Windows在登录时运行它,包括在“组策略”中。 但是,最简单的方法是在“启动”文件夹中添加“锁定”快捷方式。

We performed this process on Windows 10, but it will also work on older versions of Windows including Windows 8 and Windows 7.

我们在Windows 10上执行了此过程,但它也将在包括Windows 8和Windows 7在内的较旧版本的Windows上运行。

创建锁定快捷方式 (Creating the Lock Shortcut)

First, open the Startup folder. To do so, press Windows+R to open the Run dialog, type the following line, and press Enter:

首先,打开启动文件夹。 为此,请按Windows + R打开“运行”对话框,键入以下行,然后按Enter:

shell:startup
Opening the Startup folder on Windows 10.

In the Startup folder, right-click and select New > Shortcut.

在启动文件夹中,右键单击并选择新建>快捷方式。

Creating a new startup shortcut on Windows 10.

In the Create Shortcut dialog, copy-and-paste (or type) the following command:

在“创建快捷方式”对话框中,复制并粘贴(或键入)以下命令:

rundll32.exe user32.dll, LockWorkStation

Click “Next” to continue.

点击“下一步”继续。

Creating a shortcut that locks the computer on Windows 10.

Name the shortcut whatever you like—for example, “Lock Computer.”

随意命名快捷方式,例如,“锁定计算机”。

Naming a Windows shortcut "Lock Computer."

而已! (That’s It!)

If you double-click the shortcut you created, Windows will lock your computer. You’ll then have to sign in with your password, PIN, or whatever other sign-in method you use.

如果双击创建的快捷方式,Windows将锁定您的计算机。 然后,您必须使用密码,PIN或使用的其他任何登录方法登录

When you sign in to your PC, Windows will launch this shortcut along with your other startup programs, automatically locking your PC. After you unlock it, it’ll be good to go.

登录PC时,Windows将与其他启动程序一起启动此快捷方式,自动锁定PC。 解锁后,便可以使用了。

To undo your change, just re-open the shell:startup folder and delete the Lock Computer shortcut you created.

要撤消更改,只需重新打开shell:startup文件夹并删除您创建的“锁定计算机”快捷方式。



Thanks to Mathew Locke for emailing us about this great tip.

感谢Mathew Locke向我们发送了有关此出色提示的电子邮件。

翻译自: https://www.howtogeek.com/684639/how-to-lock-your-windows-pc-after-signing-in-automatically/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值