Programming

AnkhSVN and Google Code

Recently I was trying to commit to my Jango Desktop project hosted on Google code. I was using AnkhSVN and I kept getting an error similar to:

SharpSvn.SvnRepositoryIOException: Commit failed (details follow): ---> SharpSvn.SvnRepositoryIOException: Server sent unexpected return value (405 Method Not Allowed) in response to MKACTIVITY request for

If anyone else runs into this issue I was trying to commit to the read only repository. An easy way to tell if this is your issue is to look at the repository url. Google’s commit repository starts with https: // not http://

If this is your issue log into Google code to obtain the correct repository url.

Tags: , , ,

Thursday, October 14th, 2010 Desktop Enginnering, Programming No Comments

VBscript Permission Denied 800A0046 Solution

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.

Tags: , , , , , , ,

Friday, June 26th, 2009 Desktop Enginnering, Programming 8 Comments

Creating a Single Instance C# Application

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?

Tags: , , , ,

Tuesday, May 19th, 2009 Programming, Software 1 Comment

Custom Free Silent LogMeIn Installer.

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.

Tags: , , , ,

Visual Studio Tips and Tricks

Alternate Case/Format selection:

Have you ever been asked to update some code from a long time ago only to find that almost every tag is in capital letters?  AGHH!

<HTML>
<HEAD>
<TITLE>My Really Old Site</TITLE>
</HEAD>
<BODY>
<P> Lots of body test </P>
<P> Lots of body test </P>
<P> Lots of body test </P>
<IMG SRC="mypic.jpg" width=351 height=113>
</BODY>
</HTML>

Highlight all that code and press CTRL + K then CTRL + F and you will format all the code. It would then look something like this

<html>
<head>
<title>My Really Old Site</title>
</head>
<body>
<p>
Lots of body test
</p>
<p>
Lots of body test
</p>
<p>
Lots of body test
</p>
<img src="mypic.jpg" width="351" height="113">
</body>
</html>

Granted your code may still be far from perfect, but it is definitely a huge help.

Key Launcher (Like Alt + Tab on Windows)

Are you someone that lives by keyboard shortcuts? I know I am.  Are you familar with Windows Alt + Tab keyboard shortcut and toggling through all active programs? Well a similar feature exists within Visual Studio press Ctrl + Tab and toggle through your active Windows and Files.

Visual Studio Ctrl + Tab

Intellisense

Control + Spacebar will bring up intellisense if you are in code view. Great if you click out by accident or you just want to see what is available in the scope of the code.

Visual Studio Intellisense

Break Points

Have a bunch of break points scattered over a couple of files in a solution. Just want to delete them all and start fresh. Ctrl + Shift + F9 will delete all current break points in a solution. Don’t worry Visual Studio will prompt you with a confirmation first.

Get Visual Studio Professional for free!

Well maybe. If you are a student like myself you can head over to https://www.dreamspark.com/which is run by Microsoft. They offer full versions of some of the newest Microsoft products, like Visual Studio. Why? Because they know we are the future and they think we are an investment. Take them up on the opportunity and get ahead of the competition.

Shortcut key posters:

Microsoft Visual Studio has a bunch of keyboard combinations that can be very helpful, to get a more complete list check out some of the resources Microsoft offers:

Visual Studio Key Reference Posters

Visual C# 2008 Keybinding Reference Poster

Visual Basic 2008 Keybinding Reference Poster

Visual C++ 2008 Keybinding Reference Poster

Visual C# 2005 Keyboard Shortcut Reference Poster

Visual Basic 2005 Keyboard Shortcut Reference Poster

Visual C++ 2005 Keyboard Shortcut Reference Poster

Tags: ,

Wednesday, May 6th, 2009 Programming, Software, Web Design 1 Comment