How to set up a Windows 7 virtual machine on Windows 10

Several months ago, I decided it was past time to set up a Windows 7 virtual machine on my home computer. It’s not something I need on a daily basis, but I want to have that environment available in case some future Windows 10 update changes something to the point where one of the programs I use no longer works.

I opted to go with the 32-bit version of Windows 7, and found a legitimate license key for sale on eBay. Once I had the installation media in my possession, I fired up VirtualBox. If you’re wanting to do what I did, here are the steps:

  1. In VirtualBox Manager, click New. Enter the name for your virtual machine and select the type and version; as mentioned previously, I’m using Windows 7 (32-bit). Click Next.
  2. Specify amount of memory—I chose 2048 MB—then click Next.
  3. Select Create a virtual hard disk now, then click Create.
  4. Choose your hard disk file type. The recommended and default setting is VDI (VirtualBox Disk Image), but you can choose something different if you have a particular need. Click Next.
  5. Select type of storage on physical hard disk. I selected Fixed size. Click Next.
  6. VirtualBox defaults to a virtual hard drive of 25 GB. Adjust this if necessary—I bumped it up to 40 GB since I have plenty of space on the drive where I’m storing VMs—then click Create. The virtual hard drive creation process takes several minutes.
  7. Start your virtual machine. Select your startup disk (or .ISO file) and click Start.
  8. Proceed through the Windows installation process:
    1. Choose language to install, time and currency format, and keyboard or input method, then click Next.
    2. Click Install now.
    3. Check the “I accept the license terms” checkbox, then click Next.
    4. Choose the custom (advanced) installation type.
    5. With Disk 0 Unallocated Space selected, click drive options (advanced), then click New, then click Apply and click OK.
    6. After setup finishes create disk partitions, click Next. Setup will take several minutes to install files.
    7. After the virtual machine restarts, enter the user name and computer name. Click Next.
    8. Enter a password and click Next.
    9. On the Windows product key screen, click Skip.
    10. Choose Windows Update settings.
    11. Select time zone, then click Next.
    12. Select your computer’s current location, either home or work.
    13. After Windows starts, change the screen resolution; default is 800×600 pixels.
    14. While holding the Windows key on your keyboard, press the Pause/Break button to launch the system information window.
    15. Click the “3 days until automatic activation. Activate Windows now” link.
    16. Click Activate Windows online now.
    17. Enter your Windows product key, then click Next. After activation completes, click Close.
    18. Install Windows updates, restarting the virtual machine as necessary.
  9. After you finish installing and updating Windows, go to VirtualBox’s Devices menu and choose Insert Guest Additions CD image. When the AutoPlay window appears, click Run VBoxWindowsAdditions.exe, then tell the UAC prompt Yes.
  10. Click Next.
  11. Click Next again.
  12. Click Install.
  13. When the Windows Security window appears, click Install.
  14. When the Windows Security window appears again, click Install.
  15. Click Finish to reboot.

After the virtual machine restarts, you might need to adjust the screen resolution again. After that, you’re done!

How to delete .cab files from Windows Temp folder and prevent them from regenerating

I recently noticed at work that my Windows 7 virtual machine’s C: drive was down to its last couple of gigabytes of free space. What’s up with that? I wondered. After doing a bit of poking around, I discovered that the Windows Temp folder was clogged with multiple .cab files, nearly 32 GB of them in this case. Not cool!

It seems that all of these files are related to Windows updates not installing correctly, or something along those lines. The solution given by Microsoft forum user 5kyFx is this:

  1. Delete the .log files from %systemroot%\Logs\CBS (which prevents the .cab files from being regenerated)
  2. Delete the .cab files from %temp% (which clears space on the drive)

In my case, this appears to have solved the problem.

Microsoft KB3177725 prevents some programs from printing multiple consecutive documents

I’ve been in the IT world long enough to know that not every Microsoft update brings only good things to the table. That was certainly the case when I recently encountered a real dud affecting one of my employer’s customers.

The summary for KB3177725 states, “This security update resolves vulnerabilities in Microsoft Windows.” Great! We like patching security holes. This update has a darker side, however, and although the patch description now mentions it as a known issue, that was not the case when the customer’s problem initially popped up.

The problem

I first became aware of the problem last month when the customer reported that he was unable to use a program created by my employer to encode more than one magnetic stripe card at a time on his Magicard card printer. If he tried sending a second job to the printer, the program indicated the job had been queued successfully, and it would even show up in his print spooler, but the card would not actually print even if the spooler was restarted. The only way to print another card was to close the encoder software, reopen it, and send the print job again.


Although the problem initially looked like it might be related to my employer’s software, nothing had changed on our end, but we still checked to make sure the customer had the latest version of the software and the latest driver for his card printer. Eventually, I headed to Control Panel to check out the list of recently installed Windows updates, one of which was the aforementioned KB317725. It was automatically installed around the same time the customer started having problems—an interesting coincidence—and a quick search revealed that it was causing printing problems for other people.

According to posts in that forum thread, the problem occurs in a given program only if it is coded a certain way, but such programs work just fine up to the point that the Microsoft patch is installed. You can read up on the details if you like, but it’s beyond the scope of what we’re discussing here.

The problem our customer was having was not exactly the same as what other people had experienced because he could print only one document before needing to restart the encoder software, whereas other people could print two in a row before running into trouble. Even now the known issues section of the patch description says, “After you apply this security update and you print multiple documents in succession, the first two documents may print successfully. However, the third and subsequent documents may not print.” Nevertheless, the patch being installed around the same time he started having trouble suggested to me that it was probably related.

The solution

By the time I ran across this issue, Microsoft had already been made aware of the problem. An update, KB3187022, was available, not through the usual Windows Update interface but through the Microsoft Update Catalog.

We downloaded this patch and installed it on the customer’s computer, and after a reboot, he was again able to print multiple cards in succession without needing to restart his encoder software between print jobs.


Since first encountering this problem, we’ve had a second customer using the same encoder software report the same problem, except in his case he was able to print two cards in a row before having to reboot the software. That situation exactly matched the problem described in the update’s known issues section.

We were lucky that the first customer was using a Windows 7 machine since, at the time the issue first cropped up, Microsoft had not released a patch for the Windows 10 version of the update, KB3176493. That has since changed, and a fix is now available for Microsoft’s latest OS, too.

Naturally, you can’t blame Microsoft for every problem that comes up, nor is every problem their fault. Nevertheless, when a problem pops up seemingly out of nowhere at the same time Windows updates are installed, I can’t help but take a second look.

How to adjust the size of your Hyper-V virtual machine’s window

I recently started a new job, and due to the need to make VPN connections, I’ve been getting familiar with Hyper-V Manager. I’m using a laptop, so one of the first things I wondered was how I could fix the size of my virtual machine’s window so that I don’t have to do a lot of scrolling. Unlike with Remote Desktop Connection, where you can specify the size of the window before connecting, Hyper-V Manager did not appear to have such a configuration option.

It turns out the answer to my question is very simple: for a Windows 7 virtual machine, at least, all you have to do is change the screen resolution on the VM itself. To do that, right-click on the VM’s desktop and choose Screen Resolution (for Windows 7) or Display settings > Advanced display settings (for Windows 10) and choose a resolution small enough to fit on your physical computer’s display.

After you adjust your VM’s resolution, the window in which the VM is running resizes itself automatically, and you’re good to go.