866-754-3592

UIU Blog

rss
Fix a failed Application Install/Uninstall

So, you’re sitting at your PC (or a customer/user’s pc) minding your own beeswax, just installing an application, or perhaps uninstalling an application when… BAM! Something awful hits the fan! Now the bloody thing is all locked up and not responding to any key strokes or mouse clicks. It won’t even let you open up Task Manager to see what in the hell it might be up to, even though you’re pretty sure that it’s up to absolutely nothing…


Now, invariably, the user was standing, looking over your shoulder, absolutely clueless about the fact that you’re boned and about the fact that you too are absolutely clueless… (No, I’ve never been in that position!)


If you’ve been working with PCs for any appreciable amount of time, any good troubleshooter knows that sometimes, for one reason or another, an install or uninstall will get “borked” and that usually happens at just the wrong moment, of course. Thank you Murphy, for that little gem of a “law”…


What happens during application installation or uninstallation?

Lots of stuff, really: files get copied, registry settings are potentially altered or created, active directory information may be read or altered, schema extensions may be initiated, operating system variables may be set, and Programs and Features registration is typically instantiated. Of course, it varies widely based on application demands and requirements… When, for various reasons, one of the necessary steps for an app install or uninstall doesn’t complete or fails outright, it can leave the app in a state of limbo, inhibiting the required re-installation of the app or, in extreme circumstances, it can inhibit the usefulness of the entire system. At the very least, it leaves administrators with a loss of confidence in the system and a dread that the problem is indicative of future time-consuming troubleshooting.


What can you do when it all goes bad?

I’ve personally used many methods in the past including registry/file scraping where I try to find all references to the app and ruthlessly (albeit recklessly) remove all discovered instances, in a subtle homage to Orson Wells. I’ve also tried clearing temp files and have, of course, resorted to the time-tested “restart and see if that helps” method, usually followed immediately by, “Ok, let’s see if a hard boot helps”. What else? I’ve restored from Restore Points, run OS diagnostics; I’ve even run some very questionable, 3rd party applications to “reset” the registry. Basically, I’ve tried everything short of waving chicken bones, drenched in the blood of the vanquished, under a full moon at midnight on a solstice. I’m saving that one for a really critical situation!


Although some of these solutions have worked some of the time, most of them live in the “60% of the time, it works every time” category. Although there are not hard-and-fast, always effective methods, I’ve been made aware of some interesting tools from Microsoft and, so far, have had success with them. I thought others may appreciate knowing about them.


Microsoft FixIt – Fix problems with programs that cannot be installed or uninstalled

This tool is so simple to execute that I’m having difficulty elaborating, so perhaps for once, I won’t. Suffice it to say that the UI is intuitive.


Download MS Fix It - Fix Problems - Install/Uninstall

Choose desired level of automation:


MS Fix It Troubleshooter

Indicate when the problem occurs:


MS Fix It uninstall install

Select the affected product (this example = uninstall):


MS Fix It select affected program

When the process is complete, you’ll receive a results screen indicating that it was (or was not) able to resolve the problem. It’s that simple.

 

Microsoft MsiZap

This tool is a bit more involved and, I presume, a bit more risky — think of “malware detection programs reminding you that removing some discovered items may result in the untimely death of your OS” risky. The tool removes all Windows Installer information for one or more applications on a PC through the clever use of Product Codes. With command line options, you can also elect to remove rollback information, remove the “In-Progress” key, or even change ACL’s to Admin Full Control.

Download MsiZap

As the command line nature of the application can be a bit unwieldy, I’ve included a link to examples of its use as well. Heads-up! You’ll need to be able to determine Product Codes for applications that you’d like to target. Fun!


Syntax Examples:

MsiZap Examples


That's all for now


In summary, we all have our methods; some of those methods are more sound than others or at least more based in actual computer science and we’ll likely continue to employ what we perceive to have worked for us in the past. That’s great. Here are two more for your arsenal. Godspeed, John Glenn!




Deployment Solution Add-ons - Plug-in Integration vs. Stand Alone

Is it always beneficial to employ partially or fully-integrated add-on software with your deployment solution? Well, it depends on your process, and your process depends on the capabilities of your selected OS deployment solution.

Third-party applications can be useful in assisting in the management of drivers, application packaging, and patch management, among others. Your solution may include these functions, yet sometimes a third-party vendor, dedicated to one function, may do it better/offer more granularity/better features, etc.

If you have a process that does not include OS images derived from installation media, and you wish to employ third-party software to augment the preparation of your final deployed OS, you'll find that stand-alone add-ons are your best if not only option. You may also find that the selection of available stand-alone applications is not plentiful. The design of stand-alone applications must take into account the state of the operating system and be executed (usually manually) at a specific time during the OS deployment process, either prior to the image capture or after image deployment.

One of the big draws of solutions that utilize imported OS images is the capability to make changes to OS configurations during the application of a raw image when the OS is offline and able to accept changes to files and registry entries. Many of these solutions, such as Microsoft SCCM or MDT, not only allow for development of integrated applications though the support of software development kits (SDK), they also support the creation of automated answer files (with varying granularity) to assist in the configuration of the deployed, raw OS.

Integrated applications, when given access to sufficient features of the deployment solution, can execute the design of the add-on with great efficiency, using standardized, approved methodologies. This enables a high degree of stability and consistency, often reducing associated troubleshooting efforts.

So, if you're selecting a new OS deployment solution or considering a more efficient process, be sure to research what third-party applications are available and potentially useful in your environment. Save yourself some time and effort!

How important are third-party integrated applications within your deployment solution?

What are your favorite plug-ins?

 


Windows Aero Interface Affected During Deployment

Since Windows Vista, the user interface of Microsoft's operating systems has been greatly enhanced to provide for a smoother, more friendly-on-the-eyes look and feel. This is largely due to the creation of the Windows Aero interface. This interface and the guidelines to which it is restricted can affect the appearance and layout of text windows in applications. The visual effects may be set by the creative use of Group Policy Objects (GPO) or in a base image, prior to deployment.

In the case of UIU Standard, some customers have reported some aberrant GUI behavior which Big Bang Support has discovered to relate directly to these visual effects.

What are the Symptoms?

Checkmarks in UIU Standard user interface (during the Prepare Sysprep Configuration step) for Computer Name and Copy Profile quickly disappear and are therefore not verifiable after the box is checked. In fact, the checkbox is selected and the activated feature will perform as expected; the mark simply is not visible.


 
Note: The two checkboxes above have been checked

Why is this happening?

The reason for this behavior is directly linked to a specific Windows 7 Aero feature having been turned off or Visual Effects having been set to Adjust for best performance, which will disable all visual effects.

 


How can this be corrected?

In Control Panel; System; Advanced System settings, click on the Advanced tab and then select the Settings button in the Performance sub-section.  Make sure the checkbox for Use visual styles on windows and buttons is checked, (it may be necessary to scroll to the bottom of the list). Alternatively, Select Either Let Windows choose what's best for my computer or Adjust for best appearance


The Problem With Drivers That Include Executables

Some device drivers used in hardware include executables along with hardware drivers. Some devices (graphics and audio) include them more frequently, particularly drivers that have been modified and re-branded by major manufacturers. These executables can prove problematic when utilized during a full, unattended installation of an operating system by a PC imaging process. Some drivers insist on the use of their included installation program, which can usually be circumvented, and almost all of them are useful, applicable, or compatible with only one make or model configuration of PC.

If a business is applying a uniform image to PCs with disparate make or model configurations, the installation of the driver's executable will either:

  • fail
  • be applied to hardware for which it was not designed or is compatible
  • be installed on every PC in a business' inventory regardless of its usefulness

At best, this wastes PC resources with an unnecessarily running program. At worst, it can generate faults and deviate valuable human resources in its remediation.

Some of these drivers actually require an associated executable in order to be configured properly and completely. Their number is very small and if the driver is prepared well, will include instructions for the installation of the executable in its INI file, and the driver will be installable in an unattended fashion. Many of these executables take the form of a CPL or control panel add-in and possibly an associated system tray icon.

Are these hardware-specific applications necessary? Many of these types of applications relate to options for graphics controllers, Wi-Fi connectivity, sound controllers and hotkeys on laptops. The vast majority of the time, they supplant functions already represented by the operating system, with branding opportunities and user-friendly graphical interfaces. In a business setting, they are almost never necessary to operate the hardware, even if they may be desirable. For IT managers, it is favorable to minimize the quantity of applications that may require support, balanced with the actual benefit that those applications provide.

So, how should these hardware-specific applications be applied in the context of an operating system deployment (if they are necessary or sufficiently desirable)? The answer is simple even if the process can be complicated.

Use a bona-fide application deployment methodology. Most modern OS deployment packages either include or work with a separate application deployment feature. Products such as Microsoft's SCCM or Symantec's Ghost Solution Suite include such functions natively. As mentioned, there are third-party options available and many allow application packages to be generated in a several different styles for application to a Microsoft OS natively (such as MSI) or to utilize some installation method (such as EXE).

The bottom line is this: Don't try to force your operating system deployment methodology to do something that it's not designed to do well.


Using Sysprep to Extend Disk Partition in Windows 7

 

UIU Support Case Example - Using Sysprep to Extend Disk Partition in Windows 7.


Many features of Windows operating systems that are accomplished natively by Sysprep are included in the various imaging solutions available on the market. One example of these features is the extension of a partition to utilize the total amount on the disc to be imaged, regardless of specific size.  This particular feature is executed during mini-setup.

Some imaging solutions include features to perform this operation well. The trouble is that some do not.  In the case where this feature is not included in the employed imaging solution, an administrator must resort to using the native toolset by manipulating the Unattend.XML file, (in Windows Vista and newer). 

If third party software is used during imaging, consideration must be given to the potential ramifications of certain Sysprep commands.  Special attention should also be paid to the feature from the perspective of which pass in Sysprep the command should be interjected to facilitate its proper inclusion into the Windows setup process.

In the specific example mentioned above, the following section would need to be added to the Specialize pass (outside of the RunSynchronous command) of the Unattend.XML:

<extendospartition>
<extend>true</extend>
</extendospartition>



An example of its placement follows:

<settings pass="specialize">
   <component name="Microsoft-Windows-Deployment" processorarchitecture="x86" publickeytoken="31bf3856ad364e35" language="neutral" versionscope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<runsynchronous>
<runsynchronouscommand wcm:action="add">
<order>1</order>
<path>net user administrator /active:yes</path>
</runsynchronouscommand>
</runsynchronous>
<extendospartition>
<extend>true</extend>
</extendospartition>
   </component></settings>


Firm Up Your Firmware for Windows 8

UIU Support Case Example - Firm up your firmware.

With the release of Windows 8, now is an opportune time to revisit the software core to your PCs, namely the firmware (BIOS). This software controls the identification of components in a system along with corresponding features of those components and affects the very bootability of the PC itself.

Why is it a good idea to keep your BIOS up-to-date?

  • Faulty BIOS firmware can negatively affect a variety of components and systems.

  • Out-of-date BIOS firmware can result in security vulnerabilities.

  • Out-of-date BIOS firmware can result in OS incompatibilities, rendering the PC unbootable or unusable.

  • Out-of-date BIOS firmware can prevent or interfere with the installation of an OS.

While updating the BIOS might seem like a no-brainer, it's remarkable how often even we forget to upgrade our firmware. One example that we observed in our lab relates to the video display of a common Dell laptop. Upon deploying an image of Windows 8 to the laptop, we identified that the display presented only a black screen with no opportunity to provide input. Troubleshooting efforts revealed that the OS image did in fact deploy, but the machine could not handle calls Windows 8 was making to the display. As a matter of routine, the BIOS was upgraded and voila!, the display functioned as expected. This obviously encouraged us to review the firmware levels of all of our lab hardware and we thought we'd pass the reminder along to our customers/blog followers.

A note on UEFI:
What is it? Unified Extensible Firmware Interface is a 64-bit replacement for BIOS and provides many advantages over BIOS, including support of GPT or GUID Partition Table (replaces the MBR) schema allowing for large boot partitions, a pre-OS environment with networking, architecture supporting intuitive user interfaces and cryptography; all operating independent of the CPU architecture and drivers.

Why might this be important?
Windows 8 offers the integration of Secure Boot technology, available only with UEFI, which will allow systems to authenticate before the PC boots; virtually eliminating the impact of malicious software that attempts to load at boot, including those pesky rootkits. More on UEFI from MSDN

Summary:
If your organization is investigating or planning to migrate to Windows 8 in the future, now is a great time to reassess your firmware interface technology. Perhaps consider UEFI over BIOS or simply maintain your BIOS firmware levels and update them as necessary to avoid conflicts or difficulties when deploying Windows 8 within your environment.


UIU Support Case Example - Handling non-conforming hard disk controller pre-installation drivers in Windows XP and 7 using DISM with UIU Standard

Recently we have seen several hard disk controller problems arising in enterprise deployment situations. There are some new hard disk controllers, in particular RAID controllers, which are not performing as seamlessly as their predecessors and can be found on high-end workstation class hardware configurations.

The problem that arises in Windows XP is that these new controllers use a driver which unfortunately employs the same naming convention as previous versions of the driver, yet provides for no legacy functionality available in its predecessors. Since the older drivers do not support the new controller, we are left at an impasse as both are boot critical drivers, and both require pre-installation. If we pre-install both, the one that is pre-installed last overwrites any previous driver that was installed. We are currently working on resolving this issue programmatically and in the meantime, provide a work-around for customers which requires additional command line operations.

With Windows 7 the problem becomes a bit trickier as Microsoft includes some very generic class drivers which in theory should cover any hardware and allow the machine to boot. Once the machine is booted UIU can perform its functions on the image and install the driver that is best for the device in question. These new controllers, for specific reasons, are not able to make use of the generic Windows class drivers, and result in a blue screen shortly after boot when the machine attempts to access the contents of the hard drive. The same work-around can also be applied with Windows 7 and is the only effective way to install the drivers for these special case hardware situations until a programmatic solution can be prepared.

In summary, the work-around is that once a UIU image has been prepared, you will shut down and restart into a Windows PE environment where we can inject the needed drivers into the image in an offline state. This will place the drivers into the boot critical area of the windows system and allow for a successful boot. Once injected, the image can then be captured using your normal capture method. It should be noted here that your pre-installation environment (Windows PE) will also need these drivers to be installed in order to push the image to the hard drive in the first place. It should further be noted that in our testing, Windows 8 class drivers have recognized and provided the needed generic support in order to boot.

Below you fill find a step by step process for using Microsoft's DISM (Deployment Image Servicing and Management) to add your boot critical drivers. Not applicable for Windows XP.

  1. Build a UIU image as you normally would.
  2. Save your RAID drivers to the hard drive at a location of your choice if you do not intend to install from external media.
  3. Shutdown the machine and boot into a WinPE environment.
  4. Insert your external media with the RAID drivers if necessary.
  5. Use diskpart to confirm drive identification
    1. Diskpart> list volume
      1. this will list the drive letters, labels, and sizes; take note of the drives and their letters as WinPE has marked them.
        1. Depending on your disk setup what is normally your C: drive may end up as your D: drive in WinPE.
    2. Exit Diskpart with the exit command.
  6. Run a DISM command to install and setup the RAID drivers to be available on boot.
    1. x:\current\path> dism /image:d: /add-driver /driver:e:\ /recurse
      1. /image:d: where d is equal to the windows install volume as WinPE has marked it. (what would normally be your c: drive)
      2. /driver:e:\ is the location where the RAID drivers can be found.
        1. This can be specific and include the .INF file in the path, or it can be the folder containing the .INF. if it is a folder containing the .INF then the /recurse option is needed.
      1. /recurse option will cause the process to search through the drive hierarchy recursively under the specified directory and install any INFs it finds.
        1. If you do not use the /recurse option you will need to give the precise path to the INF in the /driver option.
    2. You should, hopefully, receive verification that the driver was added successfully.
  7. Proceed with your normal image capture process.
    1. wpeutil shutdown or wpeutil reboot will get you out of WinPE if you are not familiar with the environment commands.
  8. Deploy for a test!

 


UIU Case Example - Windows 7 Setup -> Copy Profile
One support issue that we are presented with occurs when customers using Windows 7 wish to have the windows settings they have customized used as the default settings for any new users created on that machine. The UIU includes an option in the Sysprep section to do just this. While this option adds precise entries to the answer file and allows for the windows settings from the administrator account to be used, care needs to be taken with regard to the setup of the Windows image before this option will work correctly.

During windows setup, if Copy Profile is selected, the process will inspect the registry to validate the users that exist. If there are users that were removed from the system improperly at some point in the past and remain listed in the registry but no longer have associated accounts, the settings pass for specialize will fail and an error will be presented during windows setup. In these cases you will need to return to your base or master image and remove the registry keys associated with the non-existent users.

  1. From the start menu, right click on computer and select Manage.
  2. Navigate the tree on the left to: Computer Management -> System Tools -> Local Users and Groups -> Users
  3. Remove all but the administrator account.

Next, check the registry to verify the following:

  1. Open the registry editor
    a.    Start -> search; type regedit.exe
  2. Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList

When ProfileList is expanded, many keys will likely be presented. At least three of them should be short, for example S-1-5-18. There should be several, depending on how many profiles had been setup that are long.  For example: S-1-5-21-1377363292-4234994218-404864063-500

Find the long entry that contains a string for ProfileImagePath which lists C:\users\administrator in its Data field.

This key should not be deleted. The rest of the long keys for accounts that no longer exist must be removed for the copy profile feature to work correctly. Do not remove the short ones! You can be sure that a key is safe to delete if it contains text similar to c:\users\JohnDoe in the ProfileImagePath string, wherein JohnDoe is an account that had been deleted or should not exist on that machine.

Be careful when editing a registry as improper edits may render operating system unusable in which case a new base or master image will need to be prepared.

More information on copy profile failure from Microsoft