Created
May 29, 2015 03:56
-
-
Save toagit/6e563f31197833a60574 to your computer and use it in GitHub Desktop.
スクリーンセーバーロック解除
レジストリ版
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
rem スクリーンセーバーロックの一時解除バッチ(管理者権限) | |
rem 実行するとスクリーンセーバーロックを無効にします。 | |
rem 一時停止を解除するとスクリーンセーバーロックをを有効にします。 | |
rem param:1(有効)/0(無効) | |
set key="HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\Control Panel\Desktop" | |
set secure="ScreenSaverIsSecure" | |
REG QUERY %key% /f %secure% | |
rem キー設定 | |
REG ADD %key% /v %secure% /t REG_SZ /d 0 /f | |
REG QUERY %key% /f %secure% | |
echo スクリーンセーバーロックを無効にしました。 | |
echo スクリーンセーバーロックを有効にするには、何かキーを押してください。 | |
pause > NUL | |
rem キー設定 | |
REG ADD %key% /v %secure% /t REG_SZ /d 1 /f | |
REG QUERY %key% /f %secure% | |
echo スクリーンセーバーロックを有効にしました。 | |
pause > NUL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
CD /d %~dp0 | |
rem 管理者権限で実行する必要がるため、 | |
rem screenSaveLock.batのショートカットを作成し、 | |
rem ショートカットのプロパティに管理者で実行を設定する。 | |
start screenSaveLock.lnk |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment