Thanks, Char. I should have done a Web search first on my own.
I did look at devcon, but according to this article it doesn't work
on 64-bit Windows; you have to download a 620 MB file and extract the
devcon from that.
http://superuser.com/questions/104400/enable-disable-wireless-
interface-in-a-bat-file
But you got me started. I'll keep looking, which I should have done
before I posted.
...
And I have the answer.
To disable:
netsh interface set interface "Wireless Network Connection" disabled
To enable:
netsh interface set interface "Wireless Network Connection" enabled
You must do this within a command prompt with administrative
privilege. And of course you need to use the correct interface name,
which you can find from:
netsh interface show interface
Basic instructions are here:
http://sudonetworks.com/wiki/index.php?
title=Windows_Wireless_Control_with_netsh
The first time I ran the disable command, I got the error message "An
interface with this name is not registered with the router." I found
the explanation (elevated privilege required) here:
http://computerhelpforums.net/topic/278-an-interface-with-this-name-
is-not-registered-with-the-router/
You'd think the error message could have said that, but "oh well!"
Note to self: Do a net search before asking questions in future. (I
guess I just subconsciously assumed no one before me had ever wanted
to do this, which is a pretty silly assumption.)