Categories
Community Activities Events Microsoft Windows Installer, Application Compatibility and Deployments

Deployment Image Servicing & Management (DISM) How-To Articles – Community TechDays, Bangalore

Most of you know that, we had the Community TechDays happening here in Bangalore last weekend.  I was one of speaker in the event. I had a session on managing the OS images effectively with DISM – Windows 7.

In this session, I discussed on what all the DISM tool can do, which were the tools that it replaced, its Commands, Architecture, providers and options. I am really glad that, this session was well accepted by the attendees. Most of them had asked for the slide deck to be shared.  I thought creating How-to articles would make more sense than sharing the slide deck!

DISM How do I articles

Deployment Image Servicing & Management (DISM) is a new command line tool which was introduced in Windows 7 for deployment.  DISM can be used to service a Window image or to prepare a Windows Pre-installation Environment (Windows PE) image. DISM also supports more features and functionality than the other tools (Package Manager) supported in Windows Vista, including logging, inventory commands with parse-able output, detailed help, offline INF driver package installation, direct application of MS update packages, and integration of international settings.

These how-to articles on DISM will help you understand what DISM tools can do, which were the tools it replaced, its Commands, Architecture and options.

Special Thanks to my fellow MVP, Rhonda Layfield who helped me while preparing for this session; and also for throwing in a lot of positive energy from across the world in hopes that my demos will run smoothly.!

As mentioned earlier, people who had attended my session(online and in-person) can complete this survey (http://tinyurl.com/STEP190)  and be lucky to win a TechNet Subscription. (only 3 would be picked). This is from the Springboard Series Panel Expert Program!

Kindly let me know, if you have any questions or comments!

Categories
Microsoft Windows Installer, Application Compatibility and Deployments

Add or Remove a driver from a Wim Image using DISM

You can offline service an image using DISM and add drivers to the mounted ones. You will need to download driver packages from OEM’s and ISV’s. These packages need to be INF-based packages (.exe or .msi driver installation is not available offline).

You can then use the DISM add-driver command to add the INF-based driver to the image. If you want to install all drivers in a directory, add the /Recurse switch. To validate that the package was installed, use the Get-Drivers command to query the image (this defaults to listing third party drivers only, which can be over-ridden by using the /All option). Use /ForceUnsigned to add unsigned drivers to X64-based images.

To do these operations, you should mount the Wim image first. If you arent aware on the steps, then do check this article!

DISM image servicing – VHD Support

  • Same servicing support as for WIM images. (Just replace the /MountDir folder with the virtual harddisk Drive Letter!)
  • Must use separate tools like diskpart to attach the VHD image for servicing
  • All updates are committed to the VHD image right after completion of the servicing operation

In this example, let me add a third party hp driver to a wim image which is already mounted. First, lets list out the drivers which are already a part of this Wim image. using the command dism /image:”<imagemountdir> /get-drivers

DISM /get-Drivers

Now I am adding a third party driver(hp) using the switch /add-driver. The command would look like, dism /image:<imagemountdir> /add-driver /driver:<pathtotheinffile>

DISM /Add-driver

When you list of the drivers which are present on the Wim Image,  you will see a new oem1.inf has been added to the image. This is the hpstape.inf driver which we just added. The tool automatically enumarates the number of the oem file and creates a published name. Thats the reason, you see a oem1.inf getting created. Now, when you add a new driver again, it would be oem2.inf.. and so on..! –

This phenomenan is very important, as hardcoding this oem file number will put the machine in a un-safe state., and un-installing them will cause a chaos!

DISM /get-drivers

If you want to remove a driver from the Wim image, you can just run the dism tool with the /remove-driver switches, dism /image:<imagemountdir> /remove-driver /driver:<publishedname>

Dism /Remove-driver

Driver Servicing Commands:

/Remove-Driver –  Removes driver packages from an offline image.
/Add-Driver – Adds driver packages to an offline image.
/Get-DriverInfo – Displays information about a specific driver in an offline image or a running operating system
/Get-Drivers  – Displays information about all drivers in  an offline image or a running operating system.

You would also be interested in reading this  –

Categories
Microsoft Windows Installer, Application Compatibility and Deployments

Enable or Disable a feature from a Wim Image using DISM

You can offline service an image using DISM and enable/disable a feature on the mounted ones. In this short article, let us see on how we can do the same.

To do these operations, you should mount the Wim image first. If you arent aware on the steps, then do check this article!

DISM image servicing – VHD Support

  • Same servicing support as for WIM images. (Just replace the /MountDir folder with the virtual harddisk Drive Letter!)
  • Must use separate tools like diskpart to attach the VHD image for servicing
  • All updates are committed to the VHD image right after completion of the servicing operation

First list all the features available on the mounted Wim Image. To get this information use the command, dism /Image:<MountedDir> /get-features

Dism /get-features

Now for the demo purpose, let me enable the “ServerMigration” Feature. To do the same, you will need to use the command line dism /image<mountedDir> /enable-feature /featureName:<featurename>

Dism /enable-feature /featurename

Now when you list the features again, you will see that, this feature is enabled!

Here are the other Package and Feature Servicing Commands

/Add-Package – Adds packages to the image.
/Remove-Package – Removes packages from the image.
/Enable-Feature – Enables a specific feature in the image.
/Disable-Feature – Disables a specific feature in the image.
/Get-Packages – Displays information about all packages in the image.
/Get-PackageInfo – Displays information about a specific package.
/Get-Features – Displays information about all features in a package.
/Get-FeatureInfo – Displays information about a specific feature.
/Cleanup-Image – Performs cleanup and recovery operations on the image.

You would also be interested in reading this  –

Categories
Microsoft Windows Installer, Application Compatibility and Deployments

Unmount and Clean up a Wim Image using DISM

DISM provides you an option to load Wim images onto your local drive and the service it offline. You can either add/remove a driver, enable/disable features, perform other customizations..without even installing them on a physical box. Now when you have mounted a Wim image, its really necessary to check if the image is mounted correctly. you can do that by running the command,  dism /get-MountedWiminfo.

Check the Status. If the Status is OK, then everything is good. If the Status is anything else., for eg: Needs Remount, Status Un-available, Invalid.. etc.. Its an indication that, you gotta’ remount (repair) the image. In this article, you will know how to Unmount, clean and remount a Wim image using the DISM tool.

Get-MountedWinInfo

The screenshot above shows the mounted image status as “Invalid”.  This means that the mount point is corrupted and there may be resources associated with the mounted image that has been abandoned.  The cleanup command does not unmount a mounted image, nor does it delete images that can be recovered using the remount command.  You can use the cleanup command to delete these abandoned resources.  You can cleanup using the command syntax: dism /cleanup-wim

If the mounted image status shows as “Need-Remount”, you can run the remount command to recover the orphaned mount path.

Re-Mounting a Wim Image

When you have an issue with the mounted images as seen above, you will need have a need to re-mount the images which are mounted. This command will recover an orphaned Wim mount directory. You can re-mount using the command syntax.  dism /remount-wim /MountDir:<mountDir>

Un-Mounting a Wim Image

Once you are done with Servicing the Wim Image, you can unmount the image from your machine. Most of the IT Pros have asked this, what if they have forgot to save the changes, before they unmount. Thats how the DISM team has added this switch either to commit or discard the changes.  dism /unmount-Wim  /MountDir:<mountDir> /commit

Changes to WIM files are not “committed” until you do so specifically. You have three choices:

  1. Unmount the image using the /Commit option (to save changes)
  2. Use the /Commit option without unmounting (this keeps the image open so you can make more changes).
  3. Unmount the image and use the /Discard option. In this case the image in the WIM file will be unchanged. This is used primarily as a manual “undo” of your changes.

Unmount-Wim

Cleaning up all Mounted Wim Images

This operation will search for all the stale or corrupted files in your machine and clean it up! – dism /cleanup-wim

The /Cleanup-Wim command is only used if there is any issue with the mount points, that means when any of the mounted images are shown as in the “Invalid” state.  You can run the cleanup command to delete these abandoned resources at the corrupted mount points.  There is no need to run the cleanup command every time when you are done with servicing the mounted images, but only when you run the /get-mountedwiminfo command and found that there are some mounted images showing the “Invalid” status. (as shown in the first screenshot in this article)

Cleanup-Wim

Since cleanup command only needs to be run when the /get-mountedwiminfo shows any mounted images in “Invalid” state, and the cleanup command does not unmount a mounted image, nor does it delete images that can be recovered using the remount command, running the /get-mountedwiminfo command after running the /cleanup-wim command usually still shows the mounted images with status no longer in the “Invalid” state instead of no mounted images as shown in the snapshot above.  Note that is very rare that a mounted images will be in the “Invalid” state, since it is rare that a mount point will become corrupted unless something weird has happened to the host system!

No Mounted Images

Special thanks to Anne Wong the Product Manager of DISM Tool, for correcting few information in this article! Really appreciate her efforts in looking through the each and every word!

You would also be interested in reading this  –

Categories
Microsoft Windows Installer, Application Compatibility and Deployments

Mount a Wim Image using DISM for Offline Servicing

Deployment Image Servicing and Management (DISM) is a tool which allows you to service your images offline.  It supports both .wim and .vhd formats. In this article, we will look at how do you mount an Wim Image using this tool!

DISM has a very constent syntax. If you are not aware of the syntaxes, then just type the below command in the cmd window. You will get an excellent help document, with examples too.! cmd:> DISM /?

You can read the Introduction to Deployment Image Servicing and Management (DISM) here

For the demo purpose, i have extracted the iso image which comes in the dvd of Server 2008 r2. Once you extract the iso, and goto sources folder, you will see install.wim and boot.wim.  The Wim image (install.wim) has all the editions of the operating system and it’s always using the index number, we figure out which flavour of the OS it represents!

Wim Images

Now lets look at a legacy way of viewing an image information; we all use Imagex to find these details, using the command “Imagex /info <path>image.wim”;  When you run this command “imagex /info “C:\Server2008r2\Sources\install.wim“,  you will see a lot of information ranging from the number of directories, files, Index number,  major version number, minor version number..etc etc.

When you think about documentation, you really dont need to know so much of information. and its really really tough to identify the required information from this kinda output.

Imagex View

Let’s fetch the same information using DISM, using the command dism /get-wiminfo /Wimfile:<path>image.wim. You will get to see clear information about all the editions which is loaded on the particular wim image!

Dism /Get-Wiminfo

If you need more information on a particular edition of the Wim Image, all you need to do is to add the index number at the end of the command /Index:<indexnumber>.

DISM /get-wiminfo /index

Mounting a Wim Image

Mounting an image as easy as calling a wim image with a /Mount-Wim switch and the Index number on a command prompt. You generally will mount an image for offline servicing. Predominantly they are for patch tuesdays, adding the new patches, Adding or removing the drivers,  Enable or disable windows fetaures like Firewall, Games etc..  You can run the below command to mount a Wim Image.

dism /Mount-Wim /WimFile:<Path>image.wim /Index:<indexnumber> /MountDir:<mountDir>

Mount-Wim

The image is mounted to a folder, now you can make all the customizations and modifications to it!

Mounted Wim Image appears in the explorer Window

Displaying all Mounted Wim Images

DISM provides you options to load even multiple Wim images in different folders. For example, if you need to replicate your customized drivers to all the images, you can just copy the drivers from C:\Windows\System32\Drivers from one image to another one which is currently build. You can just mount both these wim’s parallely and copy the drivers using the folder view.

This command will give you an overview on all the images which are mounted-  dism /get-MountedWiminfo

Mounted Wim

You would also be interested in reading this  –

Categories
How-to Microsoft Windows Installer, Application Compatibility and Deployments

How to make Windows 7 Deployment Easy? – Effective Guides

With the Windows 7 adoptions on the high, organizations are looking for key resources to deploy and monitor their IT Assets efficiently. This article provides you information on effective Guides which eases the Windows 7 Deployment process. I reckon, this article will especially be useful to a lot of IT Pros.

Choosing a Windows 7 Deployment Strategy

Looking to start you deployment of Windows 7? Not sure where to start or the resources available? Read this concise article on the recommended deployment strategies and the tools that support them.

Analysing your environment with Microsoft Assessment and Planning Toolkit

Do you want to know what is running in organization so you can plan a Windows 7 deployment? The Microsoft Assessment and Planning Toolkit is a free solution accelerator that can inventory you infrastructure.

Offline Servicing an OS Wim Image

This Article provides you information on how to Mount a Wim image, add and remove drivers to Images, Enable a feature in the mounted image offline, Unmount and cleanup a Wim Image.

Prepare your Applications for Windows 7

We all have this question in our mind. “Why does my application break when we change the Operating Systems?”

Windows 7 LogoTypically, whenever a new OS is released, Microsoft makes every effort to ensure application Compatibility. Unfortunately, as the OS evolves and when reliability, security and performance improvements are made, there are some comprises which are made that ends up breaking some applications. Thankfully, when the changes are decided to be made, there is some mitigation planned to address the applications which are broken.  Hence, Application Compatibility is one important which is on the top of everybody’s mind.

Application Compatibility Toolkit 5.5 Guides / How To Tutorials

These series of posts covers information on how the core changes of Windows 7 will affect the applications. Also, it covers some basic methods to mitigate these issues from the viewpoint of Developers, IT Pros and End-users.

A key consideration when moving to Windows 7 is whether your applications will run successfully. Download the Microsoft Application Compatibility Toolkit (ACT) to access the necessary tools and documentation to evaluate and mitigate application compatibility issues before deploying Windows 7

Five Steps to Windows 7 Application Readiness

Trying to decide if the applications you use in your organization will run on Windows 7? Follow these 5 steps to determine application Readiness.

Application Management and Preparing for a Windows 7 Deployments

Read this concise article that will walk you through the variety of approaches to addressing compatibility issues and the tools available to help you.

Commonly-used application shims here

Watch this video and see how to apply commonly-used shims to legacy application to enable them to work on Windows 7.

Understanding Application Compatibility

Why might your application not work on Windows 7? There are a few reasons such as enhanced security or retired components. This article walks you through the areas that might affect your applications.

Categories
Microsoft Windows Installer, Application Compatibility and Deployments

How about a Solution Center to help you plan the OS Migration Strategy?

Did you know that,  Windows 2000 Server, Windows 2000 Client and Windows XP SP2 support ends coming July 13, 2010? If you are still using one of these OS, its time you plan your migration strategy. When you look at moving to Windows 7, how about presenting you with one single center, which will provide you all the resources available to help you move to a new client and server operating system?

springboard

The Springboard Team has created a End-of-Support Solution Center to help with the planning of your migration strategy from Windows 2000 or Windows XP to Windows 7, Windows Server 2003, Windows Server 2008 or Windows Server 2008 R2.

Here are some resources to help guide you:

Check out the Windows client and server support forums and Deployment zone on Springboard where we have additional screencasts, walkthroughs, whitepapers, FAQ’s and much much more to help guide.

If you are looking to move from Windows Server 2000, the best place to start is at the Windows 2000 End-of-Support Solution Center where they have key information to help guide you through the upgrade paths, migration tools, and toolkits you will need!

Client Migration: There is no supported migration path from Windows 2000 to Windows 7 using the User State Migration Tool (USMT). You must first upgrade to Windows XP and then migrate to Windows 7 with USMT 4.0 included with the Windows Automated Installation Kit (AIK).

Courtesy: This was a post at the Springboard blog. As a STEP member, I have extracted the information for msigeek readers.

Categories
Windows Installer, Application Compatibility and Deployments

Redistributing Application Components using Merge Modules

Most developers understand the benefits of writing reusable code. It makes sense to use that piece again when you need the same functionality. The more pre-tested software you can reuse, the fewer bugs you’re likely to have in the final product.

Merge modules extend the notion of reusable components to the software installation process. Once you’ve developed a way to install a reusable component, you can also reuse the installation process!

mergemodulesMerge modules are pre-compiled libraries of components like files, registry, and other system changes which install a discrete portion of the application. This common module can be added to the various applications, instead of adding individual components to different msi files. They cannot be installed alone. they must be merged or added to an msi file to install it.

Merge modules are a mechanism that allows many Application Publishers to prepackage components, sign them and share these standard modules!

A merge module is similar in structure to a simplified Windows Installer .msi file. A merge module(msm file) contains files, DLLs, ActiveX components, registry entries and some system configurations like environment variables that make up these runtimes.

The use of merge modules can eliminate many instances of version conflicts, missing Registry entries, and improperly installed files!

As mentioned before, a merge module cannot be installed alone, it must be merged into an installation package using a merge tool. Developers can also create new merge modules by using many of the same software tools used to create a Windows Installer installation package, such as the database table editor Orca provided with the Windows Installer SDK.

Developers can use this method to merge modules or obtain a merge tool from an independent software vendor like Wise, InstallShield etc.

When a merge module is merged into the .msi file of an application, all the information and resources required to install the components delivered by the merge module are incorporated into the application’s .msi file. The merge module is then no longer required to install these components and the merge module does not need to be accessible to a user.

Merge modules is a tool for the developer, not for the end user!

Summing up, points to remember about the merge modules:

  1. All the information required to install a shared file is delivered to the installer in a single, standardized .msm file.
  2. Eliminate many instances of version clashing, missing registry entries, and improperly installed files.
  3. Traditional installers keep an incremental reference count of the number of applications using a shared file, but not the name of the application. If shared files are installed from .msm files, the Windows installer can keep a correct reference list of applications that use those shared files.
  4. Windows can better avoid deleting shared resources used by any application until the last application using them is uninstalled.
Categories
General Windows Installer, Application Compatibility and Deployments

Ebook Download: What are SAN Certificates and how can they be used?

One great solution to effectively manage the certificates in large webfarms or email centric companies is to use subject alternative name (SAN) certificates.

The Shortcut Guide to Subject Alternative Name Certificates provides information about SAN certificates to show how they can be used in a variety of technologies. These special certificates allow multiple hosts to use the same certificate, avoiding the costs of obtaining, deploying, and managing multiple nearly-identical certificates. This guide will explore what SAN certificates are, how they work, and how they can help you deploy server farms more efficiently. You may even discover that you already have SAN certificates available that can be put to good use with no additional expense!

This guide is provided in four chapters. Each chapter focuses on a different aspect of the concepts and practical use of SAN certificates:

  • Chapter 1: Introduction to Certificates – This chapter introduces broad PKI terms that are used throughout the guide. It provides a framework for the in-depth concepts and application of SAN certificates in later chapters. Although this chapter may be considered review material for some readers, it is important to understand this information to ensure that later chapters are effective.
  • Chapter 2: SAN Certificates In Depth – This chapter is dedicated to getting down into the details of a SAN certificate. It will examine the certificate structures and metadata and will compare data between SAN and non-SAN certificates. It will also compare SAN certificates to wildcard certificates to understand the distinction between two somewhat similar products.
  • Chapter 3: The Business Value of SAN Certificates – Written primarily for the BDM and TDM readers, this chapter discusses the business aspect of SAN certificates. It will examine the business costs and return on investment (ROI) drivers that apply to both SAN and other similar certification strategies. This chapter supports the business and organizational elements of the solutions discussed in Chapter 2.
  • Chapter 4: Planning and Implementing a SAN – Enabled Certificate Strategy—This chapter discuss the details of actually implementing a SAN-enabled certificate strategy. Topics include analyzing existing systems and properly planning for a SAN certificate deployment. Ongoing operations-based tasks are also explored. This chapter is useful for the implementers in an organization, such as the IT generalist or specialist, and the planning elements apply to architects as well.

Because SAN certificates are more flexible than single‐instance certificates, in general, we can plan to obtain fewer certificates and use those certificates in multiple locations. For example, we can show how a company might secure its Internet‐facing servers with a series of certificates in a typical PKI deployment.

ex_sgsanc_4-1

As we can see, this deployment has four servers, one of each, that will serve as our server archetypes:

  • Email server
  • E‐commerce server
  • Web server
  • Real‐time Communications (RTC) server

You can download the book here

Note: You will need to create a profile in Realtime Nexus (The Digital Library for IT Pros) when you click the above link.

Courtesy: Realtime Nexus Virtualization Alerts

Categories
General Windows Installer, Application Compatibility and Deployments

The Essentials Series: Important Questions in Implementing Virtual Desktops

For organizations that have embraced virtualization, virtual desktops can be a natural extension of the virtual infrastructure. Virtual desktops enable businesses to centralize their desktop infrastructure in the data center, dramatically improving remote access while retaining workspace personality.

Although the idea of virtual desktops and their associated business value is intriguing to many businesses, the implementation is a mystery. Where do you start? What technologies are crucial for success? How are others implementing them? By addressing these common questions, The Essentials Series: Important Questions in Implementing Virtual Desktops will help you understand why and where virtual desktops make sense for your IT environment.

This complete series is available for download and includes the following articles

  1. There is no single technology that defines a virtual desktop infrastructure. It is in fact a compilation of many technologies employed to create a singular solution for users. This first article begins the exploration of virtual desktop implementation by defining what a virtual desktop really is, helping you understand the types of virtual desktops that are commonly used today.
  2. Unraveling the many technologies that go into a virtual desktop infrastructure can be problematic for even virtualization experts. From virtual platforms to zero-client endpoints that “receive” the desktop and everything in between, it can be difficult to keep straight the technology requirements. This second article discusses the technology behind virtual desktops, enabling you to make good decisions about how a virtual desktop architecture makes sense for your business.
  3. The final step in recognizing the value of this new method of desktop support is in understanding where it fits. The use cases for virtual desktops are developing every day, and there are common solutions that make immediate sense for deployment. Through a series of generalized case studies, this final article explains how organizations in many different verticals have solved key problems through a virtual desktop infrastructure.

You can download this entire Series – Here

Note: You will need to create a profile in Realtime Nexus (The Digital Library for IT Pros) when you click the above link.

Courtesy: Realtime Nexus Virtualization Alerts