In the last post entitled, Use the Setup Design View to Organize Your Project, I described how I don’t like to use the Files and Folders, Shortcuts, and Registry views to organize my projects. I prefer to use the Setup Design view for most of the work, and use the Files and Folders, Shortcuts, and Registry views for quick looks at what my installation is creating on the whole. I will now describe my preference for doing bulk additions of files.

The appeal of the Files and Folders view is that you can do bulk additions of files. It initially saves time, but in the long run may cost time because you are allowing InstallShield to do the organizing for you. If it doesn’t do exactly what you want, you will have to go back and make changes to correct it. However, you can instead use the Component Wizard to do your bulk additions.

In a new project, I create needed Features in the Setup Design view. Once that is finished, I right-click on each Feature, and run the Component Wizard. The wizard will first ask what folder is the destination for your files. Let’s say we want them to be installed in [INSTALLDIR], so we select that. The next page in the wizard asks you to select the files to add to that folder. Here, you can do a bulk addition of your files for that folder, FOR THAT FEATURE. You can have a mix of assemblies and other files. In the case of assemblies, the wizard will create a separate Component for each .NET Assembly, which is generally considered to be the best practice. The other types of files will probably be placed in a single Component under that same Feature.

Now, move to the next Feature in the Setup Design view. Do your bulk additions for each folder that needs to be created under that Feature. Use this procedure for every feature in your project. This is my chosen method for organizing a new project.

Try it out the next time you create a new installation.

 

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • NewsVine
  • Reddit
  • StumbleUpon
  • Google Bookmarks
  • Yahoo! Buzz
  • Twitter
  • Technorati
  • Live
  • LinkedIn
  • MySpace
Rod_Maupin on May 13th, 2010

A common trouble spot for newcomers to InstallShield is that they don’t know the best way to organize their installation project. Let’s take a look at that.

In the InstallShield IDE, there are several views. Example views are Setup Design, Features, Components, Files and Folders, Shortcuts, and Registry views. Being new to InstallShield, the Beginner will generally gravitate to the Files and Folders, Shortcuts, and Registry views to do their work. Now, why is that? It’s because those views don’t require intuition to figure out their function. Their names imply exactly what they do. But, confusion can result when a new installation is organized purely from those views. Here’s why.

In the Files and Folders view, if you just right click in the Target Computer Files pane, and do a bulk addition of assemblies and other types of files, InstallShield will organize them into Feature(s) and Component(s) for you. Each assembly will be placed in it’s own Component, and other types of files may be grouped into separate Components as well.

The same can be said of the Shortcuts and Registry views. If you create all your Shortcuts in the Shortcuts view, and all of the registry entries in the Registry view, then InstallShield will add them to Components for you. So, InstallShield will be doing the organizing instead of you. InstallShield may associate the shortcuts and registry entries with a Component you don’t want. Contrast that with working totally from the Setup Design view.

In the Setup Design view, you have one place where you can create Features, Components, Shortcuts, Registry entries, and where you can add other file types. You first create the Features and subfeatures your installation requires. You then create Components and place them under the desired Features. Under each Component, you create the Shortcuts and Registry entries specific to that Component. Here, the Shortcuts and Registry entries will only be created when the Component and it’s parent Feature is installed on the Target System. Makes sense doesn’t it?

Instead if you added all your files through the Files and Folders view, then you may have to go to the Components view and rearrange them after InstallShield has placed them into separate Components for you. In the end, it’s extra work.

That doesn’t mean that the Files and Folders, Shortcuts, and Registry views are worthless. Those views are great when you use them AFTER you have done all your organization in the Setup Design, Features, and Components views. In Files and Folders, you can see how ALL the files and folders are organized in your installation. The Shortcuts view will show you ALL the shortcuts in your installation. Likewise, the Registry view will show you ALL the registry entries created in your installation.

In conclusion, if you’re a Beginner, try working mostly from the Setup Design view. It will allow you to save time by getting your organization right the first time.

If you’re thinking, “I see what you mean, but adding files through the Files and Folders view is a lot faster”. You’re right, it can be, but there is an alternative. I’ll talk about that in the next post.

 

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • NewsVine
  • Reddit
  • StumbleUpon
  • Google Bookmarks
  • Yahoo! Buzz
  • Twitter
  • Technorati
  • Live
  • LinkedIn
  • MySpace
Rod_Maupin on May 10th, 2010

If you are relatively new to InstallShield, you may wonder how you can add a splash screen to your installation. It’s actually very easy. In a Basic MSI, InstallScript MSI, or InstallScript project, just go to the Behavior and Logic section of the IDE, Support Files view.

There are three sections in the Support Files view. Support Files, Splash Screen, and Advanced Files. Each of these three areas has a Language Independent folder, and at least one language-specific folder. In English-speaking counties, the language-specific folder will be English.

The Support Files view holds files that you want to make available only during the installation process. Support Files are copied to a temporary folder on the target system, and they are deleted when the installation is complete. If you have languages-specific versions of the Support Files, you put them in the folder specific to that language.

The Splash Screen view is where you can place the Splash Screen which will be displayed at the beginning of your installation. The default image file type is BMP. Through experience, I have noticed that the bitmap needs to be a maximum of 256 colors. Actually, if you can get by with 16 colors, all the better. InstallShield sometimes has problems displaying splash screens with lots of colors.

The Advanced files section has a Disk 1 folder. This folder is where you put files that will be used by the installation, but not copied to the target system, even during installation. The Disk 1 folder is a good place to put the autorun.inf file and the icon file it references.

InstallScript 2010 projects have one more view available, the Billboards view. Billboards are images files or Flash files that will be displayed while the installation is taking place.

That’s a quick tour of the Support Files view and how to add a Splash Screen to your installation.

 

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • NewsVine
  • Reddit
  • StumbleUpon
  • Google Bookmarks
  • Yahoo! Buzz
  • Twitter
  • Technorati
  • Live
  • LinkedIn
  • MySpace
Rod_Maupin on April 22nd, 2010

I am a big fan of using Virtual Machines for installation testing. It is the way to go.

After having used Microsoft’s Virtual PC for 5 years, I thought I would try VMWare Workstation 7. My first impression is it’s pretty slick. A really nice interface, much nicer than Virtual PC.

I’ll write more about it after I have had some more time to get used to it.

 

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • NewsVine
  • Reddit
  • StumbleUpon
  • Google Bookmarks
  • Yahoo! Buzz
  • Twitter
  • Technorati
  • Live
  • LinkedIn
  • MySpace

A customer asked me an interesting question yesterday. Can you tell the difference between a CD-ROM and DVD-ROM drive in InstallShield? I had never had the need to do this, so I looked into it.

It appears that InstallShield will tell you if it’s a CD/DVD-type drive, but it does not distinguish between a CD or DVD drive. For example, you can use GetValidDrivesList in InstallScript to get the list of drives on the system. Here are the parameters:

GetValidDrivesList(listID, nDriveType, nMinDriveSpace);

listID – Returns a list of valid drive letters. The string list identified by listID must already have been initialized by a call to ListCreate.

nDriveType – Specifies the type of drive to search for. Can be one of the following values:

  • -1 – Searches for all drive types.
  • FIXED_DRIVE – Searches only for fixed drives.
  • REMOTE_DRIVE – Searches only for remote drives. Remote drives are generally located on a network.
  • REMOVEABLE_DRIVE – Searches only for removeable drives. Floppy drives are considered to be removeable drives.
  • CDROM_DRIVES – Searches only for CD-ROM drives.

nMinDriveSpace – Specifies the minimum amount of disk space in bytes that must be free on the drive to allow the drive to be included in the return list.

Since GetValidDrivesList does not distinguish between the CD and DVD drives, another option would be to create a Managed Code Custom Action in C# or VB.NET.

Here is a code snippet using the ManagementObjectSearcher class:

     ManagementObjectSearcher mgmtObjects = new ManagementObjectSearcher(“Select * from Win32_CDROMDrive”);

          foreach (var item in mgmtObjects.Get())
          {
                    string strDrive = String.Format(“Drive Letter – \t”, item["Drive"]);
                    string strName = String.Format(“Name – \t”,item["Name"]);
          }

In the example, strName will equate to something like this:

“PIONEER DVD-RW DVR-116D”

To use the output, you would have to probably look for CD or DVD in the string to determine the difference between the drives.

Try this out and see how it works for you.

 

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • NewsVine
  • Reddit
  • StumbleUpon
  • Google Bookmarks
  • Yahoo! Buzz
  • Twitter
  • Technorati
  • Live
  • LinkedIn
  • MySpace