Monday, July 21, 2008

A generic error occurred in GDI+.

OK - sometimes I am a little slow.
One of the reasons I decided to maintain a blog was to help myself remember those peculiar idiosyncrasies when scripting. Well shame on me....

My script was working fine until I added the most important piece (from a customer perspective) - the pretty chart. I am a big fan of PowerGadgets and try to utilize them wherever possible. Well, when I added Out-Chart with an output parameter, I received the ambiguous error, "A generic error occurred in GDI+".

So naturally, I pulled up Google and started searching. I vaguely recalled seeing this before but couldn't quite put my finger on it. Then I saw it. ....Permissions....

Yes! Now I remember. If the UNC path I am trying to save my chart to is wrong or permissions are not configure properly, I get the error.

Lesson Learned:

  1. Verify your UNC path before throwing it into your script.
  2. Use your blog!

Monday, July 14, 2008

Resolved! Conflict between PrimalScript and PSCX

On a couple workstations we noticed a conflict between PrimalScript Enterprise and the Powershell Community Extensions (PSCX). PrimalScript would throw an error and terminate when opening a file with a .ps1 extension.


I posted a follow-up on the Codeplex discussion board. Oisin quickly responded with a fix.

Hey guys,
Look for the line in your Pscx installed $profile that says:
Start-TabExpansion and comment it out with a #. This will workaround the problem.
- Oisin

Bingo! Now I can continue using PSCX (if you are not, you need to take a look) with PrimalScript. Thanks Oisin!

Thursday, July 3, 2008

Unable to use SourceSafe LAN service, performance of SourceSafe operations will not be optimal

When trying to utilize Microsoft Visual SourceSafe 2005 (VSS) with Sapian's PrimalScript Enterprise, I was getting the following warning, "Unable to use SourceSafe LAN service, performance of SourceSafe operations will not be optimal". Well we can't have that! To remedy this, you need to enable the LAN service on the VSS server.
  1. On your VSS server - Go to Microsoft Visual SourceSafe Administration
  2. Click on the Server menu item
  3. Click configure
  4. In the Server Configuration dialog box, select LAN
  5. Check the Enable LAN service for this computer.