Search found 1165 matches

by ShadowThief
05 Nov 2023 18:11
Forum: DOS Batch Forum
Topic: Problems working a script
Replies: 6
Views: 30645

Re: Problems working a script

The fact that you're saying that you haven't gotten it suggests to me that you have some way of validating the solution, and so this feels a bit like homework. Depending on your teacher's standards and whether or not you just didn't format the code when you pasted it in here, I could argue that ever...
by ShadowThief
03 Nov 2023 10:14
Forum: DOS Batch Forum
Topic: Is it worth learning Powershell?
Replies: 10
Views: 56801

Re: Is it worth learning Powershell?

I will just add this: I think PS is very good for (some?) admin repetive tasks (why I wrote 'some?'? - because I don't take care of servers but this is based on what I read so I don't have such experiences). I use PS almost daily for some special task: I have (my customer really) 150+ Excel files. ...
by ShadowThief
13 Oct 2023 03:31
Forum: DOS Batch Forum
Topic: variables as paths to run?
Replies: 2
Views: 16568

Re: variables as paths to run?

The /p flag is only meant for prompting the user for input, and you only need quotes around the assignment, not on each side of the equals sign - this isn't an if statement. set "windeployqt6=c:\Qt\6.6.0\mingw_64\bin\windeployqt6.exe" set "sourceDir=c:\Qt\Projects\Sources\game_test" set "appPath=c:\...
by ShadowThief
09 Oct 2023 22:44
Forum: DOS Batch Forum
Topic: Variable inside an IF not showing correctly
Replies: 18
Views: 126449

Re: Variable inside an IF not showing correctly

If you're seeing !variable! instead of its actual value, then you're missing setlocal enabledelayedexpansion from your script. If you're seeing !variable! and its value, then you need to add @echo off to the top of your script.
by ShadowThief
20 Sep 2023 23:04
Forum: DOS Batch Forum
Topic: is there a DOS command for running a program with windows 98 compatibility?
Replies: 11
Views: 30357

Re: is there a DOS command for running a program with windows 98 compatibility?

nnnmmm wrote:
20 Sep 2023 20:59
i found this line in website set __COMPAT_LAYER=WIN98, but i dont know how to use it
That's the entire command; there's nothing else.
https://stackoverflow.com/questions/378 ... 3#37881453
by ShadowThief
20 Sep 2023 13:02
Forum: DOS Batch Forum
Topic: is there a DOS command for running a program with windows 98 compatibility?
Replies: 11
Views: 30357

Re: is there a DOS command for running a program with windows 98 compatibility?

Traditionally you right-click the application, go to Properties, go to the Compatibility tab, and pick the version you want compatibility with.

Windows 11 doesn't let you go older than Vista, so you may want to check out https://pcem-emulator.co.uk/ instead.
by ShadowThief
19 Sep 2023 20:22
Forum: DOS Batch Forum
Topic: [solved] cmd window only displays 16 colors with O/S reinstall
Replies: 5
Views: 9353

Re: cmd window only displays 16 colors with O/S reinstall

There's a registry setting you'll have to change because it's not enabled by default: https://superuser.com/a/1300251

Code: Select all

REG ADD HKCU\CONSOLE /f /v VirtualTerminalLevel /t REG_DWORD /d 1
by ShadowThief
18 Sep 2023 12:21
Forum: DOS Batch Forum
Topic: [solved] cmd window only displays 16 colors with O/S reinstall
Replies: 5
Views: 9353

Re: cmd window only displays 16 colors with O/S reinstall

It almost sounds like you installed an older version of Windows that doesn't support VT100 sequences.
by ShadowThief
18 Sep 2023 11:38
Forum: DOS Batch Forum
Topic: How to interrupt script by closing the CMD window with any key?
Replies: 7
Views: 39106

Re: How to interrupt script by closing the CMD window with any key?

Well you need to press any key twice because the first key ends the timeout command and the second key ends the pause command.

Very odd that timeout doesn't care about the w key though.
by ShadowThief
23 Aug 2023 02:12
Forum: DOS Batch Forum
Topic: avoid trailing space when piping to CLIP [SOLVED]
Replies: 6
Views: 10956

Re: avoid trailing space when piping to CLIP

The interpreter moves things around before it gets executed, so the line that actually gets run is

Code: Select all

SET/P=TEXT 0<NUL  | CLIP
You can see this by running your line by itself in a script with no @echo off
by ShadowThief
07 Aug 2023 19:42
Forum: DOS Batch Forum
Topic: Wrong Color of texts [SOLVED]
Replies: 4
Views: 5990

Re: Wrong Color of texts

In my experience, people choosing custom colors in the options is extremely rare (in the thirty-odd years that I've been using a computer, you're the only person I've ever heard of who's actually done it). I wouldn't worry too much about other people changing their colors. Also, it isn't possible to...
by ShadowThief
06 Aug 2023 16:47
Forum: DOS Batch Forum
Topic: Wrong Color of texts [SOLVED]
Replies: 4
Views: 5990

Re: Wrong Color of texts

Correct, the values of the color command are indices of the array of colors that are normally set in the registry, which you've changed in your settings.
by ShadowThief
06 Aug 2023 10:57
Forum: DOS Batch Forum
Topic: Native compress files in windows [SOLVED]
Replies: 6
Views: 8005

Re: Native compress files in windows [SOLVED]

Nice, I'm glad someone forked Frank Westlake's code.
by ShadowThief
03 Aug 2023 17:19
Forum: DOS Batch Forum
Topic: Native compress files in windows [SOLVED]
Replies: 6
Views: 8005

Re: Native compress files in windows

There are several options available, but makecab is probably your best bet. https://stackoverflow.com/questions/280 ... s-with-bat