Saturday, November 30, 2013

Where are Windows Desktop Backgrounds stored?

If you are looking for the source location for the Windows Desktop Backgrounds/Wallpapers that are associated with each release of Windows, you can find these Wallpapers here:


For an OS such as Windows 8.1, there are several subdirectories beneath it such as the following:

  • Flowers
  • Lines and colors
  • Windows

Friday, November 29, 2013

How to enable InstallShield LE for Visual Studio

If you are interested in using the free version of InstallShield called InstallShield LE with Visual Studio, you should know that it does not ship by default with Visual Studio.

In fact, if you go into Visual Studio and create a new project type under "Other Project Types" --> Setup and Deployment, you will only see an icon that says "Enable InstallShield Limited Edition":

The provided instructions will then simply take you to this link where you have to register to download InstallShield Limited Edition:

Once you download and install the LE version, you will be able to create an InstallShield LE project:

Of course, you will need the serial number that you received when you registered your copy of the software, because InstallShield LE requires activation:

Only after InstallShield LE is successfully activated, will you actually be able to begin using it for developing InstallShield LE Setup and Deployment projects:

Thursday, November 28, 2013

InstallShield vs. Advanced Installer

I have used both InstallShield and Advanced Installer in the projects I have worked on, but for individuals or groups that are currently evaluating a packaging tool, I thought this article might be of use in comparing the 2 toolsets head-to-head.

Here is a list of the features that I will be comparing between the 2 platforms:

  1. Freeware versions/evaluation versions
  2. Project Types
  3. Ability to import project types from other packaging platforms
  4. Frequency of updates
  5. Dialogs and Theming
  6. Customizability
  7. Overall feature set
  8. Overall ease of use
  9. Technical Support
  10. Build automation support
  11. Overall value

  1. Both InstallShield and Advanced Installer offer Freeware versions as well as Evaluation versions.  InstallShield offers its freeware versions through Visual Studio in the form of InstallShield LE while Advanced Installer offers its Freeware version available directly through its website.  Both companies offer evaluation versions of their software platform through their website.
  2. Advanced Installer offers a much wider variety of project types than InstallShield hands-down--absolutely no question.
  3. InstallShield offers no visible way to import projects from other packaging tools while Advanced Installer offers the ability to import from Visual Studio Setup, Wix, Inno Setup, NSIS Script, WISE and even InstallShield LE!
  4. Advanced Installer updates their software platform every few weeks with bug fixes and new features, while InstallShield only releases their software in the form of service packs and brand new version releases.  Therefore, new features usually take 1 year or more to get incorporated into the platform.
  5. For Basic MSI projects, both Advanced Installer and InstallShield offer several themes to choose from to customize Dialogs.  However, Advanced Installer makes the customization process significantly easier, provides much more modern UI Dialogs, and a larger selection of color choices.
  6. In regards to customization capabilities, Advanced Installer is just much more customizable.  Most customizations can be done very easily and readily using Advanced Installer, while InstallShield usually requires you to jump through numerous hoops to accomplish the same task.
  7. Overall, the feature set provided by Advanced Installer is far superior.  In many cases I have found that Advanced Installer almost seems to take feature sets provided by InstallShield and makes them 10x better than what is offered in InstallShield and then provides it as part of Advanced Installer.  
  8. Once again, Advanced Installer shines in the area of overall ease of use.  Getting up and running in Advanced Installer even with moderately complex packages is so much better than InstallShield that using the capabilities of InstallShield in comparison is almost laughable.
  9. Both companies offer Technical Support through e-mail, but I have found in my own experience that overall Advanced Installer is much more responsive in a timely manner than InstallShield support.
  10. In the area of Build Automation, InstallShield clearly has an edge over Advanced Installer.  They offer a Standalone Build installer which can be used specifically for build machines/Continuous Integration servers, as well as offering a lot more functionality for specifying Path Variables and defining Property values throughout the IDE especially for functionality such as Dynamic Folders (Synchronized Folders in Advanced Installer) as well as providing extensive command line support and a rich COM-based API for accessing and manipulating nearly every property in an InstallShield package.  
  11. If you want a complete solution with minimal expense, Advanced Installer is definitely the tool of choice for you.  If you are a company that wishes to deploy your own update solution, you can achieve that very easily and readily using Advanced Installer while InstallShield requires you to subscribe to a monthly/annual subscription to publish updates through their hosted service.  
Therefore, the verdict of the 2 installation packaging tools is that Advanced Installer is the CLEAR WINNER!

So, if you have not already chosen an installation packaging tool for your organization, I would definitely recommend choosing Advanced Installer as your tool of choice.

Tuesday, November 26, 2013

Custom Action restrictions in 64-bit InstallShield packages

I was attempting to build a pure 64-bit installation package in InstallShield by altering the properties in the Template Summary field (located on the General Information window), and when I then attempting to build my installation package, I noticed the following error message:

"32-bit VBScript/JScript Custom Action must not be included in a strict 64-bit package."

Fortunately, there is an easy solution to resolving this error message and that is to set the "Use 64-Bit Scripting" flag on the VBScript Custom Action.

Therefore, if you forget to set this flag on any VBScript/JavaScript Custom Actions that you have, you will receive the 32-bit error message that I received.

Sunday, November 24, 2013

Problems while upgrading to Windows 8.1

I just recently upgraded to Windows 8.1 and I selected the setting for "Keep my Windows Settings and Personal Files".

Part of the Windows 8.1 Upgrade required me to go through the setup wizard once again to set up an account for Windows Live syncing as well as requiring a Wireless network connection (even though I was connected to a wired network). 

However, overall, the upgrade completely smoothly and seamlessly, but I knew that there was a good possibility some of my applications would stop working after the upgrade.

I encountered a few problems after my upgrade to Windows 8.1:

  1. The Classic Shell Start menu disappeared after upgrading to Windows 8.1
  2. Bridged networking in VMWare Workstation 10 stopped working after upgrading to Windows 8.1
  3. My HP Printer Network Driver had disappeared
  4. Some of the libraries that I had configured with alternate location mappings had disappeared
  5. Device sharing with some wireless network devices had also disappeared
For Classic Shell,  I simply had to run a "Repair" on the installation in order to restore the Classic Shell Start menu on Windows 8.1.

For VMWare Workstation 10, I received the following error message when attempting to use any VMs with Bridged Networking:

When I looked at the list of available VMWare Services in the Services Control Panel, I found this:

Apparently, the VMWare DHCP and NAT Services had disappeared!

Therefore, I decided to run a "Repair" on the installation to see if I could resolve this issue:

After, the repair was complete, I reviewed the list of VMWare Services once again:

Fortunately, it looked like the VMWare DHCP and NAT Services were restored after the "Repair" operation.  When I subsequently attempted to start one of my VMs with "Bridged" networking, the VM started correctly.  Whew!!

Alternatively, you can try using the "Restore Default" option from the Virtual Network editor to see if this restores your VMWare NAT and DHCP services as well:

  1. From the Edit menu, select Virtual Network Editor
  2. On the Virtual Network Editor dialog, click on the button "Restore Default"
  3. This should attempt to reinstall the VMWare DHCP and NAT services.

That was it!

Good luck with your Windows 8.1 Upgrades!

Internet Explorer Automatic Version Upgrade

I just recently upgraded to Windows 8.1 and as you may have already read, Internet Explorer 11 ships with Windows 8.1.

After upgrading to Windows 8.1, I decided to check out the Help -->About Internet Explorer menu option to verify that I had been successfully upgraded to Internet Explorer 11.

Here is what I found on the Help dialog:

It seems that with the release of Internet Explorer 11, Microsoft is attempting to follow a strategy similar to what Mozilla Firefox and Google Chrome already follow of being able to provide automatic updates to versions of the browser!!

However, considering that Internet Explorer is an Enterprise Standard browser for most corporations/organizations, there is no telling how this will affect organizations that currently develop their web applications to support a particular version of Internet Explorer if IE 11 will constantly be updated to new versions (could we see an IE Version 30+ with this automatic version update feature???)

In any case, if you are a developer that supports Internet Explorer as one of your major browser platforms, this feature is definitely something you want to keep apprised of especially if the applications you develop are based on supporting certain versions of the IE browser platform.


InstallShield Developer Reference -- Getting Started with InstallShield

If you are new to using InstallShield, the easiest way to get started with developing a new InstallShield package is to use the Project Assistant.

The Project Assistant provides you with an easy wizard interface to get you up and running with the most common options required for creating and building an installation package.  While most installation packages will still require you to edit settings in Installation Designer, the Project Assistant will get you up and running with the most basic values to be used in your package very quickly:

In each of the dialogs, you will notice that in the left hand navigation there is an option to perform some easy customizations without having to go into Installation Designer.  Other links will take you directly into Installation Designer for editing those settings.

One of the most useful screens in the Project Assistant which cannot easily be modified through Installation Designer is the Custom Images Dialog available from the Installation Interview tab in Project Assistant:

This dialog allows you to select custom images for your dialogs to provide your own customized branding for your InstallShield package.  Below is the Help text associated with using these Custom Dialog Images (accessed by clicking the Help button from the Dialog Images dialog box):

Dialog Images Dialog Box

Use the Dialog Images dialog box to add an image (.bmp, .gif, .jpg, .jpeg, or .ibd) that you want to display on your installation’s dialogs.

Full Screen Image
Browse to a graphic file that will serve as the full-screen background for your exterior dialogs. Exterior dialogs are dialogs that appear at the beginning or end of the installation, including InstallWelcome and SetupCompleteSuccess (the final dialog upon successful installation). The full-screen image should measure 499 by 312 pixels.

Banner Image

Browse to a graphic file that will run across the top of interior dialogs. Interior dialogs, which appear between the first and last installation dialogs, include the LicenseAgreement and CustomSetup dialogs. The banner image should be 499 by 58 pixels.

Creating Windows Installer Logs in InstallShield

If you are using InstallShield and you need to create Windows Installer Logs in order to troubleshoot installation issues with the package, there are 2 major ways to create these Windows Installer Logs:

  1. From the General Information window, select "Yes" for the option to "Create MSI Logs"
  2. In the Releases window, click on the Setup.exe tab and specify "MSI Command-Line Arguments"

With option #1, you can select various logging switches to create the MSI Logs, however, there is no option to specify the location of the MSI Logs (even with the Custom MsiLogging value):

To understand what the different letters in the MsiLogging value means, you will have to review this article:

However, a brief synopsis of the various switches is here: 

The letters in the value field can be in any order. Each letter turns on a different logging mode. Each letter's actual function is as follows for MSI version 1.1:
v - Verbose output
o - Out-of-disk-space messages
i - Status messages
c - Initial UI parameters
e - All error messages
w - Non-fatal warnings
a - Start up of actions
r - Action-specific records
m - Out-of-memory or fatal exit information
u - User requests
p - Terminal properties
+ - Append to existing file
! - Flush each line to the log
x - Extra debugging information. The "x" flag is available only on Windows Server 2003 and later operating systems, and on the MSI redistributable version 3.0, and on later versions of the MSI redistributable.

"*" - Wildcard, log all information except for the v and the x option. To include the v and the x option, specify "/l*vx".

With option #2, you have more options in terms of how you want to handle logging, including specifying the location of the resultant Windows Installer log file:

In order to determine what options, you can use for building your Windows Installer Log File, you can leverage the help of the "MSI Command-Line Builder" from the Tools menu:

You can then select the "Log Settings" link in the navigation and review the various switches available for creating Log files:

Friday, November 22, 2013

Passing parameters to MSBuild


You may know that you can pass parameters to MSBuild to populate properties contained in a PropertyGroup.

Below is an example MSBuild file we can use for the purpose of demonstrating passing properties:

<?xml version="1.0"?>
<Project xmlns="" ToolsVersion="4.0" DefaultTargets="Build">
<AppPoolName />
<AppPoolVersion />
<Target Name="Build">
<Message Text="This is the value of the parameters: $(AppPoolName) and $(AppPoolVersion)" Importance="high" />
<Message Text="$(PowerShell) &amp; $(ScriptFilePath) $(AppPoolName) $(AppPoolVersion)" Importance="high" />


  1. As you may know in MSBuild v. 3.5 and above, you can also nest PropertyGroup elements inside of Target element.  Unfortunately, if you do so, you will not be able to pass those external parameters to your MSBuild script.
  2. Also, when you are passing parameters to MSBuild, make sure that you do not send the last parameter with a trailing semicolon such as: /p:AppPoolName=TestAppPool;AppPoolVersion=v4.0;. 

    If you do so, you will receive the following error message:  

    MSBUILD : error MSB1005: Specify a property and its value.
    Switch: /p:AppPoolName=TestAppPool;AppPoolVersion=v4.0;

    For switch syntax, type "MSBuild /help"

    Therefore, instead, you need to pass the parameters in this manner to avoid that error message:  /p:AppPoolName=TestAppPool;AppPoolVersion=v4.0. 

Hopefully, these words of advice can help you avoid similar problems/issues while developing and testing your MSBuild scripts.

Thursday, November 21, 2013

Dynamically invoking commands in PowerShell

If you ever have to build a command to execute dynamically in PowerShell, this is a very good discussion thread on how to accomplish this:

It basically involves using the Invoke-Expression or iex command for invoking the command contained in your PowerShell string.

Therefore, you can build up your PowerShell command in a PowerShell string, and then simply invoke it using Invoke-Expression or the short form iex.

Here is an example script that simply executes a dynamic command to run MSBuild:
$MSBuildPath = "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\MSBuild.exe"
$MSBuildFilePath = "H:\Scripts\RunPowerShell.proj"

$MSBuildCmd = "$MSBuildPath $MSBuildFilePath `"/p:AppPoolName=TestAppPool;AppPoolVersion=v4.0`""

Write-Host $MSBuildCmd
Invoke-Expression $MSBuildCmd


Escaping double quotes in PowerShell strings

If you have to escape double quotes in PowerShell strings, the easiest way to do so is to escape them using the "`" (backtick character) in all your strings.

Therefore, if you have a very long string that requires inclusion of double quotes, you will have to include a ` character before the beginning of the string (the 1st double quote) and a final ` character before the final double quote.

Here is an example:
$IISCmd = "Add-WebConfigurationProperty -pspath 'MACHINE/WEBROOT/APPHOST'  -filter `"system.applicationHost/applicationPools`" -name `".`" -value @{name=`"$AppPoolName`";managedRuntimeVersion=`"$AppPoolVersion`"}"

You can also use an IDE such as PowerShell ISE or PowerGui to make sure that the formatting of your final PowerShell string is correctly escaped, but at least this example should hopefully help you deal with these normally problematic strings!

Wednesday, November 20, 2013

Overloaded methods in Managed Code Custom Actions

I have been writing Managed Code Custom Actions for years and I have had to write both Immediate Execution Custom Action methods as well as Deferred/Commit Custom Action methods.

Well, rather than re-writing functionality based on the number of parameters and parameter types, I decided to try and overload some of the methods in order to more closely follow OOP practices in terms of class design.

As I soon learned, OOP principles do not work when it comes to creating Managed Code Custom Actions:

As it turns out, InstallShield does not support selection of Overloaded methods for Managed Code Custom Actions as is evident by the message "Overloaded methods cannot be selected".

Therefore, when writing your .NET assemblies to be used in Managed Code Custom Actions, make sure that you do not use overloaded methods otherwise these methods will be unavailable for you to use within your InstallShield projects!

Tuesday, November 19, 2013

Testing Business Requirements for .NET Applications

Most developers know that we can test our code through Unit Tests as well as through Regression Tests such as the use of Web Tests or even test the scalability of our application through Web Performance/Load Tests.

However, how do we test to make sure that the code that we have developed has met business requirements?

Well, business driven requirements testing is currently not provided directly by the Microsoft Visual Studio suite of testing tools, however, there are 2 other tools that fill in the gaps left by Microsoft.

  1. SpecFlow:
  2. FitNesse:

While SpecFlow focuses on "Pragmatic BDD for .NET" and therefore has a focus on the .NET platform, FitNess is a more generalized tool used for Acceptance Testing.

These tools can be used independently or in conjunction with each other to meet your needs since they both work a little bit differently. 

While SpecFlow offers deep integration with Visual Studio.NET through a Visual Studio Extension, FitNesse relies on a web server that utilizes a Wiki format to perform business acceptance testing.

Personally, I like to work entirely within the Visual Studio IDE, therefore, I highly prefer using SpecFlow, but like I stated earlier, you can choose whichever tool suits your needs.

If you want to download the Visual Studio 2013 extension for SpecFlow, you can either download it as a NuGet package or get the extension directly from the Visual Studio Gallery here:

Generate Unit Tests is back in Visual Studio 2012/2013!

As you may recall, Visual Studio 2010 offered the ability to generate Unit Tests from a given block of code.

Of course, this was limited to the MSTest Unit Testing framework, therefore, when Microsoft released Visual Studio 2012, they decided to remove this capability since they began offering support for additional Unit Testing frameworks such as NUnit.

Well, fortunately, enough developers complained about losing that feature (several thousand, in fact), therefore, Microsoft finally decided to bring back that particular feature through an Extension in the Visual Studio Gallery!  The extension supports both Visual Studio 2012 and Visual Studio 2013.

You can download this extension here:

ASP.NET MVC Web Apps for SharePoint 2013

With the release of Visual Studio 2013, Microsoft has finally released support for developing ASP.NET MVC Web Applications for SharePoint 2013!

You can read more about how to develop MVC Web Apps for SharePoint 2013 using Visual Studio 2013 here:

Duplicating files using InstallShield

If you work with .NET applications, you may already be familiar with the need to duplicate .config files into multiple directories.

Fortunately, if you have the need to duplicate files (such as .config files), you can do that pretty easily using InstallShield.

On the down side, InstallShield does not provide a direct User Interface in Installation Designer to accomplish this, but rather, you must manually edit the DuplicateFile table in DirectEditor.

  1. Open up Direct Editor
  2. Click on the DuplicateFile table
  3. Click on the New button to add a new record to the DuplicateFile table
  4. At a minimum, enter the FileKey, Component and File values for the record.  The DestName and DestFolder fields are optional if you want to rename the file or transfer the file to a different folder that does not currently belong to an existing component within InstallShield.

Now when your InstallShield package runs, it will read the values out of the DuplicateFile table and appropriately duplicate the files on the file system for you!

Monday, November 18, 2013

Scripting Tools for WMI

If you ever have a need to work with WMI through C# or VBScript (perhaps even for your InstallShield packages), you will probably be glad to have some assistance in writing those scripts since working with WMI is not exactly the easiest library to use!

Fortunately, the folks at Microsoft, have created a set of free tools that you can use to generate some basic scripts that you can modify for your own use.

You can download these tools from here:

The first tool, Scriptomatic, only supports generating WMI scripts with scripting technologies such as VBScript and JScript:

The second tool, WMI Code Creator, supports generating VBScript as well as VB.NET and C# scripts by altering the associated Code Language:

Recovering lost source code through .NET Decompilation

I recently needed to work on an old project after not having touched it for several years.  Unfortunately, I discovered I only had the resultant .NET assembly and had somehow or other lost the original source code.

Thankfully, I had not obfuscated nor encrypted the .NET assembly, therefore, a decompilation tool could hopefully come to the rescue!

In this instance, I ended up using the free decompilation tool Telerik JustDecompile:

Well, the results were far better than I ever imagined!  Not only did Telerik JustDecompile perfectly decompile my assembly (with all of the method details and signatures intact), but I was easily able to copy and paste the decompiled source code into a new .NET Class Library project and recover all of my supposedly lost work!

So if you are ever in a bind where you may have lost the original source code, remember a decompilation tool such as Telerik JustDecompile may still be able to save the day!

Checking the port configuration for a SQL Server Instance

If you have an installation of SQL Server or SQL Server Express, by default, it should operate on port 1433.  However, what if the SQL Server instance configuration is not responding on that port? 

It might be possible that the SQL Server configuration was altered, the TCP/IP protocol might not be enabled or SQL Server might be using TCP Dynamic Ports.

Well, you can easily verify the configured port for SQL Server by following these steps:

  1. Open up SQL Server Configuration Manager
  2. Expand the SQL Native Client Configuration so that you can view the Client Protocols (for both 32-bit and 64-bit configurations)
  3. Click on the Client Protocols
  4. You should now be able to view the TCP/IP protocol
  5. Make sure that the TCP/IP protocol is Enabled.  If it is not enabled, you will have to Enable it.  (This will require a restart of the SQL Server service).
  6. Right click on the TCP/IP protocol and select Properties
  7. Look at the value for "Default Port"
  8. For any network connections that are not using the SQL Server Native Client, expand the section for SQL Server Network Configuration
  9. Click on the section for "Protocols for MSSQLSERVER"
  10. Make sure that the TCP/IP protocol is Enabled.  If it is not enabled, you will have to Enable it.  (This will require a restart of the SQL Server service).
  11. Once again right click on the TCP/IP protocol and select Properties
  12. However, this time, click on the IP Addresses tab.
  13. Review all of the "TCP Port" values for all of the available IP Addresses.

Creating a Custom Prerequisite in InstallShield

In many cases, the Redistributables section of InstallShield will meet your needs for Prerequisites in an installation package, but what if you have a Prerequisite that does not exist in InstallShield yet (such as Adobe Reader 11 or Microsoft Office 2013) or even something a bit more complex like detecting whether or not a platform such as Microsoft SharePoint is already installed on the server?

In these instances, you will probably need to author a Custom Prerequisite.  This can be done by selecting Tools-->Prerequisite Editor from the InstallShield menu.

You can then proceed to fill out the individual tabs in the Dialog to author your very own Custom Prerequisite which you can include as part of your InstallShield package.