wmi

Uninstalling MSI-Package always gives reboot message

旧巷老猫 提交于 2019-12-13 04:13:59
问题 I'm just scripting something for some new software. Therefore i have to remove some older software. I'm doing this whit a PS script. This works almost fine. The elevated rights are working, the software got removed, but there is always a message from the first uninstalling concerning a reboot. This message must only be acknowledged by pressing 'OK'. Now how can I force the message not coming up? This is what I have in the PS-Script: start-process msiexec.exe -Wait -ArgumentList '/x "file.msi"

VBScript subroutine to check IPv6 status in registry…returning -1

天涯浪子 提交于 2019-12-13 04:13:36
问题 I have this subroutine in my script and it is returning -1 as the value of strIPV6Status when the value is actually 0xfffffff in hexadecimal. Any ideas why this is happening? '************************************************************************** 'IP Address Configuration: Check if ipv6 is disabled '************************************************************************** Sub CheckIPV6() WScript.Echo("Check if IPv6 is disabled") WScript.Echo("------------------------------------") Const

Python wmi c.Win32_PerfFormattedData_PerfOS_Processor win7 error

柔情痞子 提交于 2019-12-13 04:08:33
问题 >>> for i in c.Win32_PerfFormattedData_PerfOS_Processor(): ... print i ... Traceback (most recent call last): File "<stdin>", line 1, in <module> File "c:\work\pythonsv\vendor\wmi.py", line 1029, in __getattr__ return getattr (self._namespace, attribute) File "C:\Python25\Lib\site-packages\win32com\client\dynamic.py", line 496, in __getattr__ raise AttributeError, "%s.%s" % (self._username_, attr) AttributeError: <unknown>.Win32_PerfFormattedData_PerfOS_Processor Anyone could explain this

WMI methods using ManagementObject.InvokeMethod()

泪湿孤枕 提交于 2019-12-13 03:59:19
问题 I am having issues when tyring to invoke the SoftwareLicensingProduct.GetTokenActivationGrants WMI method using a .NET ManagementObject object. GetTokenActivationGrants has the following signature: uint32 GetTokenActivationGrants( [out] string Grants[] ); I'm using the following C# code: class Program { private const string GRANTS_METHOD = "GetTokenActivationGrants"; static void Main(string[] args) { ManagementObjectSearcher productSearch = new ManagementObjectSearcher("SELECT ID, Name,

Using WMI in C++ to obtain the InterfaceIndex of an adapter

时光怂恿深爱的人放手 提交于 2019-12-13 02:57:12
问题 I've written some code to initialise COM and enumerate the network adapters attached to the PC by querying the Win32_NetworkAdapter class using WMI. The reason I need to use WMI is that the adapter I need to enumerate is disabled at the time but I still need to find out its InterfaceIndex, and using GetInterfaceInfo only detects enabled adapters. It all compiles and runs but at the line: hr = pEnumerator->Next(WBEM_INFINITE, 1, &pClassObj, &ulReturnVal); which is meant to retrieve the very

Powershell WMI ROOT\MicrosoftExchangev2, and WQL where usage

自闭症网瘾萝莉.ら 提交于 2019-12-13 02:55:44
问题 (PS Version 1) PS C:\> $query = 'Select * From Exchange_PublicFolder WHERE Path LIKE "/Foo%"' PS C:\> $query Select * From Exchange_PublicFolder WHERE Path LIKE "/Foo%" PS C:\> gwmi -namespace ROOT\MicrosoftExchangev2 -query $query Get-WmiObject : Provider is not capable of the attempted operation At line:1 char:5 + gwmi <<<< -namespace ROOT\MicrosoftExchangev2 -query $query It makes no difference if I try to assign the query to a variable first or not. Is there might be a problem with the

Get Hardware IDs like Microsoft does

喜夏-厌秋 提交于 2019-12-13 02:16:45
问题 In the Windows SDK there is a CLI tool named computerhardwareids The tool returns various GUIDs to select the proper HardwareId for the specific case. This is the output that returns this tool in my PC: Using the BIOS to gather information Computer Information -------------------- BIOS Vendor: American Megatrends Inc. BIOS Version string: 1201 System BIOS Major Release: 4 System BIOS Minor Release: 6 System Manufacturer: To be filled by O.E.M. System Family: To be filled by O.E.M. System

Get current memory utilisation of a process running on a remote machine with WMI

大憨熊 提交于 2019-12-13 01:57:39
问题 I want to write a VB script that will return the current memory utilisation of a process on a remote machine. I'm currently getting the info by greping the output of pslist.exe but that's not ideal. 回答1: Could you use Win32_Process. WorkingSetSize? Set objWMI = GetObject("winmgmts:\\.\root\cimv2") Set colObjects = objWMI.ExecQuery("Select * From Win32_Process") For Each Item in colObjects WScript.Echo Item.Name & " - " & Item.WorkingSetSize Next When I ran this on my local system the

Problem reading amount of memory on remote computer

瘦欲@ 提交于 2019-12-13 00:16:42
问题 I am trying to determine an amount of physical memory installed in a computer. To acomplish this I am using WMI (through .net 4.0) and it's services. The problem is that no matter what amount of memory remote computer has, value returned is 4GB. This has been tested with three remote computers: Virtual machine, 1GB RAM, Windows 2003 Physical machine, 2GB RAM, Windows XP Physical machine, 2GB RAM, Windows 7 64bit I myself am running physical machine, 4GB RAM, Windows 7 64bit. Showing the code:

wmi event active window/focus window

流过昼夜 提交于 2019-12-12 18:16:47
问题 Trying to trawl through the WMI/WQL MS Reference Data and the WMI Code Creator Event Classes, but can't find anything to indicate: A) If this is possible B) How to do it Ideally i'd like to be able to subscribe to WMI Events that are of the nature of the End User changing (UI) window (any Windows application). 回答1: You are using the wrong tool, there is not WMI classes or WMI events related to the UI of a windows application. instead you must use the Windows messages and the WinAPI. 来源: https