Search found 1966 matches

by penpen
27 Dec 2021 08:35
Forum: DOS Batch Forum
Topic: HDD size
Replies: 8
Views: 5441

Re: HDD size

I also don't know that and would expect it to work lke aGerman assumed; but you might test that for yourself, since you already seem to have such a setup (maybe you could get the information of all hdds remotely and check of one differs too muc; my partitions don't sum up to the disk size, which pro...
by penpen
26 Nov 2021 07:36
Forum: DOS Batch Forum
Topic: Coding challenge for any interested parties
Replies: 20
Views: 9899

Re: Coding challenge for any interested parties

You should also check against code injection inputs like 'test=123" & echo(' with a big enough length like 10. I only found one reliable way to check whether the input string is empty. I'm not sure if i should post it here as it may spoil the fun out of it for others to discover that for themselves....
by penpen
24 Nov 2021 16:16
Forum: DOS Batch Forum
Topic: Coding challenge for any interested parties
Replies: 20
Views: 9899

Re: Coding challenge for any interested parties

I think, you need to provide some more detail on the input: - the encoding of the characters: Which codepage do you assume to be used? - the source type: Is the input stored in file or do you retrieve that from STDIN? - the source format: Is there a delimiter, that seperates both inputs (string and ...
by penpen
21 Nov 2021 17:47
Forum: DOS Batch Forum
Topic: How to close cmd after Programm startet
Replies: 4
Views: 3315

Re: How to close cmd after Programm startet

I'm not familiar with OpenJDK, but if it's similar to the JDK, then there are two executables: One for windows ("javaw.exe") and one for the console window ("java.exe"). If you start the console version, then the console will stay open, because its streams (STDIN, STDOUT and STDERR) are connected wi...
by penpen
12 Nov 2021 08:35
Forum: DOS Batch Forum
Topic: Detect echo state without temporary file
Replies: 14
Views: 16455

Re: Detect echo state without temporary file

jeb wrote:
22 Oct 2021 07:55
Looks odd, but seems to work, I can't create a file which is fetched by the "?<" expression.
Shouldn't it match any file with no extension,
or does "replace" ignore those undocumented wildcards?
by penpen
12 Nov 2021 08:20
Forum: DOS Batch Forum
Topic: Download files with certutil -urlcache
Replies: 3
Views: 3777

Re: Download files with certutil -urlcache

-- is it really reliable method to download any file (the first form, or second one or both)? -- are there any restrictions in using this tool? The option "-split" might be needed depending on how the server you are downloading from answers your request. If the file you want to get is send as an im...
by penpen
12 Nov 2021 08:04
Forum: DOS Batch Forum
Topic: Batch file edit text file
Replies: 20
Views: 45615

Re: Batch file edit text file

When there are unknown numbers in a particular place, then you either have to get to know those (e.g. using the "for/f"-command), or have to use something that is able to search for structures in strings. So that depends on the source file you want to process; if there's are only a single (or very f...
by penpen
28 Sep 2021 17:22
Forum: DOS Batch Forum
Topic: display time in 12 hr
Replies: 25
Views: 27677

Re: display time in 12 hr

I don't know about the bug you mentioned, so the following might or might not ne usefull. In my experience a changing offset is caused by the "Set Time Zone Automatically" feature, which is realized by an informed guessing of your current geolocation; see: https://docs.microsoft.com/en-us/uwp/api/Wi...
by penpen
18 Sep 2021 18:58
Forum: DOS Batch Forum
Topic: Drag and Drop batch file correction
Replies: 1
Views: 3193

Re: Drag and Drop batch file correction

I am not familiar with the command line arguments of the tool "ffmpeg".
Do you have a working sample line for a single file?

penpen
by penpen
05 Sep 2021 09:52
Forum: DOS Batch Forum
Topic: How to return ascii value in 'bg _Kbd'
Replies: 9
Views: 6496

Re: How to return ascii value in 'bg _Kbd'

The parameter "_Kbd" commands the bg.exe tool to read a character from the input buffer if present, else returns 0.
As this is clearly not what you (back_slash) are looking for, you should follow Steffen's suggestion to use "Kbd" instead.

penpen
by penpen
28 Aug 2021 13:20
Forum: DOS Batch Forum
Topic: How to make a custom mouse cursor in batch?
Replies: 16
Views: 9841

Re: How to make a custom mouse cursor in batch?

You might hook into an actual process which uses a console window, create a custom subclass overloading the actual "OnSetCursor()" function and replace the actual console instance with its subclass. But I'm pretty sure, that is highly risky, as you have no idea if someone else had the same idea and ...
by penpen
29 Jun 2021 06:02
Forum: DOS Batch Forum
Topic: Why does this run net1.exe?
Replies: 15
Views: 12472

Re: Why does this run net1.exe?

I rechecked the results for the "netbios.dll"/"n<s" on my system with a path set to the test drectory only: Confirmed not executing "net.exe" in that scenario. (Maybe it's somehow is connected with the fact that i upgraded to win10 prof from win8.1 - but that's a shot into the blue.) Also, since "n<...
by penpen
28 Jun 2021 05:42
Forum: DOS Batch Forum
Topic: Why does this run net1.exe?
Replies: 15
Views: 12472

Re: Why does this run net1.exe?

"no<<<<<" Launches notepad.exe, but in the top left corner of notepad window the icon does not look like notepad's. Also in the taskbar, the notepad window does not have the notepad icon. I'm betting the icon resource lookup doesn't recognize wildcards. According to "Process Monitor" (link in my fi...
by penpen
28 Jun 2021 05:30
Forum: DOS Batch Forum
Topic: Why does this run net1.exe?
Replies: 15
Views: 12472

Re: Why does this run net1.exe?

On your system, what is the FIRST file returned from: DIR "%Windir%\System32\n<s.*" If you follow the 5 backtracking steps I showed, does it result in net.EXE ? On my system, the first file returned (of 12 files, including netbios.dll ) in DIR " C:\Windows\System32\n<s.* " is NarratorControlTemplat...
by penpen
27 Jun 2021 17:41
Forum: DOS Batch Forum
Topic: Why does this run net1.exe?
Replies: 15
Views: 12472

Re: Why does this run net1.exe?

It's likely there's a matching file ending in "4" on your system. Yes, the file "Netwuw04.dll" ends on the character '4'. Applying this to the OP's example (on my system): "n<z" While i agree with most you said, there is a nitpick. I have a file named "netbios.dll" in "C:\Windows\System32". Therefo...