例によってnetshが動かない

D:\>netsh interface ip set address name=eth0 static 192.168.1.3 255.255.255.0 192.168.1.1 1
RPC サーバーを利用できません。

あー、面倒くさい。これは必要なサービスが起動していないためで、これを見つけるのが面倒くさい。

Windows 2000 の時は RemoteRegistry だったが、 Vista は何だ? 日本語でググっても出てこないので、英語のメッセージを探す *1

D:\>chcp 437
Active code page: 437

D:\>netsh interface ip set address name=eth0 static 192.168.1.3 255.255.255.0 192.168.1.1 1
The interface is unknown.

google:netsh The interface is unknown.

分かった。 dhcp *2 だ。IPアドレスを固定していたので、 dhcp サービスは切ってあった。

D:\>sc config dhcp start= auto
[SC] ChangeServiceConfig SUCCESS

D:\>sc start dhcp

SERVICE_NAME: dhcp
        TYPE               : 20  WIN32_SHARE_PROCESS
        STATE              : 2  START_PENDING
                                (NOT_STOPPABLE, NOT_PAUSABLE, IGNORES_SHUTDOWN)
        WIN32_EXIT_CODE    : 0  (0x0)
        SERVICE_EXIT_CODE  : 0  (0x0)
        CHECKPOINT         : 0x0
        WAIT_HINT          : 0x7d0
        PID                : 1024
        FLAGS              :

D:\>netsh interface ip set address name=eth0 static 192.168.1.3 255.255.255.0 192.168.1.1 1

OK

*1:us.bat はどこに行っちまったんだ?

*2:表示名は DHCP Client