Search found 1966 matches

by penpen
23 Apr 2023 05:54
Forum: DOS Batch Forum
Topic: 256 colors in virtual terminal escape sequence
Replies: 41
Views: 45399

Re: 256 colors in virtual terminal escape sequence

The color map (at least on my pc) is piecewise linear. 1) Indices 0x00 - 0x0F contain the most non-linear part: ( 0, 0, 0), (128, 0, 0), ( 0, 128, 0), (128, 128, 0), ( 0, 0, 128), (128, 0, 128), ( 0, 128, 128), (192, 192, 192), (128, 128, 128), (255, 0, 0), ( 0, 255, 0), (255, 255, 0), ( 0, 0, 255),...
by penpen
03 Apr 2023 16:39
Forum: DOS Batch Forum
Topic: Batch multiple UP calls from Main Batch not works!?
Replies: 4
Views: 3058

Re: Batch multiple UP calls from Main Batch not works!?

I assume the error is caused by using the wrong environment variable named "Aufruf:" instead of "Aufruf", like you did in "Linie2.bat":

Code: Select all

:: Linie2.bat
set /p Aufruf="Aufruf:"
:: versus
set /p Aufruf:="Aufruf:"

penpen
by penpen
03 Apr 2023 16:13
Forum: DOS Batch Forum
Topic: Parallax background, and overlapping images properly
Replies: 14
Views: 16778

Re: Parallax background, and overlapping images properly

If i remember correct, then you can find those in the Templates for Parallax zip-file IcarusLives linked somewhere above, but under a diffferent name:
- "template1.ppm" is "cloud1.ppm"
- "template2.ppm" is "mountain1.ppm"
- "template3.ppm"should contain another mountain version.


penpen
by penpen
03 Apr 2023 15:35
Forum: DOS Batch Forum
Topic: How to check if a wired connection is present in a batch file?
Replies: 2
Views: 1471

Re: How to check if a wired connection is present in a batch file?

The following might help you:

Code: Select all

powershell -NoProfile -Command get-NetIPConfiguration
Though i would add debug messages (using echo) and pauses, to see the program flow.
In case you don't have a visible console on login, you might redirect the echoes and avoid the pause commands instead.


penpen
by penpen
21 Feb 2023 17:12
Forum: DOS Batch Forum
Topic: Delect Registry Key
Replies: 5
Views: 2780

Re: Delect Registry Key

I actually can't test it, but it might be the space characters, that break the value early, so you might encapsulate the value "c:\Program Files\Common Files\Corel\" in doublequotes.

penpen
by penpen
18 Jan 2023 08:15
Forum: DOS Batch Forum
Topic: Exporting two keys from Registry residing in two different places on Windows 10
Replies: 9
Views: 15832

Re: Exporting two keys from Registry residing in two different places on Windows 10

What you see there is a character encoding issue. Somehow the resulting file was created with the byte order mark (bom) of 'UTF-16 LE' (which could happen for various reasons). Then the reg file was appended. Save the text into a file using encoding 'UTF-16 LE'. Then open it within a hex-editor. Del...
by penpen
11 Dec 2022 06:22
Forum: DOS Batch Forum
Topic: This is really stupid but
Replies: 1
Views: 6311

Re: This is really stupid but

In case your computer runs on the "pro", "enterprise" or "educational" version of windows 10 (probably the same under Windows 11), then you may use "msg" or "net send ..." commands to send messages to computers in your local network: msg /SERVER:DestinationPC * /TIME:60 "Sample message to pc 'Destin...
by penpen
04 Nov 2022 02:59
Forum: DOS Batch Forum
Topic: [Destructive, Use Caution] Copy tags and its child elements from specific XML schema
Replies: 23
Views: 11273

Re: Copy tags and its child elemnts from specific XML schema

Though i like Aacini's version, it is not completely safe (for example if you change the codepage of the source-xml).
Here is an example for how to read and process xml using jscript (in the hybrid "xslt.bat") in a safe way:
viewtopic.php?p=32941#p32941.
by penpen
29 Sep 2022 08:45
Forum: DOS Batch Forum
Topic: [CLARIFIED] Executing command via FOR results in not recognized
Replies: 4
Views: 2696

Re: Executing command via FOR results in not recognized

Is there information about why FOR treats space characters as commands instead of ignoring them? It deviates from default behavior imo. It is the default behaviour: If you escape a character (using the circumflex-character '^'), or add characters when the interpreter expects text starting with esca...
by penpen
28 Sep 2022 07:17
Forum: DOS Batch Forum
Topic: [CLARIFIED] Executing command via FOR results in not recognized
Replies: 4
Views: 2696

Re: Executing command via FOR results in not recognized

That's not "nothing" - it's a space-character. Since the space-character is no valid command, the error message is correct. Typically space characters are treated as whitespace characters and will not end up beeing treated as a command. But you can force cmd to treat the space-character as a command...
by penpen
19 Aug 2022 02:29
Forum: DOS Batch Forum
Topic: How do I check the length of a filename in batch script?
Replies: 1
Views: 1974

Re: How do I check the length of a filename in batch script?

You could store the filename into an environment variable and then check the length of that string using the :strlen-function.

penpen
by penpen
19 Jul 2022 02:16
Forum: DOS Batch Forum
Topic: How to pause and resume a task?
Replies: 3
Views: 3028

Re: How to pause and resume a task?

Just a small sidenote to the net-approach:
The net command (at least under windows 10) does support the switches PAUSE and CONTINUE (to pause and resume a task).
You don't need to terminate and (re)start the process (using STOP and START).

penpen
by penpen
15 Jun 2022 02:14
Forum: DOS Batch Forum
Topic: How to get rid of The file cannot be copied onto itself.
Replies: 3
Views: 4596

Re: How to get rid of The file cannot be copied onto itself.

You should copy your files to a temporary folder (preferably on the same volume) and then move them to the final location.

penpen
by penpen
30 May 2022 03:24
Forum: DOS Batch Forum
Topic: Dynamically change icon in context menu
Replies: 38
Views: 32247

Re: Dynamically change icon in context menu

I can't check myself (since i I have no Win11), So i can list only two potential issues i see ad hoc: Microsoft might have changed the GUID of the power plans. You could compare the GUID used in "ChangePowerPlan.reg" with the GUID listed by following command: powercfg.exe /L If there was a change, t...
by penpen
24 May 2022 09:15
Forum: DOS Batch Forum
Topic: ahci.sys
Replies: 12
Views: 16963

Re: ahci.sys

I don't remember any driver named "AHCI.SYS", but i think i remember one named "AHCICD.SYS", so no guarantees for the following: If i remember right, then the "AHCICD.SYS" has an optional parameter "/C:<#AHCI-Controller>", where "<#AHCI-Controller>" is a digit from 0 to 9. If you leave out that para...