Migrating a Windows XP Pro ‘OEM’ PC to Parallels Desktop 7 (step-by-step)

Summary: After spending 4+ hours on phone ‘support’ with Microsoft (I know because I tried to help him communicate the problem to no avail), a friend recently discovered the trick to moving his laptop Windows XP Pro (an OEM version provided by the laptop maker) over to a Parallels virtual machine — WITH all applications, settings, data intact. IMO it’s simple, fast, and clever. I should stress that as he and I understand the license rules, he was required to buy a second, new, “full” (non-OEM) version of XP, which he did.

He bought a new Macbook Pro, and since he had a considerable investment in Windows versions of applications like Adobe CS2, he did not want to have to buy new versions (Adobe doesn’t offer upgrades from CS2 to the current CS). And he didn’t want to have to re-install several dozen applications, not to mention hundreds of PC settings, on a fresh install of Windows XP. So he also bought Parallels ($80) and Parallels Transporter ($10) for his Mac.

And since he was pretty sure it violates the Microsoft terms to “move” an OEM copy of Windows (such as supplied by Dell, Toshiba, etc. when you buy a PC from them) to a second PC without buying a new license he also bought a fresh, legit, “full” Windows XP Pro with activation key, so he could use that “full” key to activate his migrated copy of Windows.

  1. On his PC, he downloaded the Parallels Transporter Agent for Windows (free), hooked an external hard drive to his PC, and used Transporter Agent to copy his entire Windows hard disk to an image on the external hard drive. Then he ejected the hard drive and removed the USB cable. (BTW using a hard drive was much faster than using the networked transport, plus gave his an extra backup image copy “just in case”.)

  2. On his Mac, he ran Parallels Transporter on his Mac, connected his external hard drive when prompted, and migrated his PC apps/data to a folder on his Mac.

  3. On his Mac, then he installed Parallels Desktop 7 for Mac.

  4. He ran Parallels Desktop on his Mac, and started the Windows XP virtual machine.

  5. As expected, Windows said it needed to be re-activated.

  6. Activation failed. Windows kept reporting “Incorrect Product Key”. Long story short… The Microsoft activation team (on six different calls, insisting on talking to a supervisor three times) (a) confirmed the key WAS perfectly valid (being fresh, legit copy of XP) so it was a “support” issue related to the disk image coming from an OEM machine. The support department, after a 70 minute wait for the “legacy XP support team”, claimed they “don’t do activation, period” and transferred him back to activation team. Who transferred him to support, this time in Australia since US support was closed, but Australia support listened politely and said they don’t support US customers, tried to connect him to US support, then hung up.

To recap the situation: he was sitting there with all his Windows apps and data moved over to, and running on his Mac, and had a new, verified-legit copy of Windows XP Pro and activation key, and no one at Microsoft could or would help him activate his “new” PC with his “new” key.

  1. The secret turned out to be as follows:
  • On Parallels, “shut down” the virtual PC (but leave Parallels Desktop running)
  • On the real PC, run Start > Run > cmd, then run ‘getmac’
  • On the real PC, write down one of the MAC addresses (he chose the unused actual ethernet adapter, as opposed to the wireless one, under the theory THAT was the one Microsoft had “tied” to his Windows activation on the PC.
  • On Parallels Desktop, he opened the Configure menu for the virtual machine, selected Hardware, and changed the network adapter from “Shared” to “Bridged:Default adapter” then entered the real-PC’s MAC address.
  • He restarted the virtual machine, logged in, and when windows asked for his product key he entered the one from the sticker on the bottom of his PC (and stuck his unused “new/full” disk and key in a drawer with documentation of how Microsoft failed multiple times to let him use the second key to activate his second PC.).
  1. With his applications and data migrated to his Mac, he then did a factory-restore of his PC (removing Adobe CS, MS Office, etc.) so he could donate or sell the old PC.

Specifying a :target when using link_to with Rails 3.1

This seems contrary to some of the docs I’ve read, so I’ll mention it here in case anyone else has this trouble.

When specifying a :target => “_blank” as part of a link_to, I had to put the destination url parameters inside a hash:

Eg:
= link_to "Preview", { :action => :preview, :id => flyer}, :target => "_blank"

Not:
= link_to "Preview", :action => :preview, :id => flyer, :target => "_blank"

Otherwise the target=_blank is treated as a text query string instead of as a target directive.

getting rails 3.1 + carrierwave + S3 + heroku working

Carrierwave is a drop-dead-simple way to add image uploading to your rails app. And even using windows XP for a development box (which can make adding new gems troublesome from time to time), the process was fairly smooth.

The railscast for carrierwave is a good start.

To add S3 support, we followed the guidelines in the carrierwave readme file.

To make it work at heroku, per the carrierwave instructions, we added this to our app/uploaders/WHATEVER.rb file:

<br></br>
  def cache_dir<br></br>
    "#{Rails.root}/tmp/uploads"<br></br>
  end<br></br>```

The only ‘gotcha’ we ran into was a Errno::EACCES permissions error when running locally. (It is related to deleting the local tmp file after the file is uploaded to S3. It only happens on windows development boxes, and it causes your form update to fail, although the file IS uploaded correctly to S3.) The fix for that is to disable the delete-temp-after-upload process, which for a development box is no big deal. The fix is described in a [carrierwave git issue](https://github.com/jnicklas/carrierwave/issues/220/), and consists of adding the following in your app/uploaders/WHATEVER.rb file:



CarrierWave.configure do |config|

    # hack fix for windows machine due to tmp file permission error

     # per https://github.com/jnicklas/carrierwave/issues/220/

     if ENV[‘RAILS_ENV’] != ‘production’

          config.delete_tmp_file_after_storage = false

     end

“`

Getting ActiveAdmin and web-app-themes to work with Rail 3.1 at Heroku

(If all you care about is getting Activeadmin to work at Heroku, skip to step 4. If you want to know how to fix scaffolding to the normal rails default after installing ActiveAdmin, skip to step 7.)

Rails 3.1 at Heroku is not quite an “out of the box” deployment.

Part 1. To get started, I recommend http://blog.bryanbibat.net/2011/09/24/starting-a-professional-rails-3-1-app-with-web-app-theme-devise-and-kaminari/

Part 2. If you used the ‘default’ theme for web-app-theme, you need to add a few styles that all the themes except ‘default’ have. Add the following to the end of app/assets/stylesheets/web-app-theme.css:

/* Write here your css for overriding the theme's rules */<br></br>
.small { font-size:.8em; }<br></br>
.gray { color:#999999; }<br></br>
.hightlight { background-color:#FFFFAA; }<br></br>

Since I’m using rails 3.1 I also had to override the stylesheet to use web fonts. So I moved the /app/assets/web-app-theme/theme/default/fonts folder to /public/fonts and copied the @font-face definitions from the default/style.css to app/assets/stylesheets/web-app-theme.css and simply added a “/” in front of the font paths:

@font-face {
  font-family: "MuseoSans500";
  src: url("/fonts/museosans_500-webfont.eot");
  src: local("☺"), url("/fonts/XXXXX.woff") format("woff"), url("/fonts/XXXX.ttf") format("truetype"), url("/fonts/XXXX-webfont.svg#webfontxx") format("svg");
  font-weight: normal;
  font-style: normal;
}
@font-face {
  font-family: "MuseoSans500Italic";
  src: url("/fonts/XXXX.eot");
  src: local("☺"), url("/fonts/XXXX.woff") format("woff"), url("/fonts/XXXX.ttf") format("truetype"), url("/fonts/XXXX.svg#webfontxxf") format("svg");
  font-weight: normal;
  font-style: normal;
}
@font-face {
  font-family: "Museo700";
  src: url("/fonts/XXXX.eot");
  src: local("☺"), url("/fonts/XXXX.woff") format("woff"), url("/fonts/XXXXttf") format("truetype"), url("/fonts/XXXX.svg#webfontxx") format("svg");
  font-weight: normal;
  font-style: normal;
}

Part 3. Add ActiveAdmin, per the excellent tutorial at http://net.tutsplus.com/tutorials/ruby/create-beautiful-administration-interfaces-with-active-admin

There is also a very helpful RailsCast for customizing ActiveAdmin at http://railscasts.com/episodes/284-active-admin

Part 4. Add a fix for Devise at https://github.com/plataformatec/devise/commit/96f55a7ac7a61effd03a7f43dbbdfb6af8894579#diff-1 specifically add to config/application.rb
config.assets.initialize_on_precompile = false<br></br>
I also added

  # Enable the asset pipeline<br></br>
  config.assets.enabled = true<br></br>

Part 5. Add a fix for ActiveAdmin at https://github.com/gregbell/active_admin/issues/474, specifically, add this to the top of your routes.rb file:

# The ActiveAdmin routes cause Rails to set up a connection to the
# production database, which isn't available during
# assets:precompile on Heroku, so the following unless block skips
# setting up these routes only when rake assets:precompile is
# being run.<br></br>
#
# Could be a problem if the assets needed these to be loaded to
# compile properly; pretty sure they don't.
break if ARGV.join.include? 'assets:precompile'

Part 6. Heroku was still showing a SASS error after I pushed, which was fixed by moving the sass-rails gen OUT of the assets group (eg, move it amongst the regular gems) in the Gemfile, per http://ygamretuta.me/2011/10/02/setting-up-active-admin-on-heroku-with-rails-3-1-and-cedar/

Part 7. FIXING RAILS SCAFFOLDING. After installing ActiveAdmin, the ‘rails g scaffold’ command no longer works normally. ActiveAdmin adds the inherit_resources gem, which has the side effect of replacing the normal “rails generate scaffold” process to one which by default is based upon inherit_resources. If you want to run the ‘normal’ rails g scaffold command you need to add -c=scaffold_controller at the end of the command line, for example
rails g scaffold Foo name:string -c=scaffold_controller

VRBO ought to take a page from Airbnb’s UX

I was looking for a place to stay during an upcoming trip, and checked out both VRBO and Airbnb, expecting similar features and capabilities. I was astounded that VRBO does not offer a street map view that lists available properties so you can see at a glance where listed properties are. And I was even more amazed that they did not even have a way to specify a price range, or sort by price. Airbnb, of course, does both.

Bandaid cure for new Hugo Boss jacket

The GF picked out a new jacket for me at Nordstroms over New Year’s. Because I liked the jacket I casually (and unwisely) dismissed concerns it could become a magnet for babes.

As the first photo shows, the situation spiraled out of control, disrupting my ability to enjoy a simple solo evening out when the GF was otherwise occupied.

Hugo Boss jacket causes mayhem
Yo, something gotta be done, a man needs his ‘me time’

Fortunately, a simple bandaid is all it took to remedy the discomfort. Since applying the fix, I haven’t had any problems in the babe magnet department. Who knew?

A 5 cent bandaid solved the Hugo Boss Jacket Babe Magnet problem

Learning to create innovative solutions to real-world problems is why I went to Stanford for my engineering degrees.

How to cancel ATT on Ipad w/o losing current billing cycle

UPDATE: Competition is wonderful thing, comrades. Now that AT&T has to compete for your ipad data business, they clarified the options, adding a clearly labeled “cancel autorenewal” option. (Although for my new iPad I opted for Tmobile to get the 200MB of free data each month, more than enough most months.)

I use my IPad’s 3G capability only sporatically since I’m usually able to access wifi. So when I do enable the AT&T cellular data, it is usually for one specific ‘event’ and I like to ensure it won’t auto renew every month.

“Turning off autorenewal” of an AT&T data plan for a 3G Ipad is basically undocumented, compounded by a truly terrible user interface that obfuscates the two cancel options.

I called the AT&T support line and at first she kept telling me to choose the “cancel autorenew” option (which doesn’t exist). After checking with someone else, she then came back on the line and said to choose ‘cancel’ plan, and choose the “cancel plan and delete account later” option. That did indeed seem to do the trick.

Wouldn’t kill AT&T to explicitly state, somewhere, anywhere, that ‘cancel plan’ leaves your existing data service intact through the rest of the currnet billing cycle if and only if you choose the “delete account later” option.