Categories
Community Activities General Microsoft

I will be speaking at the Microsoft Teched India 2010

Microsoft Tech-Ed India 2010 is the premier technology event of the year for IT professionals and developers. It’s the forum to learn, connect, explore, and evolve. I would recommend you to attend this event, because you will learn about today’s cutting-edge trends, thereby enhancing your work profile and getting ahead of the rest. But the most important benefit of all just might be the networking opportunity that this forum will provide you… you can build personal connections with Microsoft experts and peers that will last far beyond this event!

It feels good to share the information that, I will be speaking at this year’s event!

Teched India 2010

As a part of the premier talk, I will be doing a Level 300 session on “Overcoming the application compatibility hurdle in Windows 7” – April 13th 12.30 to 13.30

This session will outline these below points – 

  • Core OS changes which the Windows 7 Operating System has undergone and how it would affect the Line of Business applications.
  • Top focus areas when you move to Win 7 from Windows XP and Vista.
  • Brief explanation on the various methods to mitigate the compatibility issues.  
    • Application Compatibility Toolkit 5.5 – Basics, Setup Instructions, explaining the ACT reports, Standard User Analyzer and Shims.
    • Overview of Microsoft Virtualization Solutions like Remote Application Hosting, Virtualize Applications and Desktop Virtualization.
  • We will also look at some of the simple steps to fix these broken applications using Compat modes, Shims and Windows XP Mode.

Apart from this, I will also be doing a Chalk Talk session and will be involved in a Group Discussion (Community Track)

Chalk Talk – Let’s Service an OS Image offline using DISM Utility – April 12th 2010 – 14.00 to 14.30

This session will not have any slide decks in it., It will be demos and demos only!  We will see the Capabilities of the DISM tool which was introduced in Windows 7. and how can it make an IT Pro administrator’s life easy. This session will also showcase how to mount a Wim Image and customize the OS image offline like, Add drivers to it, remove folder permissions and how to enable/disable OS features!

Panel Discussion – Power Windows 7 Users – April 14th 2010 – 14:30 to 15:00

I will be a part of the discussion session along with Manan, Allen and few other MVPs discussing on the features and enhancements which Windows as an operating system has undergone. The talk would focus more on Windows 7 Image backup, Action center, DISM, UAC, troubleshooters, USB tool, XP Mode, Quick fix tools for Windows, IE 8 usability, Tools like WinDirStat and EasyBCD, RT Se7ev etc.

Thanks again for all the support you have been giving me., Hope these sessions go on well.!

All Speaker Profiles – http://www.microsoftteched.in/speakers.aspx

View the complete agenda here; To register for the Microsoft Teched India 2010 event click here

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
Microsoft Windows Installer, Application Compatibility and Deployments

DISM – Deployment Image Servicing and Management Guide

Deployment has a new tool in Windows 7: DISM (Deployment Image Servicing and Management). DISM is a command line tool which can be used to service a Windows® image or to prepare a Windows Preinstallation Environment (Windows PE) image. It replaces Package Manager (pkgmgr.exe), PEimg, and Intlcfg that were included in Windows Vista®.

Hence, Now one tool does it all ! ! !

DISM can be used to service Windows Vista® with Service Pack 1 (SP1) and Windows Server® 2008 and provides the same functionality that Package Manager provided. DISM provides additional functionality when used with Windows® 7 and Windows Server® 2008 R2.

In addition to replacing three previously released tools, DISM also supports more features and functionality than the other tools (most notably 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.

DISM tool is also part of the Windows Automation Installation Kit(AIK) 2.0, which you can freely download and use!

DISM can be used to..,
1. Add, remove, and enumerate packages.
2. Add, remove, and enumerate drivers.
3. Enable or disable Windows features.
4. Apply changes based on the offline servicing section of an unattend.xml answer file.
5. Configure international settings.
6. Upgrade a Windows image to a different edition.
7. Prepare a Windows PE image.
8. Take advantage of better logging.
9. Service down-level operating systems like Windows Vista with SP1 and Windows Server 2008 (
Supports only Vista SP1 and later images)
10. Service all platforms (32-bit, 64-bit and Itanium).
11. Service a 32-bit image from a 64-bit host and service a 64-bit image from a 32-bit host.
12. Make use of old Package Manager scripts.

Running DISM Tool

Run a Command Window with Elevated ContextDISM is a command line utility. To launch this program, run a Command Window in an elevated context (Run As Administrator) and type dism /? This will give you the help file (without image context – The commands which you can perform without loading or mounting an image)

Windows 7: DISM (Deployment Image Servicing and Management)

Now you type, dism online /? This will give you the help file (with image context – The commands which you can perform an Wim image or a VHD is mounted) – As you see in this below snapshot, you can do a lot of options like, Setting the edition of the image, UI Lang packs, Time Zones, Apps, Drivers etc..

DISM Help file - With Image context

How does DISM Work?

How Deployment Image Servicing & Management (DISM) Works

DISM Providers These providers varies on different Operating Systems.  Windows 7 and Server 2008 R2 has DISM providers. Windows Vista SP1 and Windows Server 2008 RTM does not contain any DISM providers.  When servicing these downlevel OS images, DISM loads and invokes the Vista PkgMgr from inside the image to execute the operations.  Windows 7 and Windows PE 3.0 may contain DISM service providers that are specific to the OS image, e.g. Transmog provider operates against full OS image and can only be found in a Windows 7 image, and PE provider operates against WinPE image, so can only be found in a Windows PE 3.0 image. You can find a list of providers in the folder C:\Windows\System32\DISM in Windows 7 and Server 2008 R2.

Dism Providers - Windows 7

I would recommend you read the other DISM articles too!