• Re: Great code

    From Michael S@3:633/10 to All on Sat Jun 27 21:28:42 2026
    On Sat, 27 Jun 2026 07:20:17 -0400
    Paul <nospam@needed.invalid> wrote:

    On Tue, 6/16/2026 3:39 AM, Lawrence D?Oliveiro wrote:
    On Mon, 15 Jun 2026 11:10:46 +0200, Bonita Montero wrote:

    I've written a tool called "bg" to combine Windows' runas with
    start.

    Sort of a Windows answer to systemd? Somebody is already working on
    that <https://github.com/Jamesits/SvcGuest>.

    One parameter is the affinity-mask for the processors which the
    started program is attached to.

    They haven?t yet added that capability (which systemd has). Per
    haps
    you could contribute code ...


    Windows has had third-party launch tools for some time.
    One of the situations where this was encountered, was
    some games would not "tolerate" dual core computers, and
    the EXE cooked up at the time could fix that for you,
    without resorting to Task Manager to do it from there.

    You can see here, that generally speaking, there is a way to do it.

    https://superuser.com/questions/309617/how-to-limit-a-process-to-a-sin
    gle-cpu-core

    And this is the utility I was thinking of, RunFirst. What this does,
    is it doesn't provide arbitrary single-core affinity, it's for
    running games on CPU0, and relying upon the scheduler to move other
    tasks to CPU1. The purpose of RunFirst, is to prevent games from
    crashing that do not handle the CPU core issue properly. It makes the
    game "think" it is on a single core CPU. If the game were to check,
    it reads CPU0, and the game is then satisfied that not only does it
    have one core, the one core is numbered CPU0.

    https://www.vogons.org/viewtopic.php?t=31541

    C:\Windows\System32\RunFirst.exe "C:\Program
    Files\GOG.com\Divine Divinity\Div.exe"

    Paul

    How does it differ from "start /affinity 1 div.exe" ?




    --- PyGate Linux v1.5.18
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Michael S@3:633/10 to All on Sun Jun 28 02:07:29 2026
    On Sat, 27 Jun 2026 16:53:56 -0400
    Paul <nospam@needed.invalid> wrote:

    On Sat, 6/27/2026 2:28 PM, Michael S wrote:
    On Sat, 27 Jun 2026 07:20:17 -0400
    Paul <nospam@needed.invalid> wrote:

    On Tue, 6/16/2026 3:39 AM, Lawrence D?Oliveiro wrote:
    On Mon, 15 Jun 2026 11:10:46 +0200, Bonita Montero wrote:

    I've written a tool called "bg" to combine Windows' runas with
    start.

    Sort of a Windows answer to systemd? Somebody is already working
    on that <https://github.com/Jamesits/SvcGuest>.

    One parameter is the affinity-mask for the processors which the
    started program is attached to.

    They haven?t yet added that capability (which systemd has).
    Perhaps you could contribute code ...


    Windows has had third-party launch tools for some time.
    One of the situations where this was encountered, was
    some games would not "tolerate" dual core computers, and
    the EXE cooked up at the time could fix that for you,
    without resorting to Task Manager to do it from there.

    You can see here, that generally speaking, there is a way to do it.

    https://superuser.com/questions/309617/how-to-limit-a-process-to-a-
    single-cpu-core

    And this is the utility I was thinking of, RunFirst. What this
    does, is it doesn't provide arbitrary single-core affinity, it's
    for running games on CPU0, and relying upon the scheduler to move
    other tasks to CPU1. The purpose of RunFirst, is to prevent games
    from crashing that do not handle the CPU core issue properly. It
    makes the game "think" it is on a single core CPU. If the game
    were to check, it reads CPU0, and the game is then satisfied that
    not only does it have one core, the one core is numbered CPU0.

    https://www.vogons.org/viewtopic.php?t=31541

    C:\Windows\System32\RunFirst.exe "C:\Program
    Files\GOG.com\Divine Divinity\Div.exe"

    Paul

    How does it differ from "start /affinity 1 div.exe" ?

    Runfirst was written years ago, like maybe WinXP era.
    Some of the other (convenience) methods, did not exist at the time.

    Paul




    I think that 'start /affinity' existed in WinXp and I would be surprised
    if it didn't exist much earlier.






    --- PyGate Linux v1.5.18
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Chris M. Thomasson@3:633/10 to All on Sat Jun 27 22:02:26 2026
    On 6/27/2026 4:07 PM, Michael S wrote:
    On Sat, 27 Jun 2026 16:53:56 -0400
    Paul <nospam@needed.invalid> wrote:

    On Sat, 6/27/2026 2:28 PM, Michael S wrote:
    On Sat, 27 Jun 2026 07:20:17 -0400
    Paul <nospam@needed.invalid> wrote:

    On Tue, 6/16/2026 3:39 AM, Lawrence D?Oliveiro wrote:
    On Mon, 15 Jun 2026 11:10:46 +0200, Bonita Montero wrote:

    I've written a tool called "bg" to combine Windows' runas with
    start.

    Sort of a Windows answer to systemd? Somebody is already working
    on that <https://github.com/Jamesits/SvcGuest>.

    One parameter is the affinity-mask for the processors which the
    started program is attached to.

    They haven?t yet added that capability (which systemd has).
    Perhaps you could contribute code ...


    Windows has had third-party launch tools for some time.
    One of the situations where this was encountered, was
    some games would not "tolerate" dual core computers, and
    the EXE cooked up at the time could fix that for you,
    without resorting to Task Manager to do it from there.

    You can see here, that generally speaking, there is a way to do it.

    https://superuser.com/questions/309617/how-to-limit-a-process-to-a-single-cpu-core

    And this is the utility I was thinking of, RunFirst. What this
    does, is it doesn't provide arbitrary single-core affinity, it's
    for running games on CPU0, and relying upon the scheduler to move
    other tasks to CPU1. The purpose of RunFirst, is to prevent games
    from crashing that do not handle the CPU core issue properly. It
    makes the game "think" it is on a single core CPU. If the game
    were to check, it reads CPU0, and the game is then satisfied that
    not only does it have one core, the one core is numbered CPU0.

    https://www.vogons.org/viewtopic.php?t=31541

    C:\Windows\System32\RunFirst.exe "C:\Program
    Files\GOG.com\Divine Divinity\Div.exe"

    Paul

    How does it differ from "start /affinity 1 div.exe" ?

    Runfirst was written years ago, like maybe WinXP era.
    Some of the other (convenience) methods, did not exist at the time.

    Paul




    I think that 'start /affinity' existed in WinXp and I would be surprised
    if it didn't exist much earlier.






    Win XP had support for hyperthreads iirc?

    --- PyGate Linux v1.5.18
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)