![]() |
Extended ver command |
Post Reply
|
| Author | |
Drewfus
Groupie
Joined: 12 February 2010 Status: Offline Points: 44 |
Post Options
Thanks(0)
Quote Reply
Topic: Extended ver commandPosted: 10 June 2010 at 2:37am |
|
I was a little frustrated in my scripting endeavours with the builtin ver command. This command
only provides some limited data on the installed Windows version number
and nothing else, so i've come up with some ideas on what a "super" version of
this command might be like. Since this hypothetical program would be
an extended version of ver, and be complimentary to the setx command,
i'll suggest calling it verx.
VERX /csd [/e] Returns service pack level /dupdesc Description of the duplicator file used
"DuplicatorDescription specifies a description of the duplication tool used, as well as any other information that an OEM or an administrator might store in the registry." > verx /dupdesc > "ImageX - Vista_x86 - ImgVer:1.3.28"" An interesting example of someone having to post to a forum to find out how to determine what version of Windows Embedded a machine is running: Edited by Drewfus - 01 March 2011 at 4:05am |
|
![]() |
|
Drewfus
Groupie
Joined: 12 February 2010 Status: Offline Points: 44 |
Post Options
Thanks(0)
Quote Reply
Posted: 28 August 2010 at 7:43am |
|
Another option, to display the Windows version id: /os Returns version identifier
Ex: Vista_X86
Ex: Server2008R2_X64
See Inf2Cat doco for WindowsVersionList: http://msdn.microsoft.com/en-us/library/ff547089(v=VS.85).aspx
Btw, these identifiers would be nice to have in MSU filenames. Ex: Server2008_X64-KB954768.msu Edited by Drewfus - 20 February 2011 at 2:08am |
|
![]() |
|
Drewfus
Groupie
Joined: 12 February 2010 Status: Offline Points: 44 |
Post Options
Thanks(0)
Quote Reply
Posted: 05 September 2010 at 7:29am |
|
Switches for inf files. /inf [path]filename.inf [today|date[,*|#|+.*|#|+.*|#|+.*|#|+]] [/df:inf|iso|cu] Displays date and version number from Version section of an inf file. OR Writes new date or date and version to the Version section of an inf file. today: Resolves to current date in mm/dd/yyyy format date: Any valid date in format specified by /df switch /df: Specifies date format (for reading or writing) inf: mm/dd/yyyy (default)
iso: YYYY-MM-DD
cu: current users regional setting * : existing value # : new value in range 0-9999 + : increment existing value Ex: >verx /inf mydriver.inf >10/5/2010,6.1.12.3474 Ex: >verx /inf mydriver.inf 2010-10-06,*.*.*.+ /df:iso /osdec [\\Server] [/arch | /maj | /min | /pt | /sm] Returns OS decoration (for use in Manufacturer section) /arch: nt + hardware platform (one of x86, ia64, or amd64) /maj: OSMajorVersion and previous fields /min: OSMinorVersion and previous fields /pt: ProductType and previous fields /sm: SuiteMask and previous fields Ex: >verx /osdec >ntamd64.6.1.0x0000001.0x00000010 Ex: >verx /osdec /min >ntamd64.6.1 Edited by Drewfus - 20 February 2011 at 2:22am |
|
![]() |
|
Drewfus
Groupie
Joined: 12 February 2010 Status: Offline Points: 44 |
Post Options
Thanks(0)
Quote Reply
Posted: 15 October 2010 at 9:52am |
|
Here's an example where a more sophisticated ver command might help for an application install.
There are Microsoft support sites that outline how to determine the installed version numbers for SQL Server, dotNet Framework, Office and others, such as... These methods generally involve querying registry values. Why not make things easy, with a simple command? A few more switch options... /sqlsvr Returns SQL Server installations and (perhaps) instance names /wua Returns the installed version of the Windows Update Agent /wul Returns versions of registered Microsoft/Windows/Office Update related DLLs. E.g. LegitControlCheck.dll, MuCatalogWebControl.dll, OGAControl.dll /ntos Returns loaded Kernel and HAL versions Ex: >HAL=halmacpi.dll=6.1.7600.16385 >Kernel=NTKRPAMP.EXE=6.1.7600.16385 |
|
![]() |
|
Drewfus
Groupie
Joined: 12 February 2010 Status: Offline Points: 44 |
Post Options
Thanks(0)
Quote Reply
Posted: 15 October 2010 at 11:46am |
|
Ok, i forgot about Windows Installer.
/winst Returns Windows Installer version Ex: > 4.5.6001.22159 Do i have the latest version for my SKU? How do i check? /winst /chkupd Returns installed Windows Installer version and checks online for available updates. Ex: > Installed = 3.1.4000.2435 > Available = 4.5.6001.22159 > URL = http://www.microsoft.com/downloads/en/details.aspx?FamilyID=5a58b56f-60b6-4412-95b9-54d056d6f9f4 |
|
![]() |
|
Drewfus
Groupie
Joined: 12 February 2010 Status: Offline Points: 44 |
Post Options
Thanks(0)
Quote Reply
Posted: 18 November 2010 at 12:42am |
|
So we need a way of displaying installed app details from the command line.
/uninst [/cu] [/nbsp] [cmnt|ccn|tel|hent|ico|ver|upd|url|rme|sinf] Displays a list of app details by querying the registry key: HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall /cu Instead queries: HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall /nbsp Spaces within fields are replaced by non-breaking spaces. This allows treating each field as a single unit - for example when using a for /F loop, each token becomes equivalent to a field. Replace non-breaking spaces in command output with a normal space character by using command line substitution. By default the command displays Name, Publisher, Installed On, Size. Extra display options are available as follows: /cmnt Comments /ccn Contact (Company Contact Name) /tel Help Telephone /hent Hide Entry /ico Icon /upd Product Updates /url URL /rme readMe /sinf Support Information Edited by Drewfus - 20 February 2011 at 2:26am |
|
![]() |
|
Drewfus
Groupie
Joined: 12 February 2010 Status: Offline Points: 44 |
Post Options
Thanks(0)
Quote Reply
Posted: 24 November 2010 at 10:52pm |
|
The WMI class Win32_Product could be used for this purpose, however this method has two significant problems;
1. Only applicable to Windows Installer products. 2. Enumeration efficiency is poor. Why Win32_Product is Bad News! Consequently there is no way of getting a comprehensive listing of installed software from the command line! Perhaps querying the Uninstall keys in the registry is not a thorough enough method for determining installed products, and/or perhaps this would return too much "noise". Maybe Verx could have some sort of extensible interface that vendors could exploit to get their products recognised accurately. Assume some vendor libraries like: verMSFT.dll verAPPL.dll verGOOG.dll verJAVA.dll Register these libraries during product installation or at the command prompt via regsvr32.exe. Now corresponding switches - /MSFT, /APPL /, /GOOG, /JAVA - are available. |
|
![]() |
|
Drewfus
Groupie
Joined: 12 February 2010 Status: Offline Points: 44 |
Post Options
Thanks(0)
Quote Reply
Posted: 30 December 2010 at 11:44pm |
|
Codecs.
/codecs [-a|-v] [-m]
List installed codecs. Diplays codec name, version and encode/decode 'attributes' (E,D and perhaps others).
-a Show only audio codecs.
-v Show only video codecs.
-m Hide Microsoft codecs.
|
|
![]() |
|
Drewfus
Groupie
Joined: 12 February 2010 Status: Offline Points: 44 |
Post Options
Thanks(0)
Quote Reply
Posted: 04 February 2011 at 2:48am |
|
Drivers
"In my talks, I also show you that clicking on the !analyze -v hyperlink will dump more information, including the kernel stack of the thread that was executing when the crash occurred. That’s often useful when the heuristics fail to pinpoint a cause, because you might see a reference to a third-party driver that, by being active around the site of the crash, might be the guilty party. Checking for a newer version of any third-party drivers displayed in this basic analysis often leads to a fix." [Emphasis added] Ok, so lets make it really easy to find the latest third party drivers, and make a choice to install based on date, signing, Feature Score and Hardware Id match. /drivers [-className | -classGUID | DeviceId] [-m] [-si] -className Display, Media, Net, System, etc. -classGUID Corresponding unique Id -DeviceId Device identifier in valid format (two or four part for PCI) -m Hide WHQL drivers -si Only display a single instance for identical device ids (removes duplicates) So in response to the command 'verx /drivers', we get a tabular report for each matching hardware Device Id, like this: DeviceId : <device-ID>\<instance-specific-ID> DeviceDesc : "Device description string" PCI/USBdata: Bus Device Function 0-255 0-31 0-7 Date Ver SS FS IS Provider URL Cur : mm/dd/yyyy w.x.y.z SS GG THHH Company %windir%\System32\DriverStore\FileRepository\driver.inf_12345678 WUC : ... NewestDriverTarget IHV : " OEM : " Columns are as follows: Date = Date in DriverVer key of version section of .inf Ver = Version in DriverVer key of version section of .inf SS = Signature Score FS = Feature Score IS = Identifier Score Provider = Driver publisher URL = Driver Store path or hyperlink to driver download Rows are as follows: Cur = Currently installed driver. WUC = Windows Update Catalog. Latest WHQL signed driver IHV = Independant Hardware Vendor driver. Produced by chip manufacturer OEM = Original Equipment Manufacturer driver. Produced by card or motherboard manufacturer. No doubt keeping a database of URLs of latest drivers for the vast number of hardware devices that Windows supports would require serious resources. However, having a utility that can lookup these links, might (especially with disclaimer), nicely sidestep The perilous quandary of including external drivers on the Windows CD. It might also go someway to quelling the frustrations of Jon Honeyball, who is Sick and tired of Windows. Some interesting info on the dramas of driver management here: How To: Deal With Windows Drivers It seems that 3rd-party driver update services are becoming more prevalent, and with the AllSignersEqual Group Policy now enabled by default in Windows 7, perhaps Windows Update will start to become redundant as a source for up-to-date drivers. If that is the case, Microsoft will begin to lose control of the quality of drivers installed on Windows systems. Edited by Drewfus - 25 February 2011 at 12:10am |
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |