February 2012

Uncategorized

Checking disk offset with WMIC and DiskPart (aligning partitions)

It has been well discussed that aligning disk partitions is very critical to achieving maximum performance. It seems that the newer operating systems automatically create aligned disk partitions but I was curious to find out how to determine whether the current partition is aligned. After some googling, I found the following:

wmic partition get BlockSize, StartingOffset, Name, Index

Running this will show the starting offset of each disk and partition.
Running DiskPart and listing the partitions will also show a rounded up value of the offset.
It seems that starting offsets of 1048576 (WMIC) or 1024kb (DISKPART) indicate correctly aligned partitions. The solution for incorrectly aligned partitions seems to be extensive disk tools or basically formatting and realigning the disk.

Uncategorized

Use the Windows Management Instrumentation Command-line to list all installed programs

Windows comes with a command line version of the Management Instrumentation (WMIC).To get the list of all installed programs in a text file, simply enter the following command in a prompt:
wmic product > c:product.txt
To get a list of installed apps on a remote PC you can do the command:
wmic /node:”PC NAME” product list
The results are easily imported into Excel.

Courtesy of Q&A: Dos command to list all installed programs | TechRepublic.