11
15

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Windowsにて自動ログインさせる方法

Last updated at Posted at 2017-08-04

概要

エンドユーザーからの要望として、よく「パソコン起動時に自動でログインするようにして欲しい!」というものが挙がる。
もちろんセキュリティ的にとても宜しくないけど、それでもやって欲しいというのだからしょうがない。

方法1:GUIで設定する

レガシーな方法。最近のOSでまともに動かないと思う。

ファイル名を指定して実行
control userpasswords2

もしくは

ファイル名を指定して実行
etplwiz

方法2:レジストリで設定する

方法3を知るまで利用してきた方法。
なぜかうまく動かない時もあったりして不安定だけど、バッチファイルで配布できるので便利でした。

Cmd
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v "AutoAdminLogon" /t REG_SZ /d "1" /f
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v "DefaultUserName" /t REG_SZ /d "ユーザーID" /f
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v "DefaultDomainName" /t REG_SZ /d "ドメイン名 | ホスト名" /f
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v "DefaultPassword" /t REG_SZ /d "パスワード" /f

参考リンク https://support.microsoft.com/ja-jp/help/324737/

方法3:ツールを使用する

AutoLogonというMS謹製ツールを使用する。
インストール不要、GUIでもコマンドラインでも使えるのが魅力的。最近はこれを利用しています。
ダウンロード先 https://technet.microsoft.com/ja-jp/sysinternals/autologon.aspx

GUI:
autologon_gui.png

CUI:

Cmd
Autologon.exe {ユーザー名} {ドメイン名 | ホスト名} {パスワード}

  • 2017.08.05 方法2のドメイン名に関するご指摘を反映。
11
15
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
11
15

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?