Windows 7 PCに作成した共有フォルダにアクセスできない場合の対処
サポート切れまで2年を切っているWindows 7ですが、このあいだ職場で共有フォルダを作成したら、ほかのPCからアクセスできないという話があったのでメモ。
セッション数をみると8台程度だったので、Windows 7の上限(20台)にも遠く、なんだろうなと思い、エクスプローラからIPアドレスを打って開こうにも開けず。ところが、セッションをすべて切断すると開けるようになるが、台数が増えると開けなくなるという次第でこういうメッセージが出る。
<コンピュータ名> にアクセスできません。
このネットワークリソースを利用するアクセス許可がない可能性があります。
アクセス許可があるかどうかこのサーバーの管理者に問い合わせてください。
色々とググってみると、レジストリを弄ることで解消できるという情報はあるものの、個人ブログだらけで情報源の明記がなく、なんだか釈然としません。
仕方ないので、レジストリのエントリの名前でググってみると、Microsoftのサポートページからこれが引っかかりました。
You cannot configure the maximum number of concurrent SMB requests that are sent to a Windows Vista-based file server
Vistaベースのファイルサーバとありますが、Windows 7もだいたい同じだからこれで直ったという情報があれこれあるわけだと判りました。
そういうわけで、MaxMpxCtとMaxWorkItemsとSizeのエントリの値を下記の情報を参考に最大に設定して再起動したところ改善されました。
On a Windows Vista-based server, the MaxMpxCt entry, the MaxWorkItems entry, and the Size entry are located in the following registry subkey:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Lanmanserver\Parameters
(中略)
You must set the following registry entries on the server.
- Set the value of MaxWorkItems to at least four times the value of MaxMpxCt. By default, MaxWorkItems is set to 64 in Windows Vista. You can set this entry to a maximum of 1,024. We recommend that you use this setting only on a computer that has sufficient memory. If you use the maximum setting, we recommend that you use at least 1 gigabyte (GB) of memory.
- By default, the value of the Size entry is 1 in Windows Vista. Set the Size entry to at least 2. If you experience problems, set the Size entry to 3.
- A value of 1 optimizes Windows Vista for local applications.
- A value of 2 balances resource usage between local application and remote applications.
- A value of 3 optimizes Windows Vista for network activity.
ググった情報では上記レジストリエントリのほかに、IRPStackSizeも変えているという情報があるのですが、こちらは手を付けずに改善しています。一応、下記が見つかったので載せておきます。上記までの手順で解決しない場合に試すと良いのかもしれません。
Description of the IRPStackSize parameter in Windows 2000, in Windows XP, and in Windows Server 2003