Search found 208 matches
- 14 Jun 2022 03:22
- Forum: DOS Batch Forum
- Topic: JREPL.BAT v8.6 - regex text processor with support for text highlighting and alternate character sets
- Replies: 550
- Views: 2166654
Re: JREPL.BAT v8.6 - regex text processor with support for text highlighting and alternate character sets
My explaination is that if two JREPL instances are by chance executed at exactly the same moment, the temp files will overlap and produce strange bugs. That's true. Once I had the same issue in a pipe which looks like this: C:\Temp>type z.bat @echo:%RANDOM%>&2 C:\Temp>z | z 1826 1826 By the followi...
- 02 Jun 2022 01:37
- Forum: DOS Batch Forum
- Topic: How to determine privileges?
- Replies: 6
- Views: 9041
Re: How to determine privileges?
Is there any documentation about what particular privileges these levels include? I don't know. At least I googled up the link as in my previous post and the short description in wiki: https://en.wikipedia.org/wiki/Mandatory_Integrity_Control. I think that the particular privileges are subjects of ...
- 27 May 2022 05:57
- Forum: DOS Batch Forum
- Topic: How to determine privileges?
- Replies: 6
- Views: 9041
Re: How to determine privileges?
I don't know why I have never seen this easy way. The following command gives the relevant result: whoami /groups /fo list | findstr /e S-1-16-[0-9]* Below is the full solution. It's a bit redundant but comprehensive enough. setlocal set "S-1-16-0=untrusted" set "S-1-16-4096=low" set "S-1-16-8192=me...
- 26 May 2022 06:32
- Forum: DOS Batch Forum
- Topic: How to determine privileges?
- Replies: 6
- Views: 9041
Re: How to determine privileges?
This command whoami /groups |findstr /i "\<S-1-5-32-544\>" is not informative because its output is still localized (the first line is under usual cmd.exe; the second one is under cmd.exe with elevated privileges): BUILTIN\Администраторы Псевдоним S-1-5-32-544 Группа, используемая только для запрета...
- 26 May 2022 05:28
- Forum: DOS Batch Forum
- Topic: How to determine privileges?
- Replies: 6
- Views: 9041
How to determine privileges?
Previously (on Win10 English version) I used this code to identify my privileges and have been happy: for /f "tokens=3 delims=\ " %%a in ( ' call "%SystemRoot%\system32\whoami.exe" /groups ^| findstr /b /c:"Mandatory Label" ' ) do if /i "%%~a" == "system" ( echo:system ) else if /i "%%~a" == "high" ...
- 11 Mar 2022 10:28
- Forum: DOS Batch Forum
- Topic: Replace multiple string and regexp
- Replies: 2
- Views: 5126
Re: Replace multiple string and regexp
Object.keys is not defined in ms/jscript. The code you posted throws error because ms/jscript doesn't support many features. However it can be successfully run under nodejs. You need use nodejs or define Object.keys on your own.
- 04 Mar 2022 04:33
- Forum: DOS Batch Forum
- Topic: Markdown to HTML converter
- Replies: 4
- Views: 9740
Re: Markdown to HTML converter
My converter is a pure, standalone Batch file. The script I posted above is pure and standalone batch version as well. I edited the last message to make it clearer. I am not sure, if it's possible to implement md-2-html converter in pure batch without any external tools (like pandoc, wget and curl)...
- 02 Mar 2022 15:58
- Forum: DOS Batch Forum
- Topic: Markdown to HTML converter
- Replies: 4
- Views: 9740
Re: Markdown to HTML converter
I'm glad to announce a new version of the script. Changes since the last publication - add the new option -r to display the raw html (no head, no CSS; html body only) - arbitrary order of options (batch) - improve reading a token from the token file (perl, batch) - enable arbitrary order for options...
- 28 Feb 2022 20:11
- Forum: DOS Batch Forum
- Topic: Wmic.exe
- Replies: 26
- Views: 37887
Re: Wmic.exe
Is there any way to change these code segments: I can see that you changed the code to enable wmi aliases and you invoke new Enumerator twice simply just to check if it's class itself or its alias. It's not optimal for now. I am not 100% sure that understand exactly what you want. Do you mean to ad...
- 27 Feb 2022 09:16
- Forum: DOS Batch Forum
- Topic: Wmic.exe
- Replies: 26
- Views: 37887
Re: Wmic.exe
... the ancient use of double-colons to insert comments in a Batch-file, nor the triple-colon for help texts I didn't realized why double-, triple- or any-colons are of old-fashioned style except error raising within blocks. Honestly, I don't like any existing option used (by me or others) for putt...
- 24 Feb 2022 19:12
- Forum: DOS Batch Forum
- Topic: Wmic.exe
- Replies: 26
- Views: 37887
Re: Wmic.exe
I decided add my 5 cents to this topic. There is the next version of wmiClass hybrid. I took the version 1.1 by Aacini and performed the following changes: - Rethink usage and rewrite the code significantly - Add examples into the help message - Add /where , the new option for limiting the number of...
- 27 Jan 2022 05:37
- Forum: DOS Batch Forum
- Topic: The fastest way to detect internal IP address
- Replies: 8
- Views: 11379
Re: The fastest way to detect internal IP address
... ipconfig ^| findstr IPv4 ... nslookup myip.opendns.com resolver1.opendns.com 2^>nul ... I don't recommend to rely on the outcomes of ipconfig and other CLI tools (for example, netsh interface) used in Windows. I found that most of them are localized so the first command fails (tested in Russian...
- 26 Jan 2022 09:28
- Forum: DOS Batch Forum
- Topic: The fastest way to detect internal IP address
- Replies: 8
- Views: 11379
Re: The fastest way to detect internal IP address
Filtering on 0.0.0.0 only gives you the interfaces that are connected to the Internet... Yes. It's exactly what I want. But... ... not those on private LANs isolated from the outside world. (A common case for servers at work!) I agree that for isolated hosts it gives falsy result. However, in any c...
- 19 Jan 2022 05:17
- Forum: DOS Batch Forum
- Topic: The fastest way to detect internal IP address
- Replies: 8
- Views: 11379
- 17 Jan 2022 12:04
- Forum: DOS Batch Forum
- Topic: The fastest way to detect internal IP address
- Replies: 8
- Views: 11379
The fastest way to detect internal IP address
I use the following command to detect internal IP address (the 4th field): netstat -rn | findstr "\<0.0.0.0\>" In my opinion it's too slow. I think it's because of netstat as the slowest command itself. I'd like use faster command so route print, powershell or querying wmic don't cover my requiremen...