Category Archives: Development

Issues Installing Windows Phone IsoStoreSpy on Windows 8

Windows Phone IsoStoreSpy is a great utility for interrogating the Windows Phone Iso Store when developing applications.  It usually if you want to check to see if files are being created correctly, and identifying what is in a file on the phone’s local store.  IsoStoreSpy can pier into both the emulator and physical device.  It also provides some other functionality like being able to create ringtones, but I haven’t used that.

I had a brand new install of Windows 8 with Visual Studio 2012, and not a lot of old components installed.  This was a fresh install, so the most recent versions of most things were already installed.  When I tried to install IsoStoreSpy with the ClickOnce installation, it error’d out indicating that version 3.5 of System.Data.SqlCE needed to be installed in the GAC.  For some reason it wasn’t, although I would’ve assumed that Visual Studio would’ve had that in there (I believe VS actually installs 4.0).

In order to even install the application, you need this component installed.  I did a little search and found that you can install SQL Compact Edition 3.5 SP1 with a standard MSI for both x86 and x64 versions.  You can download those here.

Once I installed that, I was then able to get the ClickOnce installation going and completing successfully.

Creating an Add-on for Outlook with Add-in Express

Several months ago, I wrote a post on creating an add-on for Internet Explorer using Add-in Express.

I’ll preface this with Office and Internet Explorer both provide the capabilities to build extensions or add-ins that enhance the product experience or add functionality that might be missing from the product.  The process of creating these snap-ins can be extremely challenging since most require that they are coded in a language like C++.  Although it is possible to create them with managed code in C# or Visual Basic, they require a “wrapper” which provides the basis for the snap-in to interop with the application, a difficult and arduous process.

That’s where Add-in Express for Office and .NET comes in.

Whether your preferred language is C# or Visual Basic, Add-in Express enables a developer to waste less time on the wrapper and more time on the actual add-in.  Personally, if I had to figure out how the create the wrapper on my own, I’d never finish an add-in.

SNAGHTML73a2aa3[4]

Introduction

Creating a new add-in is simple.  The wizard that I demonstrated in the Internet Explorer sample is very similar in the Add-in Express for Office and .NET, the exception being that you choose what Office application you are going to integrate with, and what programming language you wish to use.  Once you make your selections, the base application is created.

My Sample Project

I wanted to create a simple example of using an add-in for Outlook to downloads tweets from a timeline in Twitter.  This sample is by no means complete, but demonstrates the ease of use of Add-in Express in creating an Outlook extension.

You can see how I easily created a Office “ribbon” in Outlook called “Tweetlook”, and extended it by creating a couple of text buttons for the setup and to update the timeline.  You could extend these buttons very easily to include an image similar to what you would see in a regular Office ribbon button.

image

The objects of Outlook such as toolbars, buttons, links, frames, folders, and MAPI objects are all exposed through the interfaces making for easy access and again allowing the developer to focus on the core application, not necessarily the enormous amount of hooks required for integration.

image

Designer Implementation

One of my favorite features is the implementation of a very intuitive designer within Visual Studio.  This designer enables the drag-and-drop ability to create the different elements of the add-in such as the ribbon and buttons.

image

Deployment

Yet another challenge is how do you deploy these application add-ins once you create them.  When you are ready for deployment, you can use the Add-in Express Setup Wizard to help create the package you desire.

SNAGHTML7554b38

You have the option to create a Visual Studio project or InstallShield package.  Cool!

Overall Impressions

I’ll say that the best thing about about Add-in Express’s products are they are easy to use and definitely simplify the development process for those that are interested in creating solutions that integrate with products like Internet Explorer and Microsoft Office.  Using this type of product optimizes your development efforts and maximizes efficiency of the development process.

For anyone interested in this type of development, you can check out their products at http://www.add-in-express.com.

Be More Fluid with the New Storage Center Command Set for PowerShell

Windows PowerShell was designed as a scripting language to help IT administrators automate repetitive tasks that could otherwise be error-prone by nature and in return free administrators to focus on other activities of the IT Pro. 

We began the voyage over two years ago in expanding the capabilities of automation with the Compellent Storage Center by creating the Compellent Storage Center Command Set for Windows PowerShell.  As the first storage vendor on the PowerShell scene, we offered over 60 cmdlets in our 1.0 release to handle anything from user management and alerting, to storage provisioning and volume management for the Windows platform.

In just a short time from now, Compellent will be releasing its new version of the Storage Center Command Set 6.0.  This new version includes a number of features including new cmdlets that support the configuration and management of a new Storage Center feature called Live Volume, as well as Remote Instant Replay.  Along with new features, the syntax of many of the existing cmdlets have changed to simplify their use, provide naming consistency across cmdlets, as well as increase the availability of pipelining results from one cmdlet to another.  Watch for future posts where we’re cover some of the newness in more detail.

How is PowerShell and the Compellent Command Set being used in your environment?  Leave me a note – I’d love to hear your story!

Watch for more updates on Compellent’s Blog: Around the Block.

Creating an Add-on for Internet Explorer with Add-In Express

Introduction

For some time I have had a few ideas for Internet Explorer add-ons that I’d like to create.  One of the biggest challenges was with creating the wrapper that is required to encapsulate the executing code.  You could create context menu actions pretty easily through the registry, but you were limited to what you could do via JavaScript.

That being said, I was doing some research to see how I could accomplish this.  Almost immediately I came across Add-In Express which makes a product called Add-In Express for Internet Explorer.  They have a number of products available that help build add-ons around Microsoft Office and Microsoft Internet Explorer.

I thought I’d give it a try, so I sent them an email to see about getting an evaluation copy.  Within a couple of days they provided me with an evaluation key good for 45 days. 

This would be enough time for me to kick around the product a bit and see how easy they made it to create a add-on for Internet Express.

Test Project: Instapaper Add-on for Internet Explorer

Have you heard of Instapaper?  Instapaper is this cool “project” founded by Marco Arment.  The idea behind Instapaper is that you are surfing the web, find a webpage that you like and you want to bookmark it for later review.  This is really handy if you’re catching up on your Twitter feed and come across a link you want to visit, you can “send it to Instapaper”, then use an Instapaper application (available for iPhone, Android, and other platforms) to go back and catch-up on the pages you wanted to revisit.  I use this a lot especially when traveling.  I’ll go back to my Instapaper list and read the articles that I didn’t previously have time for, but wanted to review otherwise.  Instapaper also has the option to export your “list” to your Kindle or other eReader device.

When I am on my desktop, and using Internet Explorer, how are you suppose to keep track of things you don’t have time for now, but want to go back and read?  You use Instapaper and my Instapaper Add-on for Internet Explorer!

Installation

A very straight-forward installation process.  Basically during the installer you specify which versions of Visual Studio you want to create add-ons for so it can register it’s templates appropriately.  In my development environment, I use Visual Studio 2010, so I checked that box and continued on allowing the product to finish it’s installation process.

Creating the New Project

Like any other new project in Visual Studio, you select the project type you want to create.  The templates for Add-in Express for Internet Explorer are located under “Other Project Types > Extensibility”.

Creating a new IE Add-on

Once you select that you want to create an Internet Explorer add-on, the Add-in Express Wizard kicks in and asks a few questions about the solution we’re building.  These answers help craft the project that it will create.

Add-in Express Project Wizard

Add-in Express Project Wizard

Once you clicked Finish, our new project is generated and we’re ready to start creating our add-in.

In addition to the creation of the add-on project, it is creates a customized installation project that you can use to distribute your add-on in all it’s glory.  This is cool and really makes the process that much more smoother.

Writing Code

Next, the majority of our action is going to take place in the IEModule.cs class file.  This is the “core” to our add-on and provides us the access to the objects that we’re going to need to draw information from within Internet Explorer.  The HTML document and all of it’s properties are exposed in the form of an HTMLDocument object which makes accessing the specifics of a webpage so easy!

Generic IEModule.cs Code

You can see in my Instapaper project that I have created some additional classes that I am using to communicate with the Instapaper API in addition to a few dialogs in Win Forms.

Solution Explorer

Creating context menus and other options within the add-on are simplified through the properties dialog boxes.  By defining menus and their properties, events and methods are easily exposed ensuring that even the most novice of developers can create add-ons with little code!

Creating Context Menus

Using the Add-on

Since the project creates the installer for me, the installation is easily executed in the form of an MSI package. 

When I launch Internet Explorer I can use the context menu to customize my options for the add-on.  In this case, in order to save it to my Instapaper account I have specify a username and password.  I also have the option to give me confirmation when the URL is successfully saved to my Instapaper account.  This form allows for the configuration of the Instapaper Add-on.

Add-on Settings

Once I have configured my settings, I can use the same context menu to capture a webpage to my Instapaper account.  There are two options for capturing.  First, you can send the URL of the current webpage that is being shown in the browser to Instapaper.  Secondly, you can also right-click on a link that exists in a particular webpage and send the link’s destination URL to Instapaper.  Swell!

Add-on Context Menu

Can I try the Instapaper Add-on?

I am working on making this add-on available to the general public, but need to add some additional features to the code and complete more testing.  Watch this post for more information on it’s availability.

Add-In Express for Internet Explorer Information

Add-In Express for Internet Explorer is a visual tool to create thread-safe, secure, isolated, deployable and context-sensitive add-ons for Internet Explorer, 6, 7 and 8 in VB.NET, C#, managed C++ and Delphi Prism.

The product current is supported in a number of IDEs including C#, VB.NET, C++ (Visual Studio 2005, 2008, 2010), Delphi Prism 2009/2010.  It current supports Internet Explorer 6,7,8, and soon to be IE9.

There are several different editions available starting at $249 per license.

Conclusion

Add-In Express has made the process of developing add-ons for Internet Explorer so simple.  A developer can create an add-on in little time with minimal development as it pertains to the wrapper.  As a point of reference, from start to functional, it took me about 2 hours to create my Instapaper add-on.  Put your time and thought into your applied code, let Add-In Express handle the integration.

Compellent PSCS One-Liner Coding: Tip #2

With Compellent Storage Center 5, you have the ability to control whether an alert is generated for individual servers when connectivity changes.

This means when your server reboots or you switch around cables (in your lab environment of course), these alerts are triggered and show up in the system alerts as well as the GUI which presents a “stop light” that isn’t green.

You can control this connectivity per server in the Storage Center Manager, or perhaps you want to disable it for all of your lab servers.  Here’s a simple way to do so.  In this example I take the servers that are in my folder on the Storage Center and turn off their connectivity alerts.

Get-SCServer -ConnectionName SC5 | ?{ $_.ParentFolder -eq "Justin" } | { Set-SCServer -Index $ _.Index -EnableConnectivityAlert:$false -ConnectionName SC5 }

Beginner hints: The usage of “?” in PowerShell is synonymous with “where”.  We use this to filter the Get-SCServer cmdlet in the above example.  Additionally, “%” is synonymous with “for-each”, also used in the example.

 

Compellent PSCS One-Liner Coding: Tip #1

The Compellent Storage Center provides in-depth reporting, alerting, and monitoring as part of the platform.  It’s very important for Storage Administrators to monitor and review the alerts (informational or otherwise) that might be generated on their Storage Center.

By design, alerts in the Storage Center will change the “stop-light” status from green to red, especially critical alerts where, for example, a component is malfunctioning or a path between the controllers and disk are down.  It is also by design that these alerts have to be acknowledged one-by-one in the Storage Center interface.

That being said, there are times when you might be performing some configuration changes or maintenance that could trigger alerts.  Having to acknowledge 10 alerts is one thing, but lets say you replaced a switch, and lets say there are now 50 alerts.  How can I acknowledge those quickly and easily using the Compellent Storage Center PowerShell Command Set?

Like this:

Get-SCAlert -ConnectionName SC12 | foreach {Acknowledge-SCAlert -Index $_.Index -ConnectionName SC12}

This will get a list of alerts from the connection I have previously saved using the Get-SCConnection cmdlet.  We then pipe that to the Acknowledge-SCAlert cmdlet which then acknowledges the alert on the Storage Center.  I just cleared my 50 alerts in less than a minute!

NOTE: It really is important to review the alerts that your system might be generating.  Use all script examples with caution.

Is Your PowerShell Slow to Start?

I ran into a scenario last week where we had loaded the Compellent Storage Center Command Set for Windows PowerShell on a server.  When we launched the shell shortcut, the window opened but took a long time to get to a PowerShell command prompt.

So, what causes slow start-up when loading PowerShell?

The most common reason seems to be that machines experiencing this slowness are not connected to the Internet.

What?

Well, when Since PowerShell is loading the Compellent Command Set DLL externally, .NET has a security feature to check Microsoft’s CRL, or Certificate Revocation List.  This process verifies the authenticity and validity of the software publisher’s certificate.  If this check can’t reach the Internet, the process will time out after several minutes.  Now, this doesn’t prevent anything from loading (which seems odd), but it takes a couple minutes for a process that should take only a couple of seconds.

The easiest resolution at this point appears to allow Internet access to the server.  If that is not possible, you can disable the check for the publisher’s certificate revocation.  You can do this from Internet Explorer (or Control Panel, Internet Options) by clicking on Tools, Internet Options.  Under the Security section of the Advanced tab, uncheck “Check for publisher’s certificate revocation”.

image

NOTE: These type of security features are in place for a reason.  Take extreme caution when considering disabling these.

Using Excerpts in WordPress

I was working on making some adjustments to a new theme in WordPress tonight and was looking for a way to check to see if a excerpt had been specified for a particular post.  When I am creating posts with code snippets in them, I really don’t want all the inline code to show in the excerpt of the post, instead, it should all be rendered when the post is opened.

Seeing as I am fairly new to PHP, I had to do some searching so I wasn’t able to craft a solution easily myself.  I found just what I was looking for over at juliaholland.org.

Perfectly Centered via CSS

One thing that has always been a struggle is how to perfectly center an object (for example, a DIV) both horizontally and vertically on a page. 

The other night I was searching for a better way to do this via CSS instead of using nested tables.  I came across Dead Centre, a website that demonstrates exactly how to accomplish this.  You can see some of the detail on the webpage itself, but also take a look at the source for more details on how this was executed.

This provided a truly dynamic design that was 100% CSS-based and works across all browsers.

Compellent Volume Reporting with PowerShell

Compellent Enterprise Manager works great for managing your Storage Center environment and providing reports on volume usage and utilization.

I was looking for a little different spin on the information.  I was looking for a cumulative volume count across an entire Storage Center, plus a total count of replays on the system, and how many of the volumes that exist are actually mapped up to a server object.

For example, the test system that I ran my script on determined that we had over 900 volumes with over 3,000 replays.  We also realized that we had some cleanup to do when we figured out that only 180 of the volumes were actually mapped up.

I did build into the script to collect the page count of each replay so you could tell how large they were if you wanted to; just the calculation needs to be added.

If you have any ideas on how this script could be more useful in your environment, drop me a comment below.