ISWIX, LLC View Christopher Painter's profile on LinkedIn profile for Christopher Painter at Stack Overflow, Q&A for professional and enthusiast programmers

Thursday, November 8, 2012

Windows 8 Changes Setup Developers Need To Know About

I've been using Windows 8 for awhile and I like it a lot.  I can't say I liked the new Start Screen at first but it's grown on me.  There is room for improvement though.

Anyways, back to installs  Here's a short list I have for the moment and I'll come back and grow it as more things occur to me.

1) The Change UAC Settings dialog doesn't really disable UAC.  You'll find your command windows aren't elevated and that you get UAC confirmation when updating files in the Windows directory.  To completely disable UAC you have to go into the registry and change the EnableLUA policy registry value from 1 to 0 and reboot.  I'm not saying you should do this, I'm just saying that if you *STILL* aren't creating installers that follow best practices with regard to custom action scheduling and execution context  you really, really need to get on board.  (Ahem Visual Studio Deployment Project users ).

2) .NET 2.0/3.0/3.5 is not installed by default.  If you are using managed code such as custom actions that don't have an activation policy manifest that allows the use of newer versions of the framework they will blow up.  (Ahem Visual Studio Installer Class Custom actions users)

3) Installing .NET 2.0/3.0/3.5 on Windows 8 is a pain in the back side.   You can't use the EXE redist, you have to use a dism command to enable the feature.  However,  Microsoft didn't include the bits in the install.wim so it has to be able to go out to Windows Update and download source. In other words it's  web/wsus enabled (via the OS) install only.   There is no standalone installer (MSU) that I'm aware of.    This is a sore spot and is best cured by moving your code forward to .NET 4.0 or beyond.

4) The new start screen shows all icons by default.  The user can create groups (think groupbox )  but they can not create subfolders and zoom into to see the icons.  In other words,  if your installer creates a bunch of icons and you thought that was ok because you were putting them into subfolders to hide them, they will all appear and the user will have to unpin a bunch of shortcuts to clean up his desktop.  (InstallShield, Visual Studio...  lots of icons )   To prevent your installer from doing this, set the System.AppUserModel.StartPinOption to 1 using the MsiShortCutProperty table.


Those are my three biggies so far.  As I discover more, I'll keep you posted.

4 comments:

  1. For #4 there are shortcut properties that can be specified in the MsiShortcutProperty table (see below). HOWEVER, since those properties are not available on ViWin7/2K8r2 systems the user will get a pop-up warning message FOR EACH SHORTCUT BEING INSTALLED on those systems.

    I found this out very early on while using the Win8 Consumer Preview and opened a support incident with Microsoft. The MSI team agreed the behavior isn't what was intended and they do plan to fix it in a future version of MSI to be updated on Win7+ systems, but that won't solve the current problem. They did provide a work-around (embed a transform that drops the records from the MsiShortcutProperty table and add a CA to apply the transform only on Win7/2K8r2 systems).

    New MsiShortcutProperty settings: Add a record for each shortcut that sets the "System.AppUserModel.StartPinOption" property to '1". See http://msdn.microsoft.com/en-us/library/windows/desktop/jj553605(v=vs.85).aspx

    ReplyDelete
  2. Oh, and another issue if you use InstallShield to create a Basic MSI package containing shortcuts...

    During the IS build when the icons are extracted from the binaries to populate the Icon table IS will sign the files, which sets all the information in the Version resource embedded in the icon files. This gives all the icon resource files that are cached in the %windir%\installer\\ folder (for advertised shortcuts) a file version equal to the IS version used for the build as well as a product name of "InstallShield" and a "Copyright Flexera Software".

    So what you might ask? Well, on Windows 8 systems the "startup tab" that was previously only seen on the Microsoft Configuration Utility (msconfig.exe) was moved to the Windows Task Manager. If you install a shortcut to the StartupFolder directory for some reason the entry in Task Manager references the cached icon resource file from %windir%\installer\\. That means it is displayed as "InstallShield" rather than using the shortcut description for your product. Unfortunately, there doesn't seem to be anyway to fix this as InstallShield doesn't give you control of whether or not the resources files in the Icon table are signed at build time or not.

    ReplyDelete
  3. Thanks for the tips guys. I must say Colby, that the transform solution seems like a PIA. But thanks for the heads up.

    Unfortunately, due to third party prerequisites, we will be tied to .NET 3.5 Christopher. Even SQL Server 2012 requires it for some of their features. It irritates me that Microsoft makes it so difficult to package software for consumers to work on their operating systems. And here I thought that W2008R2 was a pain in the neck to implement. At least there they included all the bits for the install. I am not sure what they were thinking for Windows 8. I wonder if the same holds true for Server 2012 or if that follows the model of W2008R2.

    ReplyDelete
  4. I want to create a setup project for Web Application in Visual Studio 2012 using InstallShield.
    Can anyone guide me or point me to a simple tutorial for creating a setup project using Install Shield Limited Edition 2012 for a web application to be deployed on IIS 7.5?

    ReplyDelete