Search found 34 matches
- 2024-Feb-26, 4:08 pm
- Forum: Windows CMD Shell
- Topic: Puzzled by Delims
- Replies: 4
- Views: 590
Re: Puzzled by Delims
Okay, changing tokens=2 solves the problem. It doesn't seem to matter whether delims==" or delims=^=" is used? For clarity, this is IMO the better option delims=^="
- 2024-Feb-22, 3:45 pm
- Forum: Windows CMD Shell
- Topic: Puzzled by Delims
- Replies: 4
- Views: 590
Puzzled by Delims
I want to know the name / make of a pc. So I use this command: wmic csproduct get name /format:list This returns Name=HP Z240 Tower Workstation Now I would like to strip the Name= part, so I use this: FOR /F "usebackq tokens=* delims=Name=" %%F IN (`wmic csproduct get name /format:list ^| ...
- 2024-Feb-22, 2:58 pm
- Forum: Windows CMD Shell
- Topic: Is there any universal way to redirect file operations to nul?
- Replies: 4
- Views: 651
Re: Is there any universal way to redirect file operations to nul?
I think it depends on the program you run? As soon as you start a program, cmd is no longer in control. That is, you can suppress the console output of a program (most of the times), but I don't think you can fiddle with any data operations the program performs.
- 2024-Feb-20, 9:38 am
- Forum: Windows CMD Shell
- Topic: Certificate Storenames
- Replies: 1
- Views: 283
Certificate Storenames
Deploying certificates using a GPO isn't always working correct, so I decided to install certificates using the domain Startup-script. Certutil it is. CertificateStoreName turned out to be a bit difficult. I thought I could use the name listed in the Certificates MMC Snap-in, like "Trusted Publ...
- 2024-Jan-22, 2:49 pm
- Forum: Windows PowerShell
- Topic: Inserting PS1 to Tray notification area of Windows for its execution purposes
- Replies: 5
- Views: 17371
- 2024-Jan-08, 2:12 pm
- Forum: Windows CMD Shell
- Topic: TIMEOUT -T
- Replies: 4
- Views: 2569
TIMEOUT -T
Minor thing / nitpicking. The section about Timeout lists -T as option. Windows 10 doesn't need the T-option, like timeout 30 works just as well. Windows 10 also lists it as /T and not as -T.
- 2023-Dec-19, 4:37 pm
- Forum: Windows CMD Shell
- Topic: How can a batch lower the priority ONLY of the cmd that runs it?
- Replies: 1
- Views: 2396
- 2023-Dec-11, 11:14 am
- Forum: Windows CMD Shell
- Topic: What is the best way to check for a disc in an optical drive?
- Replies: 2
- Views: 2154
Re: What is the best way to check for a disc in an optical drive?
Don't know if it's official, but maybe this could help? Like
Code: Select all
wmic logicaldisk where drivetype=5 get volumename
- 2023-Nov-08, 2:59 pm
- Forum: Windows CMD Shell
- Topic: CMD DISM Language
- Replies: 1
- Views: 3352
Re: CMD DISM Language
Maybe this can help you? Look for heading 'Using silent configurations'.
- 2023-Oct-09, 3:47 pm
- Forum: Windows CMD Shell
- Topic: How to detect in 7-Zip fatal error #2 "Wrong password" in windows batch?
- Replies: 2
- Views: 10828
Re: How to detect in 7-Zip fatal error #2 "Wrong password" in windows batch?
You could try to intercept the error text ' ERROR: Data Error in encrypted file. Wrong password? ' by piping the output of 7Zip to the Find command. Don't know the exact syntax for 7Zip, but maybe something like 7z L %userprofile%\downloads\file.7z | find /i "wrong password" And then check...