備忘録

備忘録

右クリックで出てくるSkyDrive Proを消す

Ⅰ. はじめに

タイトルの通り「右クリックで出てくるSkyDrive Proを消す」方法です。
Office 2013をインストールすると右クリックに出てきます。
f:id:kagasu:20170729082605p:plain

Ⅱ. 消し方

1. 以下のテキストをx.regという名前をつけて保存し、実行する。
Windows Registry Editor Version 5.00

[-HKEY_CLASSES_ROOT\AllFilesystemObjects\shell\SPFS.ContextMenu]

以上です。

ChromeやFireFoxの開発者ツールのブレークポイントを制限する方法

Ⅰ. はじめに

タイトルの通り「ChromeFireFoxの開発者ツールのブレークポイントを制限する方法」です。

JavaScriptの難読化を行っていてもデバッガの強力な機能を利用して何らかの解析が可能になります。
そういった弱点を潰すことができます。

Ⅱ. やり方1(シンプルな実装)

1. 以下のHTMLをindex.htmlとして保存する
<html>
<body>
<p>Please open developer tools</p>

<script>
setInterval(() => {
  debugger
}, 100)
</script>
</body>
</html>
2. WEBブラウザでindex.htmlを開く
3. 開発者ツールを開く
4. 無限にブレークポイントで止まります。

※結果的に、ブレークポイントを利用したデバッグが不可能になります。
Firefoxの場合、Firefoxのプロセスがフリーズします。(Firefox 54で確認)
f:id:kagasu:20170728002834p:plain

Ⅲ. やり方2(devtools-detectを利用する方法)

1. 以下のHTMLをindex.htmlとして保存する
<html>
<body>
<p>Please open developer tools</p>
<script src="https://sindresorhus.com/devtools-detect/index.js"></script>

<script>
window.addEventListener('devtoolschange', () => {
  while(true) {
    debugger
  }
})
</script>
</body>
</html>

(以下省略)

devtools-detectの動作確認
ブラウザ 結果
Chrome 60 OK
Firefox 54 OK
IE 11 NG

IEはサポートされていません

留意点
  • devtools-detectを利用して開発者ツールを別ウィンドウとして表示させた場合 devtoolschange イベントは発火しません

Windows 10 アプリのバックグラウンド実行を許可しない

Ⅰ. はじめに

Windows10 では使っていないアプリでもバックグラウンドで動作していることがあるそうです。

Ⅱ. バックグラウンド実行を許可しない方法

1. Windows キー + I で設定を開く
2. 「プライバシー」→「バックグラウンドアプリ」
3. 「オフ」に変更する

f:id:kagasu:20170726221439p:plain
以上です

注意点

設定「後」にインストールされたアプリケーションは検索しても結果に表示されないバグがあるようです。
(設定「前」にインストールしたアプリケーションは表示されます。)
画像はExcelをインストールしているにも関わらず表示されていない例です。

f:id:kagasu:20170730103134p:plain

Windows10 右クリックの編集の関連付けを変更する

Ⅰ. はじめに

タイトルの通り「Windows10 右クリックの編集の関連付けを変更する」方法です。
f:id:kagasu:20170726214025p:plain

Ⅱ. やり方(拡張子がtxtの場合)

1. レジストリエディタを起動
2. 以下のキーに移動
HKEY_CLASSES_ROOT\SystemFileAssociations\text\shell\edit\command
3. 任意の値に書き換える

以下の例はEmEditorに書き換える例です。

C:\Users\user01\AppData\Local\Programs\EmEditor\EmEditor.exe %1

以上です。

拡張子が bat の場合は以下のキーになります。

HKEY_CLASSES_ROOT\batfile\shell\edit\command

まとめて書き換える場合

以下のテキストをx.regという名前をつけて保存し、実行する。

Windows Registry Editor Version 5.00

; .txt
[HKEY_CLASSES_ROOT\SystemFileAssociations\text\shell\edit\command]
@="C:\\Users\\user01\\AppData\\Local\\Programs\\EmEditor\\ee256.exe %1"

; .js
[HKEY_CLASSES_ROOT\JSFile\Shell\Edit\Command]
@="C:\\Users\\user01\\AppData\\Local\\Programs\\EmEditor\\ee256.exe %1"

; .bat
[HKEY_CLASSES_ROOT\batfile\shell\edit\command]
@="C:\\Users\\user01\\AppData\\Local\\Programs\\EmEditor\\ee256.exe %1"

; reg
[HKEY_CLASSES_ROOT\regfile\shell\edit\command]
@="C:\\Users\\user01\\AppData\\Local\\Programs\\EmEditor\\ee256.exe %1"

; ini
[HKEY_CLASSES_ROOT\inifile\shell\edit\command]
@="C:\\Users\\user01\\AppData\\Local\\Programs\\EmEditor\\ee256.exe %1"

; ps1
[HKEY_CLASSES_ROOT\Microsoft.PowerShellScript.1\shell\edit\command]
@="C:\\Users\\user01\\AppData\\Local\\Programs\\EmEditor\\ee256.exe %1"

Windows 10 でUACを無効にする

Ⅰ. はじめに

タイトルの通り「Windows 10 でUACを無効にする」方法です。
無効にしてもユニバーサルアプリ(Edge等)の使用が可能です。

レジストリの FilterAdministratorToken を書き換えても意味はありません。

Ⅱ. 動作確認済み環境

  • Windows 10 64bit 1607(Redstone 1)(Anniversary Update)
  • Windows 10 64bit 1703(Redstone 2)(Creators Update)
  • Windows 10 64bit 1709(Redstone 3)(Fall Creators Update)
  • Windows 10 64bit 1803(Redstone 4)(Spring Creators Update)
  • Windows 10 64bit 1809(Redstone 5)(October 2018 Update)
  • Windows 10 64bit 1903(19H1)(May 2019 Update)
  • Windows 10 64bit 1909(19H2)(November 2019 Update)
  • Windows 10 64bit 2004(20H1)(May 2020 Update)
  • Windows 10 64bit 2009(20H2)(October 2020 Update)
  • Windows 11 64bit 21H2
  • Windows 11 64bit 23H2

Ⅲ. やり方

1. 「uac」で検索


2. 「通知しない」に変更


3. 以下のテキストをx.regという名前をつけて保存し、実行する。
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System]
"EnableLUA"=dword:00000000

以上です。