Sunday, December 29, 2013

Xamarin Studio: F# project does not work with message "Build failed. MSBuild operation failed"

Followed installation instruction from to install F# using option #2. Installation was not smooth (could be because of my internet connection). Retried several times with few workarounds (delete corrupted files, install files manually, etc).

Tried to create a new F# project with all default values, running it failed with the message

Build failed. MSBuild operation failed
Build: 1 error, 0 warnings

Took me several days (tried several minutes a day to check logs, tweak settings, etc). Finally found a workaround. In Project | [project] Options | Main Settings, ensure that "Use MSBuild build engine (recommended for this project type) is unchecked.

Xamarin Studio
Windows 8.1

Friday, November 01, 2013

Starting Virtualbox guest shows VERR_SSM_LOAD_CONFIG_MISMATCH

The host machine experienced a power failure, when a guest machine was started up it failed with error message below.
Failed to open a session for the virtual machine MACHINENAME.
ahci#0: The target VM is missing a device on port 0. 
Please make sure the source and target VMs have compatible 
storage configurations [ver=6 pass=final] (VERR_SSM_LOAD_CONFIG_MISMATCH).
It seems like Virtualbox virtual machine configuration was corrupted. Looking at the virtual machine settings noticed that the virtual HD attached to the SATA port was gone.

To workaround this case, re-attached the latest snapshot to the VM. Use Virtual Media Manager to determine the correct UUID.

Mounting Samba share in Windows 7 yields System error 58 has occured

Got a Windows 7 SP1 32-bit Pro machine that have seen various large applications already. So I am not sure if the security policy of the machine is the default. When trying to mount a Samba share got the error message below.
System error 58 has occurred.

The specified server cannot perform the requested operation.

This was done via net use \\<ip>\share. Mounting the share via Windows Explorer yields nothing, just a long wait for nothing.

The fix for my case was to change Security Settings | Local Policies | Security Options | Microsoft network client: Digitally sign communications (always) to disabled. You have to reboot the machine for the changes to take effect.


Sunday, September 15, 2013

Windows 8.1 Pro RTM auto-resize guest display not working in VirtualBox 4.2.18

Microsoft changed course and released Windows 8.1 to MSDN and TechNet users earlier than planned. It was made available last Sept 8, 2013. This got me excited to play with this latest version. Downloading the ISO was quite frustrating as I can't use Firefox Download Them All plugin, just does not work. Downloading via IE10 was also painful but there is a workaround.

VirtualBox also released 4.2.18 last Sept 6, 2013. This must be good, two good products released in the past few days.

Upgrading of VirtualBox didn't work the first time. I have to do a repair to get it to work. So essentially, I have to install it twice.

Installing of Windows 8.1 into VirtualBox was nonevent. But getting guest additions was challenging. I had to read lots of blogs including VirtualBox 4.2.18 release forum discussion topic.

So, how did I get guest addition auto-resize to work? I have to install guest additions *twice*!

This is what was working for me:
  1. Install guest additions... then reboot.
  2. After reboot auto-resize was still not working.
  3. Install guest additions again.... then reboot.
  4. This time auto-resize worked.
Note: VM guest configuration was pretty much default. No 3D/2D acceleration was enabled.

Saturday, September 14, 2013

XFCE: Install a lighter weight version of XFCE in Ubuntu 13.04

Default XFCE 4 install in Ubuntu comes with a lot of applications that I don't need. So I always install from alternate method using mini.iso to have a bare bones system and yet usable. I have been using LXDE for a while but I think it is time to experiment with XFCE. From a minimal install of Ubuntu, adding XFCE with minimal applications is a breeze, like:

$: sudo apt-get install --no-install-recommends xubuntu-desktop

XFCE: Remove Mail Reader entry in menu

How to remove Mail Reader entry in XFCE menu.
  1. As a matter of good practice, backup the original configuration. Create a backup folder in your home directory like ~/backup.
  2. Copy /usr/share/applications/exo-mail-reader.desktop to ~/backup.
  3. We will be making global (machine level) change so all users will not see Mail Reader entry. Edit exo-mail-reader.desktop using your favorite editor, comment out the line like #OnlyShowIn=XFCE; then add the following line NotShowIn=XFCE;.

XFCE: Installing application that responds to PrintScreen

I have installed a lighter weight version of XFCE in Ubuntu 13.04 (link). This does not have Print Screen support by the default, like pressing Prt Scr does nothing. To get it to work install xfce4-screenshooter like:
$: sudo apt-get install xfce4-screenshooter

Saturday, September 07, 2013

PowerShell Quick Tips: Get membership of a given Windows user

timus - is the user you want to get membership
mydomain - domain name or PC name if workgroup

Powershell Quick Tips: Get currently logged on user


Monday, September 02, 2013

Sunday, September 01, 2013

Enable directory browsing for IIS 8 Server Express

Visual Studio Express 2012 for Web Update 3 comes with IIS 8 Server Express. By default, the server is configured not to list directory contents for security reasons. But since I am using it for development purposes, security is not my main concern but speed of development.

When trying to browse a directory, you may get this error message:

HTTP Error 403.14 - Forbidden The Web server is configured to not list the contents of this directory.

To enable browsing do:
  1. Open console (cmd.exe)
  2. Change directory to C:\Program Files\IIS Express
  3. Type appcmd set config /section:system.webServer/directo
    ryBrowse /enabled:true
    to enable browsing.

Powershell Quick Tips: Running scripts SCVMM scripts

Open Virtual Machine Manage Command Shell. From the shell type:
C:\Users\User01\Documents\script1.ps1 - the script to be run

Saturday, August 31, 2013

Powershell Quick Tips: Generate GUID

Open all users startup folder in Windows 8

Using Run dialog (WinKey+r), type:
shell:common startup
or from the command line (cmd.exe) do:
explorer.exe shell:common startup


Using Winmerge to do compare and merge operation in VS 2010

Details on how to configure Visual Studio to use WinMerge for merge and compare operation is documented in

Powershell Quick Tips: Get details of network interface

Ethernet 3 - is the name of the interface

This will need Powershell 3.0 or later

PS Quick Tips: Change Primary DNS Server of a network interface

10 - is the interface index. This can be found by running Get-NetAdpater, this will be the column named ifIndex.
("") - is the DNS server address(es) you want to assign to that interface, this is a comma separated list.

This only works on Powershell 3 (or maybe later).


VirtualBox paravirtualized network adapter driver

From VirtualBox manual, paravirtualized network adapter provides the best performance. To get this interface from working within VirtualBox, you need to download the drivers separately/manually. Note that Windows driver online update utility does not have it as well.

Since driver is open source it can be found in few locations. A good source is from Red Hat, download it from this location Download virtio-win*.iso, mount it and install driver for your OS.

VBA: Using FileSystemObject to create a file

Sample code to create a file in VBA using FileSystemObject which is part of Microsoft Scripting Runtime. See this link on how to reference MSR.
Option Explicit

Sub TestMe()
    Dim fs As FileSystemObject
    Dim ts As TextStream
    Set fs = New FileSystemObject
    Set ts = fs.CreateTextFile("C:\tmp\file.txt", True)
    ts.WriteLine "Header1, Header2"
    ts.WriteLine "1," & CStr(DateTime.Now)
    Set ts = Nothing
    Set fs = Nothing
End Sub

Friday, August 30, 2013

Referencing Microsoft Scripting Runtime for FileSystemObject class in VBA IDE

From Visual Basic for Applications IDE, do Tools | References... then look for Microsoft Scripting Runtime or browse for C:\Windows\System32\scrrun.dll.

Microsoft  Scripting Runtime provides the following classes:

  • Dictionary
  • Drive
  • Drives
  • Encoder
  • File
  • Files
  • FileSystemObject
  • Folder
  • Folders
  • TextStream

Excel 2013 enable developers toolbar

Do File | Options | Customize Ribbon | select Developer option.

Sunday, August 18, 2013

Powershell Quick Tips: Get hostname from IP address

PS C:\>[System.Net.Dns]::gethostentry("")

Powershell Quick Tips: Start an interactive session on a remote computer

For the Linux/Unix geeks, ssh is preferred way to establish an interactive session to a remote machine. In Windows ssh can also be used but you have to install extra software. To perform interactive task on remote machine (though not as cool as ssh) one can try Powershell. So, to connect to a remote machine MACHINE1, do:

PS C:\>Enter-PSSession -ComputerName MACHINE1

For this to work, you need to have proper credentials on MACHINE1 (I have only tried with users members of domain admins).

TF259641: To use the environment, you must install a compatible test agent in all machines of the environment. Click 'Install Agents' to complete this task.

On a small domain test system that is connected to a production domain, see below for the network architecture, creating a new test environment with workgroup computers may not deploy the VS Test Agent 2012 properly.

The reason automatic deploy is not working is that the Test Agent deployed on the workgroup machines will try to contact the Test Controller located on another domain (DOMAIN1) but will not resolve as the Test Agents DNS server entries are configured from a DCHP connected to production domain.

You will typically get the following error message.
TF259641: To use the environment, you must install a compatible test agent in all machines of the environment. Click 'Install Agents' to complete this task.

In the workgroup machines, modify the IP (v4) Properties to point DNS of DOMAIN1. 

- TFS 2012 Update 3
- SCVMM 2012 Sp1
- Lab Manager 2012 Update 3

scrot - command line screen capture utility for minimal Lubuntu install

I have a minimalist installation of Ubuntu 13.04 using Lubuntu minimal package. By default it does not come with screen capture utility. To get Print Screen function working in Lubuntu, install scrot, like:

$$: sudo apt-get install scrot
Pressing PrtSc in Lubuntu will cause it to create a file in the home directory normally named <date>_<screen resolution>_scrot.png.

In Ubuntu 13.10, you have to run scrot first before PrintScreen works.

Saturday, August 17, 2013

TF259137: The following account does not have sufficient permissions to complete the operation: domain\user. The following permissions are needed to perform this operation: Create.

When importing virtual machine in MTM Lab Center you may encounter error message below:

TF259137: The following account does not have sufficient permissions to complete the operation: domain\user. The following permissions are needed to perform this operation: Create.

From what I know there is no UI that would allow the TFS admin to grant the necessary privileges related to library management. To fix this, do:

  1. Open a console where tfslabconfig.exe. In VS 2013 with MTM installed, it is located in C:\Program Files\Microsoft Visual Studio 12.0\Common7\IDE.
  2. Run the following command:
  3. TfsLabConfig Permissions /collection:http://[TFSMachineName]:8080/TFS/DefaultCollection /user:domain\user /allow:create,Read,ManageLocation,Write,edit,delete,start,stop,ManagePermissions,ManageChildPermissions,Pause,ManageSnapshots
Of course you have to replace [TFSMachineName] with the name of your TFS Server and this has to be run by user with TFS admin rights. You also have to change DefaultCollection and domain\user.


Get Linux user id

Linux user ID can be used in say mounting a CIFS share, see link. To get user id, do:
$: id timus
This will print UID and GID of user timus.

Check version of VirtualBox guest additions installed

$: locate vboxguest
If this returns nothing either you don't have VirtualBox guest additions installed or you need to update the database used by locate. If you suspect that the database may need a refresh, you can do sudo updatedb.

Alternatively, you can check contents of /opt. If you have the additions installed, it should have an entry like VBoxGuestAdditions*.

Friday, August 16, 2013

Mounting a Windows share using smbfs with read-write access

To mount a Windows share using smbfs do the following:
#: mount -t cifs -o username=your_user_name,uid=1000 //machine_name/share_name /mnt/point
Or the old style:
#: mount -t smbfs -o username=your_user_name,uid=1000 //machine_name/share_name /mnt/point
Note here that uid=1000 is not a magic number but rather your linux userid. You can get this value from passwd file normally located in /etc/passwd. The user with uid=1000 should be able to manipulate files pointed to by //machine_name/share.
And when connecting to a share that is mananged by Active Directory, need to escape the backslash for it to work, e.g.:
#: mount -t smbfs -o username=domain-name\\username,uid=1000 //machine_name/share_name /mnt/point

Need to install smbfs for this to work, like (Debian/Ubuntu):
#: sudo apt-get install cifs-utils


Sunday, August 11, 2013

ERROR: No configuration file found when booting Ubuntu 13.04 using USB stick

I created a boot-able network install of Ubuntu 13.04 on USB stick using Pendrive's Universal USB Installer (Universal-USB-Installer- Booting this USB stick on my old Eee PC 900 shows "ERROR: No configuration file found". To fix this rename/copy isolinux.cfg to syslinux.cfg.

As an alternative to Universal USB Installer, you may try Unetbootin(


PS Quick Tips: Format datetime with milliseconds

(Get-Process)[0].StartTime.ToString("yyyy/MM/dd HH:mm:ss.fffff")

This displays when the process at index zero was started with milliseconds information

Saturday, August 10, 2013

PS Quick Tips: Display service start times

Get-WmiObject win32_service | Where-Object {$_.State -eq "Running"} | ForEach-Object {Write-Host ((Get-process -id $_.ProcessId).StartTime)","$_.PathName","$_.DisplayName}
Run this in elevated prompt to get correct information.

Get-WmiObject win32_service | Where-Object {$_.State -eq "Running"} | ForEach-Object {Write-Host ((Get-process -id $_.ProcessId).StartTime.ToString("yyyy/MM/dd HH:mm:ss.fffff"))","$_.PathName","$_.DisplayName}
This add milliseconds to the service information

Wednesday, July 17, 2013

Installing TFS 2012 Update 3 screen capture tour

Below are screen captures installing TFS 2012 Update 3 using the default configuration.

Saturday, July 13, 2013

Get file version using WMIC

c:\> wmic datafile c:\\windows\\system32\\cmd.exe get version

Change cmd.exe to the file that you want to get the version information. Note here that we are using double backslashes, that is required by WMIC to escape the backslash character.

Tuesday, July 09, 2013

Booting to BIOS in VMware Workstation 9

I have grown accustom to drilling down to several layers of menus and options in VMware vSphere (ESXi) so that I can boot the VM to the BIOS. I did the same thing in VMware Workstation 9 and could not find it where I was expecting it. Surprise... surprise it is actually in the main menu.

Saturday, July 06, 2013

Windows 8.1 now supports 4 different tile sizes.

Back in Windows 8.0, tiles can be either small (smaller) or large (larger). Now in Windows 8.1 Preview, a tile can be small, medium, large, or wide. Small tile does not show application name at all, so can be confusing if you are not familiar with the applications. Medium is what used to be the "smaller" version and Wide tile is equivalent to Larger. Large is one of the new sizes. See below for screen captures showing different sizes for Desktop tile.

Android Studio Early Access Preview installation tour

Android Studio is a new Android development environment based on IntelliJ IDEA. Similar to Eclipse with the ADT Plugin, Android Studio provides integrated Android developer tools for development and debugging. On top of the capabilities you expect from IntelliJ, Android Studio offers:
  • Gradle-based build support.
  • Android-specific refactoring and quick fixes.
  • Lint tools to catch performance, usability, version compatibility and other problems.
  • ProGuard and app-signing capabilities.
  • Template-based wizards to create common Android designs and components.
  • A rich layout editor that allows you to drag-and-drop UI components, preview layouts on multiple screen configurations, and much more.
This was tested on:
  • Windows 7 64-bit Pro
  • JDK 1.7 update 25 64-bit
Workaround(s): Android Studio bundle 130.677228 gets confused when multiple versions of JDK are installed on the machine. To workaround set JAVA_HOME and PATH environment variables accordingly. For example, set JAVA_HOME to "C:\Program Files\Java\jdk1.7.0_25" if you have installed JDK 1.7 update 25. Also, change PATH="C:\Program Files\Java\jdk1.7.0_25\bin";"existing path here".

Installation steps:
  1. Download JDK 1.7.
  2. Install JDK.
  3. Change/set JAVA_HOME environment variable.
  4. Download Android Studio Early Access Preview (link).
  5. Follow installation wizard. 
 See below for installation screen captures.

Cannot install VirtualBox Guest Additions in Windows 8.1 Preview

When installing Windows 8.1 Preview from ISO, I am unable to install Guest Additions. Below is the error message.

The search is on how to fix or find a workaround for this issue.

- Even running in compatibility mode is not working
- This is now working on VirtualBox 4.2.16 (Type=Microsoft Windows, Version = Windows 8.1)


Friday, July 05, 2013

Disable grouping of files in Windows Explorer

I am not a fan of Windows 7 Explorer grouping feature. It makes the list of files cluttered and not easy to navigate or find object. See below for a screen capture.
 Anyway, to disable that feature, press Alt to show Windows Explorer menu, then select View | Group By | None.

Thursday, July 04, 2013

Adding existing user to a group in Ubuntu

Example below adds user timus to the group www-authors

$: sudo usermod -a -G www-authors timus

To add user timus to sudoers group, do:

$: sudo usermod -a -G sudo timus

Note that for the sudo to take effect you have to logout and log back in.

Tested on:
- Lubuntu (13.04)
- Ubuntu (12.04 - 13.04)


HowTo: Install wxPython in Lubuntu

How to install wxPython in Lubuntu (13.04)

$: sudo apt-get install python-wxgtk2.8 python-wxtools wx2.8-doc wx2.8-examples wx2.8-headers wx2.8-i18n

Applicable to:
  • Ubuntu
  • Kubuntu
  • Linux Mint
  • Debian
  • Other Debian derivatives

HowTo: Create new user in Lubuntu

How to create new user in Lubuntu from the console (applicable to Ubuntu/Debian/Debian derivatives)
$: sudo adduser new_user_name


HowTo: Delete user in Lubuntu

How to delete a user in Lubuntu (applicable to Ubuntu/Debian/Debian derivative)

$: sudo deluser user_to_delete


Monday, July 01, 2013

SQL Server 2012 SP1 Installation step by step

SQL Server 2012 Sp1 Standard installation step by step screen capture. This was done on a Windows Server 2008 R2 64-bit operating system in Hyper-V VM with 4GB of memory.