Skip to main content

Posts

Showing posts from June, 2008

Fixing VBox guest lossing networking connection

When playing around with Virtual Box guests running Linux, the network connection my get lost on Debian Etch when the virtual interface's MAC changes. This is due to the fact that this version of linux is using udev and fortunately udev detects changes to MAC address. So basically, each new network interface with new MAC address gets its new ethx network interface device name. In my case, I got 3 ethx's already so I need to get rid of the unnecessary interfaces. As a root do this: $: su #: cd /etc/udev/rules.d #: mkdir ~/bak #: cp zxx_persistent-net-generator.rules ~/bak #: rm zxx_persistent-net-generator.rules #: /etc/init.d/udev stop #: /etc/init.d/udev start Note that we make a backup of the file just in case we need to go back. Also, for zxx_persistent-net-generator.rules, xx is any two digit number. So just go check the directory for a file that resembels *_persistent-net-generator.rules. Now to prevent udev to generate new interface for every new MAC address for Virtu...

Detecting Classic Start Menu or Start Menu

On some of our regression tests, we need to check that all shortcuts that our product created under Windows Start Menu is working. One of the challenge this one presents is that user can set it to either "Classic Start Menu" or the new XP style Start Menu. Since our organization likes to use Visual Tests, I was looking for a way to detect what is the current style of Start Menu, hence the script below was born: 'Refs 'http://www.themssforum.com/VisualBasic/SHGetSetSetting-SHELLFLAGSTATESHELLSTATE/ 'http://msdn.microsoft.com/en-us/library/bb762200(VS.85).aspx 'http://msdn.microsoft.com/en-us/library/bb759788(VS.85).aspx Option Explicit Private Declare Sub SHGetSetSettings Lib "shell32" _ ( ByRef lpSS As Byte , ByVal dwMask As Long , ByVal bSet As Long ) Const SSF_STARTPANELON = &H200000 Public Function IsXpMenuStyleOn () As Long ...