On Wed, Jun 27, 2012 at 9:48 AM, Craig Ringer <ring...@ringerc.id.au> wrote: > On 06/27/2012 02:49 PM, Magnus Hagander wrote: > >> There are some easy api to get whether the box is on a domain or not, and >> it's easily accessible from wsh as well. And it ought to be trivial in power >> shell... >> > Good to know. Since it's a troubleshooting tool there's no real problem with > saying "First, go install powershell" - but it'd be better not to need to if > it's available via wsh.
"msinfo32.exe /report foo.txt" would likely give us most of what we'd want to see (aside from the installation logs), but for some reason Microsoft seem to have removed the options to include only certain categories of info in the reports it creates, so you now get 3+ MB of info that's not very useful as well as the good stuff. On the plus side, it does compress nicely (3.8MB -> 175KB on my dev VM). There's also the systeminfo command, which gives something like: C:\Users\dpage>systeminfo Host Name: RAPTOR-WIN7 OS Name: Microsoft Windows 7 Ultimate OS Version: 6.1.7601 Service Pack 1 Build 7601 OS Manufacturer: Microsoft Corporation OS Configuration: Standalone Workstation OS Build Type: Multiprocessor Free Registered Owner: dpage Registered Organization: Product ID: wwww-zzz-yyyyy-xxxx Original Install Date: 01/12/2010, 16:09:14 System Boot Time: 27/06/2012, 10:05:48 System Manufacturer: VMware, Inc. System Model: VMware Virtual Platform System Type: x64-based PC Processor(s): 1 Processor(s) Installed. [01]: Intel64 Family 6 Model 37 Stepping 5 GenuineIntel ~2792 Mhz BIOS Version: Phoenix Technologies LTD 6.00, 02/06/2011 Windows Directory: C:\Windows System Directory: C:\Windows\system32 Boot Device: \Device\HarddiskVolume1 System Locale: en-gb;English (United Kingdom) Input Locale: en-gb;English (United Kingdom) Time Zone: (UTC) Dublin, Edinburgh, Lisbon, London Total Physical Memory: 2,047 MB Available Physical Memory: 985 MB Virtual Memory: Max Size: 4,095 MB Virtual Memory: Available: 2,824 MB Virtual Memory: In Use: 1,271 MB Page File Location(s): C:\pagefile.sys Domain: WORKGROUP Logon Server: \\RAPTOR-WIN7 Hotfix(s): 125 Hotfix(s) Installed. [01]: 982861 <skip 127 other hotfixes> You can also use the WMI console pretty easily - maybe a few choice queries there is the answer. For example: C:\Users\dpage>wmic product get name,version Name Version Microsoft Application Error Reporting 12.0.6012.5000 Microsoft Application Error Reporting 12.0.6015.5000 Microsoft Office OneNote MUI (English) 2010 14.0.6029.1000 Microsoft Office InfoPath MUI (English) 2010 14.0.6029.1000 Microsoft Office Visio MUI (English) 2010 14.0.6029.1000 Microsoft Office Project MUI (English) 2010 14.0.6029.1000 Microsoft Office Access MUI (English) 2010 14.0.6029.1000 Microsoft Office Shared Setup Metadata MUI (English) 2010 14.0.6029.1000 Microsoft Office Excel MUI (English) 2010 14.0.6029.1000 Microsoft Office Shared 64-bit Setup Metadata MUI (English) 2010 14.0.6029.1000 Microsoft Office Access Setup Metadata MUI (English) 2010 14.0.6029.1000 Microsoft Office PowerPoint MUI (English) 2010 14.0.6029.1000 Microsoft Office Publisher MUI (English) 2010 14.0.6029.1000 Microsoft Office Outlook MUI (English) 2010 14.0.6029.1000 Microsoft Office Office 64-bit Components 2010 14.0.6029.1000 Microsoft Office Shared 64-bit MUI (English) 2010 14.0.6029.1000 Microsoft Office Groove MUI (English) 2010 14.0.6029.1000 Microsoft Office Word MUI (English) 2010 14.0.6029.1000 Microsoft Office Proofing (English) 2010 14.0.6029.1000 Microsoft Office Shared MUI (English) 2010 14.0.6029.1000 Microsoft Office Proof (English) 2010 14.0.6029.1000 Microsoft Office Proof (Spanish) 2010 14.0.6029.1000 Microsoft Office Proof (French) 2010 14.0.6029.1000 Microsoft Office Professional Plus 2010 14.0.6029.1000 Microsoft Office Visio 2010 14.0.6029.1000 Microsoft Office Project Professional 2010 14.0.6029.1000 Microsoft Windows SDK for Visual Studio 2008 Tools 6.1.5288.17011 Windows Installer XML Toolset 3.0 3.0.5419.0 Microsoft Visual Studio 2010 ADO.NET Entity Framework Tools 10.0.30319 Microsoft ASP.NET MVC 2 2.0.50217.0 Microsoft Help Viewer 1.1 1.1.40219 Microsoft .NET Compact Framework 1.0 SP3 Developer 1.0.4292 Visual C++ 2008 x86 Runtime - (v9.0.30729.4148) 9.0.30729.4148 Microsoft Visual C++ 2005 ATL Update kb973923 - x86 8.0.50727.4053 8.0.50727.4053 Microsoft Visual C++ 2008 Redistributable - x64 9.0.30729.4148 9.0.30729.4148 Visual C++ 2008 IA64 Runtime - (v9.0.30729) 9.0.30729 Visual C++ 2008 x64 Runtime - (v9.0.30729) 9.0.30729 Jasc Paint Shop Pro 8 8.10.0000 Microsoft Sync Framework Runtime v1.0 SP1 (x64) 1.0.3010.0 Microsoft Windows SDK for Visual Studio 2008 .NET Framework Tools 3.5.21022 Visual Studio 2010 Prerequisites - English 10.0.40219 Visual C++ 2008 x64 Runtime - KB2465361 - (v9.0.30729.5570) 9.0.30729.5570 Microsoft Visual C++ 2010 x86 Runtime - 10.0.40219 10.0.40219 Microsoft Windows SDK Intellisense and Reference Assemblies (30514) 7.1.30514 Microsoft Visual C++ 2005 Redistributable 8.0.59193 Crystal Reports for Visual Studio 12.51.0.240 Microsoft Windows SDK for Visual Studio .NET 4.0 Framework Tools 7.1.30514 VMware Tools 8.8.4.13798 Microsoft Visual C++ 2010 x64 Designtime - 10.0.30319 10.0.30319 Microsoft Sync Framework SDK v1.0 SP1 1.0.3010.0 Microsoft Visual Studio 2008 Professional Edition - ENU 9.0.21022 Java(TM) 6 Update 24 6.0.240 J2SE Development Kit 5.0 Update 22 1.5.0.220 Java(TM) SE Development Kit 6 Update 24 1.6.0.240 Microsoft Document Explorer 2005 8.0.50727.42 Microsoft Sync Framework Services v1.0 SP1 (x64) 1.0.3010.0 Microsoft Team Foundation Server 2010 Object Model - ENU 10.0.30319 Microsoft Windows SDK Net Fx Interop Headers And Libraries (30514) 7.1.30514 Microsoft .NET Framework 2.0 SDK (x64) - ENU 2.0.50727 Microsoft Security Client 4.0.1526.0 Microsoft ASP.NET MVC 2 - Visual Studio 2010 Tools 2.0.50217.0 Microsoft Visual C++ 2008 Redistributable - x64 9.0.30729.6161 9.0.30729.6161 VMware vSphere Client 5.0 5.0.0.16964 Microsoft Visual C++ 2008 Redistributable - x86 9.0.30729.6161 9.0.30729.6161 Microsoft Visual Studio 2010 Professional - ENU 10.0.30319 Microsoft Visual C++ 2008 Redistributable - x86 9.0.21022 9.0.21022 Visual Studio .NET Prerequisites - English 9.0.30729 Microsoft Team Foundation Server 2010 Object Model for Lightswitch 2011 - ENU 10.0.40219 J2SE Runtime Environment 5.0 Update 22 1.5.0.220 Microsoft .NET Framework 4 Multi-Targeting Pack 4.0.30319 Microsoft Sync Services for ADO.NET v2.0 SP1 (x64) 2.0.3010.0 Web Deployment Tool 1.1.0618 Microsoft .NET Compact Framework 2.0 SP2 2.0.7045 WCF RIA Services V1.0 SP1 4.1.60114.0 VC Runtimes MSI 9.0.21022 Microsoft Visual C++ 2008 ATL Update kb973924 - x64 9.0.30729.4148 9.0.30729.4148 Microsoft Windows SDK .NET Framework Tools (30514) 7.1.30514 Microsoft Windows SDK for Visual Studio 2008 Win32 Tools 6.1.5288.17011 Visual C++ 2008 x64 Runtime - (v9.0.30729.4148) 9.0.30729.4148 Microsoft .NET Compact Framework 3.5 3.5.7283 Python 2.7.2 (64-bit) 2.7.2150 Windows SDK IntellisenseNFX 7.1.30514 Microsoft Document Explorer 2008 9.0.21022 Microsoft Visual C++ 2010 x64 Redistributable - 10.0.30319 10.0.30319 Microsoft Visual C++ 2005 Redistributable 8.0.61001 Microsoft Windows SDK for Windows 7 Common Utilities (30514) 7.1.30514 Microsoft .NET Framework 4 Extended 4.0.30319 Visual C++ 2008 x86 Runtime - KB2465361 - (v9.0.30729.5570) 9.0.30729.5570 Microsoft Windows SDK for Visual Studio 2008 SDK Reference Assemblies and IntelliSense 6.1.5288.17011 Microsoft Visual C++ 2008 Redistributable - x86 9.0.30729.4148 9.0.30729.4148 Microsoft Visual C++ 2010 x86 Redistributable - 10.0.30319 10.0.30319 Microsoft Visual C++ 2008 Redistributable - x86 9.0.30729.17 9.0.30729 Visual C++ 2008 x86 Runtime - (v9.0.30729) 9.0.30729 Microsoft Windows SDK for Windows 7 (7.1) 7.1.30514 Microsoft Silverlight 5.1.10411.0 Microsoft .NET Framework 4 Client Profile 4.0.30319 Microsoft Visual Studio Macro Tools 9.0.30729 Debugging Tools for Windows (x64) 6.12.2.633 Microsoft Visual J# 2.0 Redistributable Package - SE (x64) 2.0.50728 Microsoft Visual C++ 2008 Redistributable - x64 9.0.30729.17 9.0.30729 ActivePerl 5.12.2 Build 1202 5.12.1202 Java Auto Updater 2.0.3.1 Microsoft Visual C++ 2010 x64 Runtime - 10.0.40219 10.0.40219 Microsoft Windows SDK for Visual Studio 2008 Headers and Libraries 6.1.5288.17011 Though the slightly disturbing thing about that is that it isn't listing PostgreSQL, of which I have many versions installed. Not sure why - I'm fairly certain it's not just dumping the windows installer database, as it shows Paint Shop Pro which is a very old product and almost certainly not an MSI based installer. > Ick ick ick. I've kept away from this stuff and been happy about it, why do > I keep volunteering myself for horrid Windows guts stuff? :-) -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs