> Is it 100% reliable way for detecting internal IP address?
Filtering on 0.0.0.0 only gives you the interfaces that are connected to the Internet, not those on private LANs isolated from the outside world. (A common case for servers at work!)
Search found 227 matches
- 24 Jan 2022 03:48
- Forum: DOS Batch Forum
- Topic: The fastest way to detect internal IP address
- Replies: 8
- Views: 7016
- 06 Dec 2021 13:29
- Forum: DOS Batch Forum
- Topic: A batch script for searching in Windows indexed files
- Replies: 0
- Views: 30317
A batch script for searching in Windows indexed files
The Windows 7 Start Menu had one feature I could not live without: The ability to search for local files with multiple criteria. In Microsoft terms, this is querying the Windows Search service, using their Advanced Query Syntax. Windows 10 extended its Start Menu to search on the Internet... But los...
- 05 Dec 2021 12:08
- Forum: DOS Batch Forum
- Topic: How to replace "=","*", ":" in a variable
- Replies: 34
- Views: 287916
Re: How to replace "=","*", ":" in a variable
5 years later, working on a routine for URL-encoding strings, I again faced the problem of replacing = characters in strings. Which brought me back to this thread. I reused the brillant routine posted long ago by @amel5 in comment #5 , but I quickly noticed several issues with that code: - It lost t...
- 15 Oct 2021 02:05
- Forum: DOS Batch Forum
- Topic: Open next menu in programm
- Replies: 9
- Views: 7524
Re: Open next menu in programm
If the goal is to open Notepad and push data into it in a scriptable way, you may try using my 2note.exe program. To use it, send the text that you want to see in Notepad through a pipe. For example: dir C:\Windows\system32 | 2note or type myHugeLogFile.log | findstr /i error | 2note 2note.exe is pa...
- 15 Sep 2021 08:58
- Forum: DOS Batch Forum
- Topic: Testing cmd.exe in Windows 11?
- Replies: 9
- Views: 7569
Re: Testing cmd.exe in Windows 11?
I totally agree with aGerman, they won't risk breaking anything. Just in case, I gave it a try on a VM with the latest preview of Windows 11. 8) The good news is that my Batch debug library works just fine. (albeit unbearably slowly in that VM). As it uses all sorts of undocumented tricks published ...
- 16 Jul 2021 10:14
- Forum: DOS Batch Forum
- Topic: [How-To] Screenshot of Batch window (PowerShell hybrid)
- Replies: 4
- Views: 4182
Re: [How-To] Screenshot of Batch window (PowerShell hybrid)
FYI, in my Systems Tools Library , there's a Get-Console.ps1 script which captures the console window, and puts it into the clipboard. By default, it captures it as HTML with colors . This makes it easy to capture a command output, and paste it into an email or post it on a server. Also the fact tha...
- 20 Jun 2021 11:55
- Forum: DOS Batch Forum
- Topic: Improvements to my tools supporting multiple encodings
- Replies: 6
- Views: 4447
Re: Improvements to my tools supporting multiple encodings
Hi Steffen, Yes, I'm definitely still interested, thanks for sharing your work like this. It's just that I have had less time for working on this lately, as it's the high season for one of my other passions. (Here's what I was doing on Wednesday instead of working 8) .) I'll resume serious work on t...
- 19 Jun 2021 12:11
- Forum: DOS Batch Forum
- Topic: [Solved] How to delete a file with zero byte created accidentally with name "Call" on Windows ?
- Replies: 2
- Views: 3425
Re: [Solved] How to delete a file with zero byte created accidentally with name "Call" on Windows ?
That kind of problem happened to me a few times already. Usually because I had typed Windows cmd.exe commands by mistake in the Linux subsystem Bash prompt. Recently I created like this a file called NUL, which I had a hard time deleting when I finally noticed it on the Windows side of things :oops:...
- 02 Jun 2021 15:23
- Forum: DOS Batch Forum
- Topic: Improvements to my tools supporting multiple encodings
- Replies: 6
- Views: 4447
Improvements to my tools supporting multiple encodings
Hello, I'm still trying to improve the automatic support for multiple text file encodings in my System Tools library . Two things need improvements now: The new Windows Terminal can now display all Unicode characters, including those beyond the 16-bits plane 0. I thought that my method of using UTF-...
- 16 Apr 2021 15:43
- Forum: DOS Batch Forum
- Topic: Windows (and Office?) product key finder
- Replies: 13
- Views: 10170
Re: Windows (and Office?) product key finder
This does not work for me. I tested it on 5 different systems, with different versions of Windows, and it either returns nothing, or a WMI query error.T3RRY wrote: ↑12 Apr 2021 19:54You could simply use:
Code: Select all
wmic path softwarelicensingservice get OA3xOriginalProductKey | findstr /r ".....-"
- 16 Apr 2021 15:36
- Forum: DOS Batch Forum
- Topic: Clobbered cmd.exe!
- Replies: 7
- Views: 10005
Re: Clobbered cmd.exe!
Or you can open a PowerShell. You don't need cmd for that. Then everything will be usable normally, except batch files.
- 22 Feb 2021 09:10
- Forum: DOS Batch Forum
- Topic: Apostrophe at beginning of file name
- Replies: 6
- Views: 6062
Re: Apostrophe at beginning of file name
A few more observations: 1) The problem is not related to the use of the usebackq option. Even without it, I get the very same error for 11-bytes file names: C:\JFL\SRC\Batch\dostips>for /f "delims=" %G IN ('myfile.txt) do @echo %G 'myfile.txt line 1 The system cannot find the file 쾻뭂ᨀ耀∟. C:\JFL\SRC...
- 22 Feb 2021 07:33
- Forum: DOS Batch Forum
- Topic: Best way to setup a "Dictionary" similar to VBA?
- Replies: 16
- Views: 11203
Re: Best way to setup a "Dictionary" similar to VBA?
Except that with real files, it's much slower, and very fragile: If other files have one of these extensions, the code will break.
- 21 Feb 2021 11:40
- Forum: DOS Batch Forum
- Topic: Interpret json with batch
- Replies: 4
- Views: 4759
Re: Interpret json with batch
There's also this beautiful example that aGerman posted last month:
In "JSON file in wrong format" post #4
It is also a Batch/JScript hybrid, and the JScript part creates an HTML object, to use its JSON decoding capabilities.
In "JSON file in wrong format" post #4
It is also a Batch/JScript hybrid, and the JScript part creates an HTML object, to use its JSON decoding capabilities.
- 15 Feb 2021 07:55
- Forum: DOS Batch Forum
- Topic: How to use the output of my first command in my second command in one step?
- Replies: 5
- Views: 4881
Re: How to use the output of my first command in my second command in one step?
This can be done easily using helper scripts: $.bat , described in this thread . regx.bat , from that same System Tools Library. regx.bat makes it easy to get the content of a registry value. It works as if the registry were a filesystem, with keys as directories, and values as files: regx type HKCU...