Posts tagged ‘Windows 7’

Installing Windows 7 into a virtual machine on FreeBSD using VirtualBox

My job at LANDesk requires that I write code in C# for an application that only runs on Windows Server.  I also have to test a lot of code on Windows 7. Like me, so many people are forced to run a version of Windows because they have special windows applications at work or because that is the platform we are developing for in our jobs.

If running windows is a must for you, as it is for me, then moving to FreeBSD exclusively is just not an option.  I want to run an FreeBSD, but running Windows 7 is a must too.

At first VMWare Workstation looked like it was going to solve this problem. But while its early versions worked on FreeBSD, they failed to port newer versions over.  Quemu just never could get to level of usability needed.  Well, along comes VirtualBox from Sun.  Sun, now Oracle, released an open source edition cleverly named VirtualBox Open Source Edition (OSE).  Like many of Sun’s code, it is duel licensed.

Prerequisites

  1. A FreeBSD desktop – Hopefully you are here because you already have this.  If you don’t have a FreeBSD desktop, you can follow my guide to build one.
    How to install and configure a FreeBSD 8 Desktop with Xorg and KDE?
    Or you can install and use PC-BSD which is a nice desktop version of FreeBSD.
  2. A Windows 7 DVD or ISO and a product key.  Please do not pirate!

Step 1 – Installing VirtualBox OSE on FreeBSD 8.1

Installing VirtualBox is not complex. It involves only a few steps.

  1. Go to the directory for virtualbox-ose in your ports tree.
    # cd /usr/ports/emulators/virtualbox-ose
  2. Configure your installation.
    # make config
  3. Select Guest Additions, as it is not selected by default.
    Note: The defaults are Qt4, DBUS, X11, NLS and they should remain checked.
  4. You may also want to select VNC.
  5. Install virtualbox-ose
    # make install

Step 2 – Configuring FreeBD for Virtual Box

There are few things we need to configure on the FreeBSD system to make VirtualBox work.

  1. Add users to the vboxusers.
  2. Configure CD/DVD drive access.
  3. Configure VirtualBox kernel modules to load.

Step 2.1 – Adding use to the vboxusers group

  1. To add users to the group, use this command:
    FBSD# pw groupmod vboxusers -m SomeUserName

Step 2.2 – Configure CD/DVD drive access

Note: This is a copy of what is in my document for building a FreeBSD Desktop.

FreeBSD is more secure by default, so something as simple as accessing a CD or DVD or USB drive is not actually allowed by default. You have enable this.

These steps assume that your user is a member of the operator group. Remember above during the installation, I mentioned to make your user a member of both the wheel and operator groups.

  1. Access a shell and su to root.
    Note: The easiest shell to access now that you are in KDE is Konsole. To access Konsole, click the K and go to Applications | System | Terminal. Also you can add the shell icon to your panel by right-clicking on the icon and choosing Add to Panel.
  2. Enable vfs.usermount.
    FBSD# sysctl -w vfs.usermount=1
  3. Configure vfs.usermount to be enabled on boot.
    FBSD# echo vfs.usermount=1 >> /etc/sysctl.conf

  4. Open the following file with an editor: /etc/devfs.conf
    FBSD# ee /etc/devfs.conf

  5. Add the following lines:
    # Allow all users to access CD’s
    perm /dev/acd0 0666
    perm /dev/acd1 0666
    perm /dev/cd0 0666
    perm /dev/cd1 0666# Allow all USB Devices to be mounted
    perm /dev/da0 0666
    perm /dev/da1 0666
    perm /dev/da2 0666
    perm /dev/da3 0666
    perm /dev/da4 0666# Misc other devices
    perm /dev/pass0 0666
    perm /dev/xpt0 0666
    perm /dev/agpart 0666
    perm /dev/uscanner0 0666

    Note: Yes, I copied these from a PC-BSD install’s version of this file.

    Note: Change to 0660 to only allow users in the operator group to mount drives.

  6. Edit the /etc/devfs.rules file.
    FBSD# /etc/devfs.rules

  7. Edit the following file: /usr/local/etc/PolicyKit/PolicyKit.conf
    FBSD# ee /usr/local/etc/PolicyKit/PolicyKit.conf

  8. Change the xml’s config section from this…
    <config version="0.1">
        <match user="root">
            <return result="yes"/>
        </match>
        <define_admin_auth group="wheel"/>
    </config>
    

    …to this:

    <config version="0.1">
            <define_admin_auth group="operator"/>
            <match action="org.freedesktop.hal.storage.mount-removable">
                    <return result="yes"/>
            </match>
            <match action="org.freedesktop.hal.storage.mount-fixed">
                    <return result="yes"/>
            </match>
            <match action="org.freedesktop.hal.storage.eject">
                    <return result="yes"/>
            </match>
    </config>
    
  9. Edit the following file with ee: ee /etc/fstab
    FBSD# ee /etc/fstab

  10. See if there is a line in the fstab for your CD/DVD-Rom. Comment out or remove the line for your /cdrom. I usually just comment it out by adding a # sign as shown:
    #/dev/acd0 /cdrom cd9660 ro,noauto 0 0
  11. Restart the computer.

You should now be able to mount CD, DVD, and USB drives. You also should be able to both read and write to them, burn disks, write and format USB drives, etc…

Step 2.3 – Configure VirtualBox kernel modules to load

  1. As root, edit the /boot/loader.conf file.
    # ee /boot/loader.conf
  2. Add the following text:
    # VirtualBox
    vboxdrv_load=”YES”
  3. Save and close the file.
  4. Edit the /etc/rc.conf file.
  5. Add the following text.
    # VirtualBox
    vboxnet_enable
  6. Save and close the file.

Step 3 – Creating your Windows 7 VirtualBox

  1. Launch Virtual Box.
    Note: VirtualBox registers itself with the KDE menu.  On my installation, it was in Lost & Found, but on PC-BSD it was under System.  Either way you can type VirtualBox in the KDE menu search and find it.  Also, VirtualBox is the command and it should in $PATH so you should be able to open any shell from your desktop environment and run VirtualBox and have it open.
  2. Click New. This brings up a Wizard.
  3. Follow the wizard.
    Ok, if you need help with the wizard, here are my steps.
  4. Read and click Next.
  5. Choose an easy name.  I used “W7”.
  6. Make sure the Operating System is set to Microsoft Windows.
  7. Change the Version to Windows 7 (64-bit) or if you are on 32 bit hardware still use just Windows 7.
  8. Click Next.
  9. Allow at least 1536 MB (1.5 GB) for the base memory size.  You can get away with less if you need to. You can do better with more if
  10. you want to.
  11. Click Next.
  12. The Virtual Hard Disk page is already configured correctly, Boot Hard Disk is checked and Create new hard disk is selected. So just click next.
  13. Read and click Next.
  14. For Hard Disk Storage Type, I left it set at Dynamically expanding storage.
    Comment: This means that even if you use a 100 GB drive, it will only physically use as much space as Windows 7 has used in the Virtual Drive. So if Windows 7 is using 10 GB, even if you have 100 GB drive, the physical size on disk is only 10 GB.  This is important information for the next screen.
  15. Click Next.
  16. I change the drive size to 50 or 100 GB.
    Comment: It doesn’t really matter, but it is best to not run out of space either virtually or physically. Read my comment in the previous step.
  17. Click Next.
  18. Read and click Finish.

You virtual Machine now shows in the list.

Lets move to the next step.

Step 4 – (Optional) Changing Settings on your Windows 7 VirtualBox

I make two changes to my Windows 7 virtual box. As noted above this is optional, but I like to do them.

  1. Click the settings.
  2. Click System.
  3. Change the boot order to be hard drive first.
    Note: I make this change because it annoys me it when I install and then reboot the machine after the install and it boots right back to the install media. So I make this change and the press F12 during boot to the CD once.
  4. Uncheck and get rid of the floppy. (Does anyone still use those?)

  5. Now click on Storage.
  6. Under the Storage Tree, select your optical drive.
  7. If you are using an ISO, change the CD/DVD Device to point to the ISO. If you are using a DVD, as I am, choose Host Drive.  My host drive says: Host Drive Optiarc DVD RW AD-7910A (cd0).  I assume everyone drive will show up slightly different, but should start with Host Drive.
  8. Click OK.

Your settings should be good to go.

Step 5 – Install Windows 7

Now it is time to install Windows 7.

Don’t pirate! Use a legal product key. Again, just because I like open source does not make me anti closed source. I am not a Microsoft hater and I would hope you aren’t either. Even if you are, that is no excuse for pirating.

  1. Insert the DVD into your DVD drive, unless you are using an ISO and have already connected it.
  2. Click the Start icon.
  3. A new installation window will popup.
    Important! You may get a lot of popups telling you about important tips for using VirtualBox. Take time to read them. If you don’t read them or don’t already know what they are telling you, you will wish you had read them.
  4. Click in the window and to have it take control of your mouse and keyboard.
  5. Press F12 to choose your boot option.
     

    Note: If you miss this, that is OK,  you can restart the VM and try to be quicker.

  6. Once you have pressed F12 in time, you will see the following screen. At this screen, press the letter next to DVD drive.
  7. Press a key when prompted to boot to the Windows 7 media.

Well, you are off to installing Windows 7.  Hopefully you can get Windows 7 installed on your own, cause I am not here to walk you through doing that. Don’t worry, the install media for Windows 7 should be easy enough for you to follow if this is your first time.

Once finished, you will be running Windows 7 on FreeBSD.

Step 6 – Install VirtualBox Guest Additions

Even though all the devices are virtual, drivers are still needed. VirtualBox guest additions installs most of these drivers as well as other features of VirtualBox.

  1. Log in to your Windows 7 install.
  2. Select Device | Install Guest additions.

    This will mount an ISO and start the installer for VirtualBox Guest Additions inside Windows 7.

  3. Click Run VBoxWindowsEditions.exe.
  4. Follow the wizard.
    Note: I use the default install location and I check the option to Use Direct 3D support.
  5. Reboot when prompted.

Step 7 – Install the sound card driver

The sound card driver must be installed. VirtualBox uses a virtual device representing the Realtek AC’97 sound card.

  1. Log back into Windows 7.
  2. Go to the following web site:
    http://download.cnet.com/Realtek-AC-97-Driver-Windows-Vista-Windows-7/3000-2120_4-10962344.html
  3. Download and install the Realtek AC’97 Driver.
  4. Reboot when prompted.

Your Finished

You now have Windows 7 running. Now you can have the great experience of using FreeBSD as your primary OS and load Windows 7 when you need something requires windows, like I do.

Sources:
http://wiki.freebsd.org/VirtualBox
http://forums.freebsd.org/showthread.php?t=18699
The virtualbox-ose port’s pkg-message

How to open Windows Color and Appearance from the command line or a shortcut?

Ok, so I had a hard time finding Windows Color and Appearance in Windows 7.

It is pretty easy to get to the Windows Color and Appearance tool if you know where to go. The problem is that where to go is not obvious.  So here is where you go:

  1. Right-click on Desktop and choose Personalize.
  2. Click the Windows Color icon at the bottom of the screen.
  3. Clikc the Advanced appearance settings… link.

Besides the problem that it is not obvious where to go, there are also some computer some diseases that make this harder than it should be.

Disease #1 – Limited Clicking Ability Disorder or LCAD

People have what is called Limited Clicking Ability Disorder or LCAD.  In layman’s terms, click laziness. Yes, that means we want to get there in less clicks.

It is 4 clicks to get to the Windows Color and Appearance tool, assuming you know where you are going.  Otherwise, you have to click all over till you find it. Whether it is four or more, this is way too many clicks for someone who suffers from click laziness or LCAD.

The Cure

Create desktop shortcuts or shortcuts on your startbar.

Steps for creating a shortcut to the Windows Color and Appearance tool.

  1. Right-click on your desktop and choose New | Shortcut.
  2. In the Type and location of the item field type in:c:\windows\system32\desk.cpl ,5Note: Yes, there is a space between desk.cpl and the ,5.
  1. Click Next.
  2. In the Type a name for this shortcut field, enter this:Windows Color and Appearance
  3. Click Finish.

You now have a shortcut on your desktop which will all you to access Windows Color and Appearance in one click and cure your LCAD.

Note: If you want, you can right-click on the shortcut and choose properties and click the Change icon button and select a different icon if you want.

Disease #2 – Keyboard-to-Mouse Tropophobia

Tropophobia is the fear of moving and yes, Keyboard-to-Mouse Tropophobia is the fear of moving the hands from the keyboard to the mouse.

The Cure

Learn to access as many features as you can without using the mouse.

So how can you access the Windows Color and Appearance tool without going to mouse?  This one was not as easy as others, but the solution was found.

Steps for accessing the Windows Color and Appearance tool using only the keyboard

Do this:

  1. Press the Windows Key and the R key simultaneously.  This brings up the Start | Run tool.
  2. Type the following into the Open field:desk.cpl ,5Note: Yes, there is a space between desk.cpl and the ,5.
  3. Press Enter.

Sources:
This page got me started and my own knowledge got me an easier solution than what was posted here:
http://www.sevenforums.com/tutorials/59884-window-color-appearance-shortcut-create.html

Windows 7 speech recognition

Today I am writing this post using windows seven speech recognition.

I turned on windows speech recognition and found a surprisingly working well at times.

You must speak very clearly and be prepared to make a lot of corrections.

To turn on Windows 7 speech recognition, go to Start | All Programs | Accessories | Ease of access | Windows Speech recognition.

Say “Press pipe” to insert a pipe symbol.

…using the keyboard now…
I couldn’t quite finish it using just audio. I struggled selecting the Categories…everything else I was able to do. It is quite difficult and takes a lot of practice and a lot of corrections, but I have to say that I am impressed. However, as impressed as I am, it is a long way from being faster that a keyboard for me. Of course, I have about 20 to 25+ years experience typing and I don’t remember when I started to use a mouse, but only a short few hours of voice, so maybe if I gave this voice thing 25 years I would be just as good…

How to send an audio or voice email in Windows 7? (Steps should work in Vista or XP as well)

How to send an audio or voice email in Windows 7?

This can be done with special software and without specially software.

Without special software
Requirements:

  • Microphone – Often laptops come with microphones built-in. But a head set or a stick microphone usually has better results. If you don’t have one, buy one here: USB Microphone from Amazon
  • Email – any email that allows for attachments will do.

Step 1 – Record the email.

  1. Open sound recorder by going to Start and typing in “Sound Recorder” and choosing to open the application.
  2. Click “Start Recording” and talk into your microphone.
  3. Click “Stop Recording” when finished.
  4. Save the file where you want to save it. It is a .wav file.

Step 2 – Send the .wav file as an attachment

  1. Open your favorite mail program or web-based email tool.
  2. Start a new email or compose a new email.
  3. Enter a recipient.
  4. Enter a subject.
  5. Add the .wav file as an attachment.
  6. Click Send.

With special software
There is special software for doing this, and there are lots of different types. I am only going to discuss one piece of software here called WaxMail that is an integration tool to Outlook or Outlook Express.

Step 1 – Download WaxMail.

  1. Go to the web site: http://www.waxmail.biz
  2. Choose the correct download based on whether you are using Outlook or Outlook Express and click it.
  3. Follow the download instructions and on step 3 click the download button.
  4. Save the file to where ever you want.

Step 2 – Install WaxMail

  1. Make sure Outlook or Outlook Express is closed.
  2. Run the downloaded executable: setup_waxmail_1_0_0_40.exe
  3. Follow the installation instructions.
  4. Finish.

Note: I use Outlook at work, so I am going to show you an example using Outlook. I am not going to post an example using Outlook Express but it should be similar.

Step 3 – Use WaxMail to send a Voice Email

  1. Open Outlook or Outlook Express. You should now have a WaxMail toolbar.

  2. Click New WaxMail. You get a new email message and the WaxMail voice recorder show up.

  3. Click big red Record button and talk into your microphone.
  4. Click Stop when you are finished talking.
  5. Click the rename option and rename the voice file. The voice message is named something generic and you can see it in the WaxMail tool in a white box and there is a Rename and a Delete button
  6. In the email under To: enter the recipient.
  7. Also give the email a valid Subject.

    It should now look something like this:

  8. Click Send.

The one thing that I don’t like is that this line is appended to all emails unless you purchase WaxMail.

Tired of typing emails? WaxMail lets you record and send voice messages via email. Get your free copy from www.waxmail.biz

I looked for an open source or free version without advertising and that didn’t cost any money, but I couldn’t find one. If you find one, please let me know, otherwise you have live with the ad.

Windows 7 64 bit VPN Client – ShrewSoft

Ok, so I couldn’t get Cisco’s VPN client to work for Windows 7 64 bit. So I went in search of another VPN solution that would be more compatible.

(UPDATE: I got ShrewSoft’s VPN Client working, so keep reading down below.)

I came across ShrewSoft’s VPN Client a while ago, but it originally blue screened my Windows 7 box, but it was a version that didn’t support Windows 7. However they have a new version that is out that is for Windows 7 64 bit. Actually they now have a release version on their download site but there is a beta of the next version (Update 3/05/2010)2.1.6-beta-6 that your may want to use (or a later version if you are reading this well after I wrote or updated it). See the comments on why.

I installed it and it requested a reboot so I rebooted, and the first good news is that I didn’t blue screen when my workstation booted up. Horray!!!

After installing, I tested undocking my laptop from its docking station and then docking my laptop, and again, no blue screens, so I think it is good to go. Now I just have to figure out how to configure it to connect here at work.

I like the license, they say:

The Shrew Soft Client for Windows is free for both commercial and private use. Please read below for complete license details. Click here…

Stay tuned for more testing….

Ok…I am back for more notes.

At work we are using a Cisco VPN solution, so it turns out that when my Cisco VPN would install on a 32 bit machine, it used a .pcf file. Well, guess what is awesome about ShrewSoft’s VPN Client? It can import a .pcf file.

I imported the .pcf file and I appear to connect, then disconnect. Not sure what is going on. I am at work, but I should be able to connect to the VPN while at work, at least that is what my IT staff said.

So hopefully it connects when I am at home.

Here is my log:

config loaded for site ‘MyConfig.pcf’
configuring client settings …
attached to key daemon …
peer configured
iskamp proposal configured
esp proposal configured
client configured
local id configured
pre-shared key configured
bringing up tunnel …
network device configured
tunnel enabled
session terminated by gateway
tunnel disabled
detached from key daemon …

I will try to debug later…

All right I am back again and I am trying to debug. I found this post:
http://lists.shrew.net/pipermail/vpn-help/2009-October/002282.html

There is a program under Start | All Programs | Shrew Soft VPN Client called “Trace Utility” that is installed with the Shrew Soft VPN Client can be used for debugging. However, it wouldn’t work for me. The buttons weren’t enabled.

I had to right-click on the “Trace Utility” shortcut and choose “Run as administrator” then I was able to turn on debugging.

Positives for Shrew Soft VPN Client
– It has a debugging utility.
– It supports Windows 7 64 bit
– It imports cisco .pcf files.
– There is a lot of documentation.

Negatives for Shrew Soft VPN Client
– I don’t have it working yet
– There is not really any clear failure reason for a user.

So I will keep at it. I think I am about going to email the developer, but I sure don’t want to bug him.

Hopefully for some of you, it worked first time for you when you imported the .pcf file.

Got it working

Another positive. The developer has a mailing list, as you saw with one of my links above. I found this link:
http://lists.shrew.net/pipermail/vpn-help/2009-October/002275.html

The key piece of information I needed was this:

If it gets to the ‘tunnel enabled’ point, that means you completed phase1, Xauth and modecfg negotiations. Its probably a phase2 option. As I mentioned to others on the list, try playing with the PFS setting or enabling the cisco-udp NAT-T option.

In the tool, after importing my .pcf file, I only had to make one configuration change. I had to change the PFS setting to “group 2”. See this screen shot.

VPN Setting

So I have this working now.

I have to say that I am very impressed with Shrew Soft. It took me some time to figure it out, but it works. Now the only question time will tell is how stable it is. Expect an update in a week or two about whether I think the Shrew Soft VPN Client is stable.

The steps are easy for me to connect to my VPN at work. Now every VPN is different so I am sorry if these steps don’t work for you:

  1. Use the correct (and latest) version: 2.1.6-beta-6 or later
  2. Install Shrew Soft VPN Client
  3. Reboot.
  4. Import the .pcf file.
  5. Modify the configuration and change the PFS setting to “group 2”.
  6. Apply the configuration.
  7. Click connect.
  8. Enter your domain user and password and you will connect.

Success!!!!

Also, I exported my configuration as a Shrew Soft VPN Client export, which is a .VPN file. When I import it, I don’t have to make a configuration change like I did with the Cisco .pcf file.

Key words: cisco vpn window 7 64 bit