5
3

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 1 year has passed since last update.

よく使う Widdows Setting Command

Last updated at Posted at 2020-01-20

Windows展示用PCのセットアップによく使うコマンド集

レジストリの確認

echo "registry check"

reg query "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced"
reg query "HKEY_CURRENT_USER\Control Panel\Desktop"
reg query "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update"
reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon"

自動ログインの有効化

echo "enable AutoLogin"
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v "AutoAdminLogon" /t REG_DWORD /d "1" /f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v "DefaultUserName" /t REG_SZ /d "userName" /f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v "DefaultPassword" /t REG_SZ /d "password" /f

隠しファイルを表示

echo "show HiddenFile"
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v Hidden /t REG_DWORD /d 1 /f

タスクバーを非表示(自動的に隠す)

 // 非表示
echo "hide TaskBar"
&{$p='HKCU:SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\StuckRects3';$v=(Get-ItemProperty -Path $p).Settings;$v[8]=3;&Set-ItemProperty -Path $p -Name Settings -Value $v;&Stop-Process -f -ProcessName explorer}

// 表示
&{$p='HKCU:SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\StuckRects3';$v=(Get-ItemProperty -Path $p).Settings;$v[8]=2;&Set-ItemProperty -Path $p -Name Settings -Value $v;&Stop-Process -f -ProcessName explorer}

デスクトップアイコンを非表示

echo "hide DesktopIcons"
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v HideIcons /t REG_DWORD /d 1 /f

再起動時の復元を無効化

echo "disable restore"
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v NoSaveSettings /t REG_DWORD /d 1 /f

スクリーンセーバー OFF

echo "do not start the ScreenSaver"
reg add  "HKEY_CURRENT_USER\Control Panel\Desktop" /v ScreenSaveActive  /t REG_SZ /d 0 /f

アプリ通知を切る (アプリやその他の送信者からの通知を取得)

echo "dosable PushNotifications"
add "HKCU\Software\Microsoft\Windows\CurrentVersion\PushNotifications" /v ToastEnabled /t REG_DWORD /d 0 /f

ディスプレイ電源を切らない

echo "do not turn off display power"
powercfg -change -monitor-timeout-ac 0
powercfg -change -monitor-timeout-dc 0

スリープの無効化

echo "disable sleep"
powercfg -change -standby-timeout-ac 0
powercfg -change -standby-timeout-dc 0

自動更新を切る

echo "disable WindowsUpdate"
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v AUOptions /t REG_DWORD /d 1 /f
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v IncludeRecommendedUpdates /t REG_DWORD /d 0 /f
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v EnableFeaturedSoftware /t REG_DWORD /d 0 /f

 rem power shell
 rem Stop-Service -Name "Windows Update"
 rem コマンドプロンプト
sc config wuauserv start= disabled

pause

スタートアップ系 memo

reg query HKLM\Software\Microsoft\Windows\CurrentVersion\Run
reg query HKLM\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Run 
reg query HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run
reg query HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
5
3
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
5
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?