Search Results

Search found 436 results on 18 pages for 'wmi'.

Page 2/18 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • weird access denied issue with WMI

    - by stackunderflow1
    I'm seeing a weird access denied issue with WMI. we're trying to create a diff disk based on a parent vhd in a windows service app that runs under network service (machine account is an admin). everything works fine when we create the diff disk on other machine using wmi - we use an admin user account. however, we cannot do this on a local machine as wmi doesn't take user cred for the local machine. so thought network service account already should have access for this, it seems like it doesn't and even if we run the service under an admin service account, it fails. any pointers???

    Read the article

  • Using WIX to install a WMI provider.

    - by Simmen
    I have developed a WMI provider in C# using the System.Management.Instrumentation namespace. I need to install the provider into the GAC and register it with the WMI repository using MSI. How might I accomplish this with WIX?

    Read the article

  • wmi - Drive letter

    - by new
    \NJ96\root\cimv2:Win32_PnPEntity.DeviceID="USB\VID_1A8D&PID_1000\35809402 0874450" i can able to get the vendor id and product id of the usb device plugged into my device using WMI . how can i map DRIVE LETTER to my above output using the WMI please help me out

    Read the article

  • How to export Configuration of each IIS 6 Web Site using WMI

    - by Diego
    Hi all, I need to export the WebSite Configuration (MetaBase) from IIS6 for a whole server, but I need each web site configuration to be saved separately. The result should be the same that can be obtained by right clicking on each Web Site in IIS Snap-in and selecting All Tasks-Save Configuration to a File. My idea is quite simple: 1- Using WMI, retrieve a list of Web Sites. 2- Also via WMI, export each configuration to a file having the same name of the Web Site. However, I'm having some difficulties, mainly due to the complexity of WMI and, in my opinion, the poor documentation of its classes. At the moment I found out how to enumerate Virtual Directories, but not Web Sites; while it's true that this method returns Web Sites as well, I can't see how to identify them among other virtual folders (a Web Site has different properties, which are not returned in the Virtual Directory Object), and I can't find the Web Site Description property, which I'd like to use to name the exported file. I thought about a workaround for all the above issues, but it would be more a hack than a real solution... Any help if appreciated. Thanks.

    Read the article

  • WMI Remote connection objsWbemLocator.ConnectServer

    - by Sam
    I have an issue when connecting to remote machines using the following: Set objWMIService = objSWbemLocator.ConnectServer _ (sIP, "root\CIMV2", strUser, strPassword, "MS_409", "ntlmdomain:" + sDomain, 128) the problem is that some machines are not timing out and the process hangs. Is there a way to cancel the connect and continue with the next ip? I'm using vbscript. Thanks, Sam

    Read the article

  • WMI ASP.net Request per Seconds not right

    - by Louis Haußknecht
    I'm querying a webserver for RequestsTotal and RequestsPerSec: Select * from Win32_PerfRawData_ASPNET_ASPNETApplications The server is a Windows Server 2008 R2 with IIS 7.5 and I'm querying it from my Windows 7 workstation using a C# program. My problem is that both RequestsPerSec and RequestsTotal show the same value. Running perfmon on that server and selecting the counters there shows the correct values.

    Read the article

  • Setting WMI permissions remotely on windows server 2003

    - by user41507
    Hello. I am a programmer , I don know the server well. I made a simple program checking the service on the remote server is started or not. by using this(http://msdn.microsoft.com/en-us/library/dwd0y33x(v=VS.90).aspx) but the permission should be set. and I can't find any document via the internet. except one document. http://msdn.microsoft.com/en-us/library/aa393266(VS.85).aspx but the engineer say that 'tell me exactly what I do. there are many DCOM are they any nice document to show him? thanks in advance

    Read the article

  • C# WMI, Performance Counters, & SNMP Oh My!

    - by Keith
    I have a C# windows service which listens to a MSMQ and sends each message out as an email. Since there's no UI, I'd like to offer an ability to monitor this service to see things such as # messages in queue, # emails sent (by message type perhaps), # of errors, etc. What is the best/recommended way to accomplish this? Is it WMI or performance counters? Is this data viewed using PerfMon or WMI CIM Studio? Does any approach allow one to monitor the service real-time as well as providing historical analysis? I can dig into the details myself but would appreciate some broad guidance to help demystify this subject.

    Read the article

  • c# Active Directory via WMI

    - by Juri Bogdanov
    Hi! Does anyone has some example about accessing Active Directory, LDAP querying using WMI (System.Management namespace) and not System.DirectoryServices namespace. Here on MSDN page it is described a little using CIM classes http://msdn.microsoft.com/en-us/library/aa392320(v=VS.85).aspx But I cant find some C# example realizing it. For example, to access some Win32 class you have to initialize Scope object to use CIMV2 namespace private ConnectionOptions connection; private ManagementScope scope; ... connection = new ConnectionOptions(); ... scope = new ManagementScope("\\\\" + computer + "\\root\\CIMV2", connection); try { scope.Connect(); } And use ObjectQuery class for querying WMI data ObjectQuery objectQuery = new ObjectQuery("SELECT Name FROM Win32_Processor"); ManagementObjectSearcher searcher = ManagementObjectSearcher(scope, objectQuery); foreach (ManagementObject queryObj in searcher.Get()) { return queryObj["Name"].ToString(); } How is it possible to access AD using the same scope? Thanks :)

    Read the article

  • How to determine OS Platform with WMI?

    - by cary.wagner
    I am trying to figure out if there is a location in WMI that will return the OS Architecture (i.e. 32-bit or 64-bit) that will work across "all" versions of Windows. I thought I had figured it out looking at my Win2k8 system when I found the following: Win32_OperatingSystem / OSArchitecture I was wrong. It doesn't appear that this field exists on Win2k3 systems. Argh! So, is anyone aware of another field in WMI that "is" the same across server versions? If not, what about a registry key that is the same? I am using a tool that only allows me to configure simple field queries, so I cannot use a complex script to perform. Any help would be greatly appreciated! Cheers... Cary

    Read the article

  • Is Win32_PerfFormattedData_PerfDisk_PhysicalDisk missing from WMI in Vista?

    - by Martin
    From what I understand, the following script should work in Windows XP and higher, but it doesn't work for me in Vista Business 32-bit Service Pack 2. Thus far I have been very unsuccessful googling for information about this performance class. strComputer = "." Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2") Set colApps = objWMIService.ExecQuery("Select * from Win32_PerfFormattedData_PerfDisk_PhysicalDisk") For Each objApp in colApps Wscript.Echo objApp.Caption Next Does this WMI class simply not exist in Vista? If it is just me, is there a way to fix WMI? I have already tried running winmgmt /resetrepository and winmgmt /resyncperf and neither helps.

    Read the article

  • How to get Drive Letter Using WMI

    - by new
    i get the vid and pid of the usb devices plugged into my system using WMI. Now i want to get the drive letter corresponding to the device vid and pid i retrievd. code hres = pSvc->ExecQuery( bstr_t("WQL"), bstr_t("SELECT * FROM Win32_USBControllerDevice"), WBEM_FLAG_FORWARD_ONLY | WBEM_FLAG_RETURN_IMMEDIATELY, NULL, &pEnumerator); if (FAILED(pclsObj->Get(L"Dependent", 0, &vtProp, 0, 0))) { cout<<"The specified property is not found."<<endl; } else { wcout <<vtProp.bstrVal << endl; } i get like below \NJ96\root\cimv2:Win32_PnPEntity.DeviceID="USB\VID_1A8D&PID_1000\35809402 0874450" how can i map DRIVE LETTER to my above output using the WMI please help me out

    Read the article

  • WMI to reboot remote machine

    - by Stephen Murby
    I found this code on an old thread to shutdown the local machine: using System.Management; void Shutdown() { ManagementBaseObject mboShutdown = null; ManagementClass mcWin32 = new ManagementClass("Win32_OperatingSystem"); mcWin32.Get(); // You can't shutdown without security privileges mcWin32.Scope.Options.EnablePrivileges = true; ManagementBaseObject mboShutdownParams = mcWin32.GetMethodParameters("Win32Shutdown"); // Flag 1 means we want to shut down the system. Use "2" to reboot. mboShutdownParams["Flags"] = "1"; mboShutdownParams["Reserved"] = "0"; foreach (ManagementObject manObj in mcWin32.GetInstances()) { mboShutdown = manObj.InvokeMethod("Win32Shutdown", mboShutdownParams, null); } } Is it possible to use a similar WMI method to reboot flag"2" a remote machine, for which i only have machine name, not IPaddress. EDIT: I currently have; SearchResultCollection allMachinesCollected = machineSearch.FindAll(); Methods myMethods = new Methods(); string pcName; ArrayList allComputers = new ArrayList(); foreach (SearchResult oneMachine in allMachinesCollected) { //pcName = oneMachine.Properties.PropertyNames.ToString(); pcName = oneMachine.Properties["name"][0].ToString(); allComputers.Add(pcName); MessageBox.Show(pcName + "has been sent the restart command."); Process.Start("shutdown.exe", "-r -f -t 0 -m \" + pcName); } but this doesn't work, and i would prefer WMI going forward.

    Read the article

  • WMI Security error TF255437 when installing TFS 2010 RC

    - by Daniel O
    Does anyone know the resolution to the following error. In this scenario, TFS will be using a local report server instance which points uses a separate SQL Server database engine instance. An error occurred while querying the Windows Management Instrumentation (WMI) interface on the following computer databaseServer. The following error message was received: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)).

    Read the article

  • WMI failed to initialize the IWbemLocator using CoCreateInstance(CLSID_WbemLocator, 0, CLSCTX_INPROC

    - by Rahul
    Hi All, I am using WMI to get SMBIOS data and for that I am using following code to initialize the IWbemLocator interface through a call to CoCreateInstance. CoCreateInstance(CLSID_WbemLocator, 0, CLSCTX_INPROC_SERVER, IID_IWebLocator, (LPVOID *) &pLoc); But it always returns FAILURE. I think its due to some environment issue but wanted to know exact reason. Thanks in advance, Rahul

    Read the article

  • build notification in visual Studio 2008\2010 - WMI etc

    - by AWC
    I want to be notified when a build has been completed\failed in visual studio and I DO NOT want to use pre\post build steps, I want an external process or VS plugin that will count the number of builds. So is there anyway to achieve this using something like WMI or other such technology? I'm not interested in third party libaries, I want to write a plugin for visual studio.

    Read the article

  • "Win32 exception occurred releasing IUnknown at..." error using Pylons and WMI

    - by Anders
    Hi all, Im using Pylons in combination with WMI module to do some basic system monitoring of a couple of machines, for POSIX based systems everything is simple - for Windows - not so much. Doing a request to the Pylons server to get current CPU, however it's not working well, or atleast with the WMI module. First i simply did (something) this: c = wmi.WMI() for cpu in c.Win32_Processor(): value = cpu.LoadPercentage However, that gave me an error when accessing this module via Pylons (GET http://ip:port/cpu): raise x_wmi_uninitialised_thread ("WMI returned a syntax error: you're probably running inside a thread without first calling pythoncom.CoInitialize[Ex]") x_wmi_uninitialised_thread: <x_wmi: WMI returned a syntax error: you're probably running inside a thread without first calling pythoncom.CoInitialize[Ex] (no underlying exception)> Looking at http://timgolden.me.uk/python/wmi/tutorial.html, i wrapped the code accordingly to the example under the topic "CoInitialize & CoUninitialize", which makes the code work, but it keeps throwing "Win32 exception occurred releasing IUnknown at..." And then looking at http://mail.python.org/pipermail/python-win32/2007-August/006237.html and the follow up post, trying to follow that - however pythoncom._GetInterfaceCount() is always 20. Im guessing this is someway related to Pylons spawning worker threads and crap like that, however im kinda lost here, advice would be nice. Thanks in advance, Anders

    Read the article

  • WMI Win32_OperatingSystem OSArchitecture field causes exception

    - by Andrew J. Brehm
    I am trying to get information on the version of Windows installed from WMI. Most fields work. I can get the operating system "Name" as well as the "Version", both are fields of the Win32_OperatingSystem object I have. But another field "OSArchitecture" generates an exception ("Not found"). strScope = "\\" + strServer + "\root\CIMV2" searcher = New ManagementObjectSearcher(strScope, "SELECT * FROM Win32_OperatingSystem") For Each mo In searcher.Get strOSName = mo("Name") strOSVersion = mo("Version") strOSArchitecture = mo("Architecture") strStatus = mo("Status") strLastBoot = mo("LastBootUpTime") Next Ignore the for each loop, I don't think it has anything to do with the field missing. The documentation says that the field ought to exist and is a String: http://msdn.microsoft.com/en-us/library/aa394239(VS.85).aspx Any ideas?

    Read the article

  • WMI Win32_OperatingSystem OSArchitecture field causes exception

    - by Andrew J. Brehm
    I am trying to get information on the version of Windows installed from WMI. Most fields work. I can get the operating system "Name" as well as the "Version", both are fields of the Win32_OperatingSystem object I have. But another field "OSArchitecture" generates an exception ("Not found"). strScope = "\\" + strServer + "\root\CIMV2" searcher = New ManagementObjectSearcher(strScope, "SELECT * FROM Win32_OperatingSystem") For Each mo In searcher.Get strOSName = mo("Name") strOSVersion = mo("Version") strOSArchitecture = mo("Architecture") strStatus = mo("Status") strLastBoot = mo("LastBootUpTime") Next The documentation says that the field ought to exist and is a String: http://msdn.microsoft.com/en-us/library/aa394239(VS.85).aspx Any ideas?

    Read the article

  • C# WMI Eventwatcher code stopped working on Windows 7 with security exception

    - by Flores
    This is code that worked fine on Windows XP for years. User is not local administrator. WqlEventQuery query = new WqlEventQuery("SELECT * FROM Win32_ProcessStopTrace"); ConnectionOptions co = new ConnectionOptions(); co.EnablePrivileges = true; ManagementEventWatcher watcher = new ManagementEventWatcher(new ManagementScope(@"root\cimv2",co), query); watcher.EventArrived += StopEventArrived; watcher.Start(); This throws an SecurityException on Windows 7, Access Denied when running as a non admin. On XP this works fine without being admin. On this link MS states that 'Windows 7: Low-integrity users have read-only permissions for local WMI operations.'. I guess this is the problem. But I can't find any clue on how to change this.

    Read the article

  • Creating a service that takes parameters with WMI

    - by Johan_B
    I want to create a service that takes some parameters. How do I do this with WMI? In the commandline, it was sc create ServiceName binPath= ""C:\Path\Service.exe\" /Service somefile1.xml somefile2.xml" start=auto DisplayName="DisplayName" I have tried to use ManagementBaseObject inParams = managementClass.GetMethodParameters("create"); inParams["CommandLine"] = ""C:\Path\Service.exe\" somefile1.xml somefile2.xml" inParams["StartMode"] = StartMode.Auto; inParasm["DisplayName"] = "displayName"; but I do not know how to pass the two xml files? Any help will be greatly appreciated. Thanks! JB

    Read the article

  • C# WMI Process Differentiation!?

    - by Goober
    Scenario I have a method that returns a list of processes using WMI. If I have 3 processes running (all of which are C# applications) - and they all have THE SAME PROCESS NAME but different command line arguments, how can I differentiate between them If I want to start them or terminate them!? Thoughts As far as I can see, I physically cannot differentiate between them, at least not without having to use the Handle, but that doesn't tell me which one of them got terminated because the others will still sit there with the same name........ ....really stumped, help greatly appreciated!

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >