Wednesday, September 28, 2011

Want #Mango #WP7 now? But your network connection is not immediately adjacent to your desk, or awkward to break. #PowerShell

Mango is now available, and there is a cheat that seems to bypass the “wait until Microsoft/Your Carrier” make it available to you.  Read more here:
However the trick relies on disconnecting your internet connection within a few seconds.  This is fine and dandy if the cable is right by your keyboard, mouse and monitor, but not if it isn’t.
Obviously you can enable/disable the NIC, but Windows 7 (at least here) takes a variable amount of time to perform the disconnect.  Factor in UAC asking you for permission to disconnect then you have a bigger timing problem.
So a quick jump to the internet.  The following lines of code sort it out.
Firstly, start a PowerShell session (ISE or prompt), but with Run as Administrator rights to avoid issues.
Then use the line:
Get-WmiObject -Class Win32_NetworkAdapter | Format-Table Name, NetEnabled, NetConnectionStatus, DeviceId –auto
This lists all your network connections, (extract below)
Name                                       NetEnabled NetConnectionStatus DeviceId
----                                       ---------- ------------------- --------
WAN Miniport (Network Monitor)                                            6      
Intel(R) PRO/1000 MT Server Connection     True       2                   7      
Identify the Device ID for your network connection.  In this case 7.
The following lines of code needs to run once only in your ISE session
$Nic = Get-WmiObject win32_networkadapter -computerName LocalHost -filter "DeviceId = 7"
Note that the number 7 at the end will need to be changed for your environment.
Then finally –
As you wish to switch your NIC on and off. 
So, having prepped all that, a quick click on linking on the Zune screen below
Followed by a click on UPDATE, and then immediately run the disable command, and Robert’s your mother’s brother.  When you click on the presented choice to download an update – don’t forget to enable your link again.
Note you may need to update teh Zune software, so you'll get a bit of this:
For a bit.

But then you should see an update offered, something like this.

7403 offered to user
7403 ready to download

Repeat until you have Mango installed



James O'Neill said...

Nice Powershell tip,

Just a word of warning the
version numner in the screen shot is not Mango.
The full version for RTM is
Check your phone and have a look in settings and if you have a version before 7403 it's a step on the way, but you may find you're not really getting the update.

Daniel Noakes said...

Great tip, certainly speeds up the switch. I cna also see other uses for this.


P Bryant said...

Thanks James, I should have made it clearer the shots were part way through the process. The phone was a vanilla Mozart with the early 2011 NoDo its and nothing since. So it took three cycles of updates, I was part way through when I blogged.

He third update, the actual Mango install, took over 5 hours as the download was so slow in the sticks :-(.

Still, done now, and working!