Search found 1897 matches

by penpen
04 May 2021 06:11
Forum: DOS Batch Forum
Topic: How to make a game saving system?
Replies: 3
Views: 151

Re: How to make a game saving system?

There are multiple ways to do that, just use the search function to look them all up. You might for example use the following save/load functions (untested): @echo off setlocal enableExtensions disableDelayedExpansion call :init call :debug call :save set "value1=D" set "value2=E" set "value3=F" cal...
by penpen
03 Apr 2021 02:29
Forum: DOS Batch Forum
Topic: tv
Replies: 9
Views: 15511

Re: tv

You might use ECMA-Script (JScript) to deal with JSON; see: - https://www.dostips.com/forum/viewtopic.php?f=3&t=9049#p59302 - https://www.dostips.com/forum/viewtopic.php?f=3&t=9049#p59297 - https://www.dostips.com/forum/viewtopic.php?f=3&t=9049#p59303 - https://www.dostips.com/forum/viewtopic.php?f=...
by penpen
02 Apr 2021 10:29
Forum: DOS Batch Forum
Topic: ms:settingswindowsupdate hidden
Replies: 7
Views: 1318

Re: ms:settingswindowsupdate hidden

Yes, as i wrote the "windows update page window simply ignores such options", like running minimized or hidden. So there is not much you can do about that from pure batch. Therefore you have to use a programming language such as C++, with which you first start the windows update window, then hook in...
by penpen
30 Mar 2021 19:34
Forum: DOS Batch Forum
Topic: Batch treat special characters as input errors
Replies: 8
Views: 1275

Re: Batch treat special characters as input errors

I would like all non-numeric characters to be considered as input error. Alphabetic characters are well considered but not certain special characters like colons and others ones such as !, ", %, ^, &, ), =, |, <, and > I don't understand what you want: In the first sentence you wrote that alphabeti...
by penpen
28 Mar 2021 08:24
Forum: DOS Batch Forum
Topic: ms:settingswindowsupdate hidden
Replies: 7
Views: 1318

Re: ms:settingswindowsupdate hidden

I thought of something like the following: "C:\WINDOWS\system32\WindowsPowerShell\v1.0\powershell.exe" "-Command" "$wshShell = New-Object -ComObject WScript.Shell; $result = $WshShell.Run(\"ms-settings:windowsupdate\", 2);" Sidenote: I always test with the option "2" (=Activates the window and displ...
by penpen
26 Mar 2021 06:30
Forum: DOS Batch Forum
Topic: Command prompt - combining files by name
Replies: 13
Views: 2297

Re: Command prompt - combining files by name

Well, i only can say what Microsoft has published within their documentation and have no additional insights into their exact code of (course). Therefore i can't say how you reliably cause a non alphabetical order under NTFS 3.0+. Maybe to distort the order, you could use some files with short names...
by penpen
26 Mar 2021 05:50
Forum: DOS Batch Forum
Topic: Batch file edit text - small modification
Replies: 2
Views: 790

Re: Batch file edit text - small modification

Yes, it is possible to change my code such that it remove a line that contains a specific text. But if that's the only thing you want to accomplish, then you should use findstr only and list all lines that doesn't contain "#EXTINF" in your case and redirect the output of that command to the target f...
by penpen
25 Mar 2021 13:13
Forum: DOS Batch Forum
Topic: ms:settingswindowsupdate hidden
Replies: 7
Views: 1318

Re: ms:settingswindowsupdate hidden

I'm not sure if the update page can be influences, but maybe the following idea might help:
viewtopic.php?t=9468#p61384
by penpen
23 Mar 2021 11:54
Forum: DOS Batch Forum
Topic: ms:settingswindowsupdate hidden
Replies: 7
Views: 1318

Re: ms:settingswindowsupdate hidden

I actually can't check that, but in case with "I (...) can do this manually" you mean, that you use the "start->Run"- Dialog, type "ms:settingswindowsupdate" and hit enter, then the following might work: start "" "ms:settingswindowsupdate" :: though i would expect something more like the following; ...
by penpen
23 Mar 2021 11:43
Forum: DOS Batch Forum
Topic: Batch Conversion issue
Replies: 1
Views: 931

Re: Batch Conversion issue

Essentially all bat2exe-converter i saw, only pack the file into a self extracting zip. If you call the exe, then the batch file you wrote typically is extracted into a temporary folder (such as %TEMP% or %TMP%) and is automatically started. Some of those tools also will ignore any command line para...
by penpen
23 Mar 2021 06:04
Forum: DOS Batch Forum
Topic: Command prompt - combining files by name
Replies: 13
Views: 2297

Re: Command prompt - combining files by name

Penpen I always thought if it was an NTFS drive, it would process them in ascii order. NTFS versions prior to 3.0 only use one index for filenames, so there you would be correct. All versions since then (=3.0+) also use various other indexes (security, quota, ... and a hashsum based on all other in...
by penpen
22 Mar 2021 06:53
Forum: DOS Batch Forum
Topic: Command prompt - combining files by name
Replies: 13
Views: 2297

Re: Command prompt - combining files by name

The order is based on a hashsum. Win10 (as XP and NT before) is able to use multiple Hashsums (based on filename, creation date, ...), that even can change from directory to directory; so you better don't expect any order. You might use the dir-command to list all files you need and pipe the output ...
by penpen
24 Feb 2021 17:33
Forum: DOS Batch Forum
Topic: Why does this run net1.exe?
Replies: 2
Views: 1355

Re: Why does this run net1.exe?

If someone wants to test that behaviour, then you need to copy the following original files (from C:\Windows\System32" to a test folder): net.exe netutils.dll However these files won't be able to execute "net.exe" with the strings in my above post. Once you added files with the following names, you ...
by penpen
21 Feb 2021 08:01
Forum: DOS Batch Forum
Topic: Interpret json with batch
Replies: 4
Views: 1428

Re: Interpret json with batch

You could also use a hyprid jscript/batch; well, it's mainly a jscript and batch is only needed to start that, but in case you need a batch anyway, then that might be helpfull for you:
viewtopic.php?f=3&t=9049#p59297


penpen
by penpen
19 Feb 2021 07:31
Forum: DOS Batch Forum
Topic: Problem loading variable from file
Replies: 6
Views: 1649

Re: Problem loading variable from file

When I go to :loadgame, the file just closes. Does anyone know what I did wrong? (probably everything tbh) At least in the code you posted, there is nothing wrong. But you might improve your code in various ways: - Start a command with a redirection to protect your code from adding spaces at the en...