February 2007 - Posts

These instructions show how to stop the McAfee Anti-Virus 8.5i splash screen appearing everytime you start Windows.

WARNING: You should backup your files before editing the registry. If you use Registry Editor incorrectly, you can cause serious problems that may require you to reinstall your operating system.  Use Registry Editor at your own risk.

  • You may need to first temporarily disable McAfee from blocking changes to McAfee settings.
  • To do this, open the McAfee VirusScan Console and right-click on Access Protection and select Properties.
  • Select Common Standard Protection and uncheck Block for Prevent Modification of McAfee Files and Settings. Click Apply.
  • Run regedit
  • Navigate down to HKEY_LOCAL_MACHINE\Software\McAfee\DesktopProtection   
  • Double click bSkipSplash.
  • A "DWORD Editor" window will appear. To skip the splash screen set the value to 1 by entering 1 then clicking OK.

Don't forget to re-check the block setting for "Prevent Modification of McAfee Files and Settings" in the VirusScan console.

 

Posted by gcastner | with no comments

Here is a code snippet for detecting in which Internet browser a user is viewing your site.

Note that I usually use two stylesheets. The first, standard.css, contains the styles interpreted the same way by all browsers. I then use a second stylesheet to add or change any styles rendered differently in different browsers.

In the head tag of the relevant page (a .master page would be a good location) add the following lines (assuming that you use two stylesheets as described above):

<link href="/styles/standard.css" rel="stylesheet" type="text/css" />
<link runat="server" rel="stylesheet" type="text/css" id="stylesheet2" />

In the page_load sub of the same page, add the following code:

'Determine the correct css file depending on the browser

Dim httprequest1 As HttpBrowserCapabilities = Request.Browser

Select Case httprequest1.Browser

Case "IE"
   If httprequest1.Version = "6.0" Then
      stylesheet2.href = "ie6.css"
   End If

Case "Firefox", "Mozilla"
   stylesheet2.href = "firefox.css"

Case Else
   stylesheet2.Href = ""

End Select

In this example, only two browsers are detected but you could of course add more. You can also add additional versions to each browser.

Posted by gcastner | with no comments

This page has moved to http://castnerit.com/blog/?p=85.

Posted by gcastner | with no comments

Here are a number of simple but useful functions for manipulating text in Microsoft Excel. One potential use of these functions is to separate last and first name when they are stored in a single cell. An example Excel file is also attached.

This formula will return the first five characters from the left in cell A2:

=LEFT(A2,5)

This formula will return the total number of characters (including spaces) in cell A2:

=LEN(A2)

This formula will return the number of characters (including spaces) from the left until the first space in cell A2:

=FIND(" ",A2)

To find first names where first name and last name are separated by a space:

=LEFT(A2,FIND(" ",A2)-1)

To find last Names where first name and last name are separated by a space:

=RIGHT(A2,LEN(A2)-FIND(" ",A2))

Posted by gcastner | with no comments