When I was working as a Desktop Support Technician in college, I wrote a .NET C# Dell service tag finder because I dealt with well, many Dell computers. I decided to write a little program that I could carry on my flash drive with me and all my other technical applications. What I like most about this application is the ability to quickly get to the Dell Warranty and driver information. I hope that someone else finds this useful as well, if you do let me know.

DellServiceTagFinder

Download Dell Service Tag Finder: Source | Executable

This is was possible using Windows Management Instrumentation and if you are interested in pulling other information from your computer I recommend you read up on it. For this example, I used the Win32_BIOS Class, but you can find all the WMI Classes here.

Preview of Source:

        String dellServiceTag;

        private void Form1_Load(object sender, EventArgs e)
        {
            //Load Service Tag
            ManagementClass wmi = new ManagementClass("Win32_Bios");
            foreach (ManagementObject bios in wmi.GetInstances())
            {
                dellServiceTag = bios.Properties["Serialnumber"].Value.ToString().Trim();
            }
            Display.Text = dellServiceTag;
        }

Notes:

This application requires the .NET Framework or you may receive application errors.

The service tag is pulled from the BIOS so if you ever had your motherboard replaced and the service tag was not reset it will be blank.

The service tag is really the Serial of the machine, so other models such as HP will display the Serial, but the express code will be wrong. I will look into this when I have multiple machines to test on.

I was helping a friend write some VBscript the other day. I was trying to write a simple copy function and I kept getting permission denied. However I was logged in locally as the administrator so that could not be it.

My code looked something like:

Sub CopyFile(source, destination)
	set filesys=CreateObject("Scripting.FileSystemObject")
	If filesys.FileExists(source) Then
	   filesys.CopyFile source, destination
	End If

End Sub

The Solution is: add “\” add the end of any of your path names like
Dim destinationpath
destinationpath = “C:\” & myfolder & “\”

Hope this helps someone else.

This is something I find myself looking up alot so I decided to put it into a post for easy access, and for anyone else who might be looking for a solution.

using System.Threading;
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        { 

            bool createdNew = true;
            using (Mutex mutex = new Mutex(true, "SignleInstance", out createdNew))
            {
                if (createdNew)
                {
                    Application.EnableVisualStyles();
                    Application.SetCompatibleTextRenderingDefault(false);
                    Application.Run(new Form1());
                }
            }

        }
    }

Download Single Instance Application Source Code

I still don’t get why in Visual Studio in VB.NET one could click make single instance application, but that same feature doesn’t exist in C#? Don’t all .NET languages just get compiled to the CIL in the end?

So there are already a few guides out there on how to make a Silent(In the sense that it don’t ask you for your username and password) LogMeIn installer. I am going to show you the way I do it with step by step instructions so that anyone can follow.  This tutorial will be broken into two parts. Part 1 is for customizing the LogMeIn installer. The second part is for making your own. Disclaimer this tutorial is for educational purposes only.

Part 1 – Customizing the Installer:

Last updatede on September 17, 2009 to reflect the newest version of LogMeIn version 4.0.0.966 (Sep 5 2009)

Get the tools that you will need to complete this job:

Download Orca – Orca is a MSI editor. It allows you to change the title and text of any MSI installer.
LogMeIn.com – Log into your LogMeIn account and download the installer. 

Download me in installer to a folder on your desktop. Make a copy and name it LogMeInClean.msi incase you corrupt your installer and have to restart.

Step 1: Edit the OnInstallExecuteSequence Table:

Find the installer you just downloaded and right click on it and select “Edit with Orca”

Find InstallExecuteSequence under the table list on the left hand side, then do the following: 

  1. Select GetDeployInfo under the action list. 
    Change: UILevel=2 AND UPGRADEPRODUCT<>1 AND InstallMode<>”Remove”
    into: UPGRADEPRODUCT<>1 AND InstallMode<>”Remove”         

  2. Right click on the right panel and select “Add Row”:
    ACTION: GetLMIRegistrationCookie
    CONDITION: NOT Installed
    SEQUENCE: 3710         

  3. Right click on the right panel and select “Add Row”:
    ACTION: LMIGetLicense
    CONDITION: NOT Installed
    SEQUENCE: 3730         

  4. Select CreateUser under the action list. 
    Change: CANCREATEUSER AND PASSWORDSOK=”true” AND VersionNT AND REMOVE<>”ALL”
    into: VersionNT AND REMOVE<>”ALL”         

  5. Select CreateUserSetProperty under the action list. 
    Change: CANCREATEUSER AND PASSWORDSOK=”true” AND VersionNT AND REMOVE<>”ALL”
    into: VersionNT AND REMOVE<>”ALL”         

  6. Right click on SetX64Path and select “Drop Row”
    Right click on SetX86Path and select “Drop Row”

Find Property under the table list on the left hand side, then do the following: under the table list on the left hand side, then do the following: 

  1. Select LICENSETYPE under the action list.”
    Change: 5
    into: 0       
  2.  Right click on DEPLOYID and select “Drop Row” Important note, since installers can be reversed make a LogMeIn account which only has the ability to add computers, then move them out of that user’s name.  Once they are installed. Use this account for the following steps.  To make an account login to your LogMeIn account and click users on the left hand side. Then add a new Administrator, and give that account the ability to Deploy Computers. When a new computer is added you will want to edit that user and remove rights to that computer if you choose to do it this way.
     
  3. Right click on the right panel and select “Add Row”:
    property: USEREMAIL
    value: Your account’s email address  

  4. Right click o n the right panel and select “Add Row”:
    property:USERWEBPASSWORD
    value: Your account’s web login password
         

  5. Right click on the right panel and select “Add Row”:
    propertyUSERPASSWORD
    value: Password if no windows password present         

  6. Right click on the right panel and select “Add Row”:
    property: USERVERIFYPWD
    value: Password if no windows password present If you need to configure LogMeIn for a proxy look for the proxy settings in the action list.       

     

Then in Orca click File then Save. Make sure you do save and not save as, this is because Orca only saves the different changes, if you notice you have a tiny file like .5mb then you did it wrong. 

  

Part 2 – Making the Installer:

Get the tools that you will need to complete this job:

Download Inno SetupInno Setup is a free installer for Windows programs. 

Download the Setup Kit – A simple kit I have put together for you to create a custom installer. Change the images to meet your needs.
That is it, make sure you leave your comments.

 

Most of this information came from http://www.msfn.org/ by writting this post I hope to save you from digging through 8 pages of post, and give you the most relavent information for the newest version of LogMeIn.

 
Edit:
08/02/09:
Thank you Dale for pointing out a spelling mistake and an error.

Akismet

Many avid bloggers are already familiar with Akismet and rightfully so.  Akismet does an amazing job of eliminating spam. It will catch 99% of spam and put it in the spam queue.  Head over to http://akismet.com/ and install Akismet. You will need to sign up for a WordPress account and get an API key. Don’t worry it takes 2 seconds and is worth it. Once Akismet is installed need to go to your Akismet Configuration, which is under plugins, and enter your WordPress API key. There is also a check box label “Automatically discard spam comments on posts older than a month.”  I chose to uncheck this. With this checked if Akismet detects spam on a post you wrote over a month ago it will just delete it. While Akismet is really good there is a chance you could lose some legitimate comments. If you combine this plugin with the one below there is really no use for this. However the choice is yours.  After that it is just a matter of waiting and letting Akismet do its work.

Akismet will install a little control panel to view statistics it will look something like this:

Akismet Control Panel

From the WordPress dashboard you will want to check your Spam Queue to make sure that no legitimate messages get through. It does not happen often, but it does.

WP-Ban

Akismet does an amazing  job of stoping spam comments from getting to your inbox. How about stoping spam before it ever gets submitted? That is were WP-Ban comes in. WP-Ban can be found at http://wordpress.org/extend/plugins/wp-ban/

Basically this can be used to block anyone from ever viewing your blog on the IP level.  Granted many spammers will jump though proxies and use 10 different IP’s in a minute. I noticed that I was getting 100’s of spam comments from 1 or 2 IP addresses. I would block that one IP for example the following 4 IP addresses accounted for over 400 spam comments in a day:

194.8.75.149
194.8.75.163
194.8.75.220
194.8.74.220

Blocking those 4 IP address pretty much stopped my spam.

I would be very selective in blocking IP addresses, do not use ranges and never block your own IP.  Over the past week I have seen spam almost stop dead in it’s tracks.