Questions tagged [wmic]

WMIC stands for Windows Management Instrumentation Command-line

WMIC stands for Windows Management Instrumentation Command-line. It uses the power of Windows Management Instrumentation (WMI) to enable systems management from the command line. WMIC extends WMI for operation from several command-line interfaces and through batch scripts. WMIC gives you a powerful, user-friendly interface to the WMI namespace.

More information

734 questions
4
votes
1 answer

Prevent wmic.exe from writing TempWmicBatchFile.bat

I want to check within my Java application whether the windows virtual keyboard is already running or not. I searched for it and found, that I can use wmic.exe to search for a process. This is what I'm doing: Process proc =…
4
votes
2 answers

How to set column-order in wmic output?

I use wmic mostly as a linux-ps-equivalent in this way: wmic process where (name="java.exe") get processId, commandline But the output columns are ordered alphabetically so I get: CommandLine ProcessId java -cp ...…
Superole
  • 1,329
  • 21
  • 29
3
votes
1 answer

Difference between WUA IUpdateSearcher and wmic qfe

I am trying to figure out what are the differences between WUA (Windows Update Agent API) IupdateSearcher and wmic qfe list. When I use WUA IupdateSearcher I get these updates: (New-Object -ComObject…
3
votes
2 answers

How to suppress the output of wmic

Does anyone know how to suppress the msg "No Instance(s) Available." from the following command? Your help is highly appreciated in advance! wmic process where (name="java.exe") get commandline | findstr /i /c:"xxx" 1>nul 2>&1
Tracy
  • 31
  • 1
  • 2
3
votes
1 answer

Get accurate file creation date from Python on Windows 10

I'm trying to get accurate (with ms resolution) creation date of a file using python. The way to get accurate creation date on Window is to use wmic. So I've prepared a simple shell command to read the creation date: wmic datafile where…
Filartrix
  • 157
  • 1
  • 10
3
votes
3 answers

How to remove new lines in batch file?

I'm working on batch file and export to text file. Seem all of them is ok, but when i open text file, many new lines break. So, i want to remove of them. @echo OFF setlocal EnableDelayedExpansion ( systeminfo |findstr /c:"Host Name" /c:"OS Name"…
Headshot
  • 423
  • 1
  • 6
  • 22
3
votes
1 answer

Check if WMIC is installed, writing data into files from batch file

I am using the Windows Management Instrumentation Command-line (WMIC) for reading data from a computer like it's Hardware components and IP settings. As I am using a batch file (Windows) for filling files for each computer/node with data the query…
matthias
  • 247
  • 6
  • 17
3
votes
0 answers

PM2 Error - Error: Error: spawn wmic ENONET

I'm currently working on a Discord Bot using javascript. I recently updated my NodeJS version to the LTS (12.16.2), my npm to 5.7.1 and my pm2 to 4.4.0. I can start my process perfectly fine with "pm2 start index.js", however as the process goes…
Harrison Howard
  • 345
  • 3
  • 13
3
votes
0 answers

Remote WMI Traffic

I have a problem understanding remote WMI traffic. Let's say I have 2 PC's in a LAN (PC-A and PC-B). From PC-A i type in CMD: wmic /node:"PC-B" /user:"B" /password:"whatever" computersystem get "name" There now should be traffic inside the LAN…
Kfir
  • 31
  • 4
3
votes
0 answers

WMI Access Denied while Win32_Service query

I'm using WMI to retrieve REMOTE computer services. To check the results I try WMIC like: WMIC /NODE:"hostname" /USER:"login" /PASSWORD:"pwd" OS WMIC /NODE:"hostname" /USER:"login" /PASSWORD:"pwd" SERVICE etc. Everything's fine on Win server 2k3…
user723534
3
votes
1 answer

Read windows registry info from remote system using Jacob

Im trying to run some WMI queries using JACOB, and so far i've been successfull in getting the services and processes however i need to query the registry to see if a certain key is there i've stummbled across this link but i dont understand how to…
naoru
  • 2,149
  • 5
  • 34
  • 58
3
votes
3 answers

Command Line output still remains as null using WMIC, but displays in taskmgr gui (Windows)

the below shows display in the GUI of frmweb.exe process ( attached image/png ) where command line arguments are visible. when the same is tried to be captured via command line it throws null. steps below is pasted as text. Need help with this,…
Nizam - Madurai
  • 312
  • 3
  • 13
3
votes
1 answer

How to parse WMIC printer list full

When I use the following command, it outputs a text file with a computer's printer information: wmic printer list full >> c:\computer_printers.txt However, the list is very long, and I only want to see the fields for DriverName, Name, and Portname…
Ty Flo
  • 45
  • 2
  • 2
  • 5
3
votes
2 answers

Remove programs from Windows startup with a .bat file

I am trying to create a .bat file that removes applications from Startup in Windows 10. What I am trying to achieve is that after the .bat file has been executed these apps are removed and won't start automatically the next time Windows boots. I…
user4421334
  • 41
  • 1
  • 4
3
votes
0 answers

How to set system datetime in UTC

So i need to script setting the system datetime from commandline (CMD.exe, BATCH possible) but im facing difficulties with time zones vs UTC and such. My datetime source is UTC, which is the most portable and therefor makes sense. Originally this…
BNT
  • 936
  • 10
  • 27