• Edit the manpage for a Windows /? command example

    From Michael@21:1/5 to All on Thu Mar 16 09:28:02 2023
    XPost: alt.comp.os.windows-11, alt.internet.wireless

    How can I edit the manpage for the Windows netsh command.

    Since the beginning of wireless networking I've never been able to remember
    the syntax for the netsh command, and worse, it's always needed when I am
    off the network so I can't even look it up on my laptop when I need it.

    The command to get the name of the Ethernet NIC is easy enough to remember. ipconfig | findstr "Ethernet adaptor"

    But then it gets a bit more complicated when you ask for more information. netsh interface ipv4 show config "eth0"

    But it's really hard to remember the syntax to set the subnet & gateway.
    netsh interface ipv4 set address name="eth0" static 192.168.0.2 255.255.255.0 192.168.0.1

    Worse, "/?" help doesn't really help (try it & let me know if it does).
    So is there a way for me to ADD that example into the "netsh /?" results?
    --
    [I filter out Google Groups posts so if I don't reply, that may be why.]

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andy Burns@21:1/5 to Michael on Thu Mar 16 15:33:24 2023
    XPost: alt.comp.os.windows-11, alt.internet.wireless

    Michael wrote:

    is there a way for me to ADD that example into the "netsh /?" results?

    Not really, just use notepad to create your own, err, notes.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Paul@21:1/5 to Andy Burns on Thu Mar 16 12:55:36 2023
    XPost: alt.comp.os.windows-11, alt.internet.wireless

    On 3/16/2023 11:33 AM, Andy Burns wrote:
    Michael wrote:

    is there a way for me to ADD that example into the "netsh /?" results?

    Not really, just use notepad to create your own, err, notes.


    If there was a way to edit an executable,
    Windows Update would only replace it and
    your notes would be lost :-)

    Paul

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From VanguardLH@21:1/5 to Michael on Thu Mar 16 12:51:57 2023
    XPost: alt.comp.os.windows-11, alt.internet.wireless

    Michael <michael@spamcop.com> wrote:

    How can I edit the manpage for the Windows netsh command.

    Since the beginning of wireless networking I've never been able to remember the syntax for the netsh command, and worse, it's always needed when I am
    off the network so I can't even look it up on my laptop when I need it.

    The command to get the name of the Ethernet NIC is easy enough to remember. ipconfig | findstr "Ethernet adaptor"

    But then it gets a bit more complicated when you ask for more information. netsh interface ipv4 show config "eth0"

    But it's really hard to remember the syntax to set the subnet & gateway. netsh interface ipv4 set address name="eth0" static 192.168.0.2 255.255.255.0 192.168.0.1

    Worse, "/?" help doesn't really help (try it & let me know if it does).
    So is there a way for me to ADD that example into the "netsh /?" results?

    netsh, as with many tools, gives you only top-level help if you use
    "<prog> /?". You have to drill down to get to a directive or even sub-directive to add /? to get help on the [sub]-directive, like:

    netsh /?
    netsh interface /?
    then
    netsh interface ipv4 /?
    then
    netsh interface ipv4 set /?
    then
    netsh interface ipv4 set address /?

    You could start at the end if you know all the args you want to specify,
    but I usually have to drill down through the help levels.

    There are no man pages in Windows like there is in Linux. Help is built
    into the program. There is the 'help' command, but that just lists some DOS-mode programs.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Bill@21:1/5 to Paul on Thu Mar 16 14:41:45 2023
    On 3/16/2023 12:55 PM, Paul wrote:
    On 3/16/2023 11:33 AM, Andy Burns wrote:
    Michael wrote:

    is there a way for me to ADD that example into the "netsh /?" results?

    Not really, just use notepad to create your own, err, notes.


    If there was a way to edit an executable,
    Windows Update would only replace it and
    your notes would be lost :-)

       Paul

    You're the expert on virtually all matters concerning computer hardware
    to me. But strictly speaking, it's not hard to write a program to edit
    an executable. In fact, I have written code to edit machine code sitting
    in RAM (because that was far faster than rebuilding a relatively huge
    software system--which I could not have done on my own even if I wanted
    to). But modifying a few words in RAM fell under my control! ; ) But it
    was not a Win-10 system (apologize for being off topic).
    In the same manner, I have edited .jpg files directly (with java or
    C++), just to convince myself that it doing so is as straightforward as
    I anticipated that it would be. You just have to look up the way .jpg
    files are formatted, where their header ends, etc. Standards (and
    protocols) are one of the secrets to civilization! I know you know that,
    but I think most people do not realize that (or care! lol).

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Char Jackson@21:1/5 to Michael on Thu Mar 16 14:44:49 2023
    XPost: alt.comp.os.windows-11, alt.internet.wireless

    On Thu, 16 Mar 2023 09:28:02 -0600, Michael <michael@spamcop.com> wrote:

    Since the beginning of wireless networking I've never been able to remember >the syntax for the netsh command, and worse, it's always needed when I am
    off the network so I can't even look it up on my laptop when I need it.

    ...
    But it's really hard to remember the syntax to set the subnet & gateway. >netsh interface ipv4 set address name="eth0" static 192.168.0.2 255.255.255.0 192.168.0.1

    I know it's not what you asked, but if you really get in a bind you can probably just use the GUI for doing all of that. No syntax to remember.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Zaidy036@21:1/5 to Michael on Thu Mar 16 15:50:11 2023
    XPost: alt.comp.os.windows-11, alt.internet.wireless

    On 3/16/2023 11:28 AM, Michael wrote:
    How can I edit the manpage for the Windows netsh command.

    Since the beginning of wireless networking I've never been able to remember the syntax for the netsh command, and worse, it's always needed when I am
    off the network so I can't even look it up on my laptop when I need it.

    The command to get the name of the Ethernet NIC is easy enough to remember. ipconfig | findstr "Ethernet adaptor"

    But then it gets a bit more complicated when you ask for more information. netsh interface ipv4 show config "eth0"

    But it's really hard to remember the syntax to set the subnet & gateway. netsh interface ipv4 set address name="eth0" static 192.168.0.2 255.255.255.0 192.168.0.1

    Worse, "/?" help doesn't really help (try it & let me know if it does).
    So is there a way for me to ADD that example into the "netsh /?" results?
    take a screen pic and save it

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Paul@21:1/5 to Bill on Thu Mar 16 16:41:04 2023
    On 3/16/2023 2:41 PM, Bill wrote:
    On 3/16/2023 12:55 PM, Paul wrote:
    On 3/16/2023 11:33 AM, Andy Burns wrote:
    Michael wrote:

    is there a way for me to ADD that example into the "netsh /?" results?

    Not really, just use notepad to create your own, err, notes.


    If there was a way to edit an executable,
    Windows Update would only replace it and
    your notes would be lost :-)

        Paul

    You're the expert on virtually all matters concerning computer hardware to me. But strictly speaking, it's not hard to write a program to edit an executable. In fact, I have written code to edit machine code sitting in RAM (because that was far faster
    than rebuilding a relatively huge software system--which I could not have done on my own even if I wanted to). But modifying a few words in RAM fell under my control!  ; ) But it was not a Win-10 system (apologize for being off topic).
    In the same manner, I have edited .jpg files directly (with java or C++), just to convince myself that it doing so is as straightforward as I anticipated that it would be.  You just have to look up the way .jpg files are formatted, where their header
    ends, etc. Standards (and protocols) are one of the secrets to civilization! I know you know that, but I think most people do not realize that (or care! lol).

    I have edited executables before.

    But because you have to use a disassembler to figure out
    where you are and so on, this is not a preferred hobby
    or anything. I do it only when I have to.

    Some executables on Windows are signed, but others are not.

    *******

    There *is* a way to non-destructively edit a file, but
    this is a form of "cheating" on the test. You can add
    an Alternate Stream to a file. The MacOS had the same
    concept and had "Resource Fork" and "Data Fork", and one
    of those counts as an Alternate Stream.

    You could place your comments in a Windows NTFS Alternate Stream,
    if that made you happy, and that would not upset the "checksum"
    on the executable. I'm not sure that things like "copy"
    will copy the Alternate Stream. Not without the right syntax
    at least.

    When you download a file in Windows, an Alternate Stream is
    attached to it, indicating its security status ("risky").
    And sometimes you'll see a warning about such files. And you
    will find recipes for removing that Alternate Stream from
    the file. You can open that Alternate Stream in Notepad,
    and read what it says.

    MacOS actually had a "Comment Box" on its file properties,
    so you could enter a short comment in the box. There was
    not sufficient room to be leaving a copy of "War and Peace"
    in the box. I have no idea, in the file system design, where
    that was being stored.

    My experience with metadata, is the more effort you put
    into being clever, the worse your "fall" will be later,
    when some tool erases all your metadata. There have been
    a few stories from people who annotated their Photo collection
    or Media Center video collections, about losing all of
    their edits. And these are the little stories that teach
    you that "it's not really your computer" -- it's just a place
    for developers to hang their bugs to dry.

    Paul

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From gtr@21:1/5 to Andy Burns on Thu Mar 16 18:16:28 2023
    XPost: alt.comp.os.windows-11, alt.internet.wireless

    On 2023-03-16 08:33:24 +0000, Andy Burns said:

    is there a way for me to ADD that example into the "netsh /?" results?

    Not really, just use notepad to create your own, err, notes.

    netsh interface portproxy add v4tov4 listenport=xxx
    listenaddress=192.168.xx.xx connectaddress=192.168.yy.yy connectport=yyy

    Because the lanmanserver service starts early and binds to 445 on all interfaces, you may need to install a virtual kernel NIC driver in order
    to get an interface with a "spare" IP address to listen on, it was
    available from MS last time I needed it on Win7, not sure about Win10.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andy Burns@21:1/5 to gtr on Fri Mar 17 06:45:35 2023
    XPost: alt.comp.os.windows-11, alt.internet.wireless

    gtr wrote:

    Andy Burns said:

    is there a way for me to ADD that example into the "netsh /?" results?

    Not really, just use notepad to create your own, err, notes.

    netsh interface portproxy add v4tov4 listenport=xxx listenaddress=192.168.xx.xx connectaddress=192.168.yy.yy connectport=yyy

    Because the lanmanserver service starts early and binds to 445 on all interfaces, you may need to install a virtual kernel NIC driver in order
    to get an interface with a "spare" IP address to listen on, it was
    available from MS last time I needed it on Win7, not sure about Win10.

    It's even better when other people remember your notes for you ;-)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From gtr@21:1/5 to Andy Burns on Fri Mar 17 06:03:35 2023
    XPost: alt.comp.os.windows-11, alt.internet.wireless

    On 2023-03-17 02:45:35 +0000, Andy Burns said:

    It's even better when other people remember your notes for you ;-)

    Did you recognize it instantly or did it take a while?

    For years since you said that, those are now "my" netsh notes too!

    For the benefit of the lurkers, those are Andy's exact words from
    a few years ago, where I had copypasted them into _my_ netsh notes.

    netsh interface portproxy add v4tov4 listenport=xxx
    listenaddress=192.168.xx.xx connectaddress=192.168.yy.yy connectport=yyy

    The topic at the time was a workaround to allow Windows SMB servers
    to communicate with Android SMB client where there is a port mismatch.

    A catch22 arose that the Windows SMB server required specific ports (I
    think 445 but the actual port isn't the problem - the fact that the port is below 1024 is the problem). Windows is incapable of using any other port.

    Then you have non-rooted Android, which is incapable of allowing an app to
    use any port below 1024.

    Andy's netsh notes were to make Windows SMB "think" port 445 was a port
    higher than 445, for example, 1445, although I never got it to work.

    If it ever did work, it would be a great bonus for Windows and Android
    users because then the non-rooted Android SMB client could work on port
    1445 while the Windows SMB server would think port 1445 is port 445.

    Did you ever get the syntax down perfectly?
    I never got it to work.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Herbert Kleebauer@21:1/5 to Michael on Fri Mar 17 14:46:41 2023
    On 16.03.2023 16:28, Michael wrote:


    Worse, "/?" help doesn't really help (try it & let me know if it does).
    So is there a way for me to ADD that example into the "netsh /?" results?

    Create you own help file for things you want to know
    but always forget. For example, create a batch file
    with the name "helpme.bat" in a director which is in
    your %path% with a content like this:

    @echo off
    set topic=netsh dir copy
    set topic=%topic% move type
    set topic=%topic% mkdir
    echo.

    for %%i in (%topic%) do if [%%i]==[%1] goto :%%i

    echo help is available for:
    echo %topic%
    echo.
    goto :eof

    :netsh
    echo netsh interface ipv4 set address name="eth0" static 192.168.0.2 255.255.255.0 192.168.0.1
    echo.
    goto :eof

    :dir
    echo anything
    echo you want to
    echo know about
    echo dir
    echo.
    goto :eof

    :copy
    echo anything
    echo you want to
    echo know about
    echo copy
    echo.
    goto :eof

    :move
    echo anything
    echo you want to
    echo know about
    echo move
    echo.
    goto :eof

    :type
    echo anything
    echo you want to
    echo know about
    echo type
    echo.
    goto :eof

    :mkdir
    echo anything
    echo you want to
    echo know about
    echo mkdir
    echo.
    goto :eof

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Stan Brown@21:1/5 to Char Jackson on Fri Mar 17 07:32:30 2023
    XPost: alt.comp.os.windows-11

    On Thu, 16 Mar 2023 14:44:49 -0500, Char Jackson wrote:

    On Thu, 16 Mar 2023 09:28:02 -0600, Michael <michael@spamcop.com> wrote:

    Since the beginning of wireless networking I've never been able to remember >the syntax for the netsh command, and worse, it's always needed when I am >off the network so I can't even look it up on my laptop when I need it.

    ...
    But it's really hard to remember the syntax to set the subnet & gateway. >netsh interface ipv4 set address name="eth0" static 192.168.0.2 255.255.255.0 192.168.0.1

    I know it's not what you asked, but if you really get in a bind you can probably just use the GUI for doing all of that. No syntax to remember.

    For those (like me) who got excited at the thought of a GUI version
    of netsh, after some googling I don't think there is one.

    But for the OP's specific issue, changing IP addresses, here's a
    helpful video showing how to do _that_ in GUI: https://www.youtube.com/watch?v=XiPzxXJ7KB4

    --
    Stan Brown, Tehachapi, California, USA https://BrownMath.com/
    Shikata ga nai...

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Char Jackson@21:1/5 to the_stan_brown@fastmail.fm on Fri Mar 17 10:40:40 2023
    XPost: alt.comp.os.windows-11

    On Fri, 17 Mar 2023 07:32:30 -0700, Stan Brown
    <the_stan_brown@fastmail.fm> wrote:

    On Thu, 16 Mar 2023 14:44:49 -0500, Char Jackson wrote:

    On Thu, 16 Mar 2023 09:28:02 -0600, Michael <michael@spamcop.com> wrote:

    Since the beginning of wireless networking I've never been able to remember >> >the syntax for the netsh command, and worse, it's always needed when I am >> >off the network so I can't even look it up on my laptop when I need it.

    ...
    But it's really hard to remember the syntax to set the subnet & gateway.
    netsh interface ipv4 set address name="eth0" static 192.168.0.2 255.255.255.0 192.168.0.1

    I know it's not what you asked, but if you really get in a bind you can
    probably just use the GUI for doing all of that. No syntax to remember.

    For those (like me) who got excited at the thought of a GUI version
    of netsh, after some googling I don't think there is one.

    But for the OP's specific issue, changing IP addresses, here's a
    helpful video showing how to do _that_ in GUI: >https://www.youtube.com/watch?v=XiPzxXJ7KB4

    That's the GUI that I was referring to.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Michael@21:1/5 to VanguardLH on Fri Mar 17 18:06:33 2023
    XPost: alt.comp.os.windows-11, alt.internet.wireless

    On Thu, 16 Mar 2023 12:51:57 -0500, VanguardLH wrote:

    netsh, as with many tools, gives you only top-level help if you use
    "<prog> /?". You have to drill down to get to a directive or even sub-directive to add /? to get help on the [sub]-directive, like:

    netsh /?
    netsh interface /?
    then
    netsh interface ipv4 /?
    then
    netsh interface ipv4 set /?
    then
    netsh interface ipv4 set address /?

    You could start at the end if you know all the args you want to specify,
    but I usually have to drill down through the help levels.

    There are no man pages in Windows like there is in Linux. Help is built
    into the program. There is the 'help' command, but that just lists some DOS-mode programs.

    I tried that, using a logical sequence, and also got stuck at a different
    point of the tree but it didn't seem that it would ever work logically.

    netsh /?
    ... interface - Changes to the 'netsh interface' context ...

    netsh interface /?
    ... ipv4 - Changes to the 'netsh interface ipv4' context.

    netsh interface ipv4 /?
    ... set interface - Sets interface parameters. ...

    netsh interface ipv4 set interface /?
    set interface [interface=]<string> [[forwarding=]enabled|disabled]
    [[advertise=]enabled|disabled] [[mtu=]<integer>]
    [[siteprefixlength=]<integer>]
    [[nud=]enabled|disabled] [[basereachabletime=]<integer>]
    [[retransmittime=]<integer>] [[dadtransmits=]<integer>]
    [[routerdiscovery=]enabled|disabled|dhcp]
    [[managedaddress=]enabled|disabled]
    [[otherstateful=]enabled|disabled]
    [[weakhostsend=]enabled|disabled]
    [[weakhostreceive=]enabled|disabled]
    [[ignoredefaultroutes=]enabled|disabled]
    [[advertisedrouterlifetime=]<0-65535>]
    [[advertisedefaultroute=]enabled|disabled]
    [[currenthoplimit=]<0-255>] [[store=]active|persistent]
    [[forcearpndwolpattern=]enabled|disabled]
    [[enabledirectedmacwolpattern=]enabled|disabled]
    [[ecncapability=]ecndisabled|ect1|ect0|application]
    [[rabaseddnsconfig=]enabled|disabled]
    [[dhcpstaticipcoexistence=]enabled|disabled]

    From there I got lost... sorry.
    --
    [I filter out Google Groups posts so if I don't reply, that may be why.]

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Freethinker@21:1/5 to Herbert Kleebauer on Sat Mar 18 03:01:56 2023
    XPost: alt.comp.microsoft.windows, alt.internet.wireless

    On 17.03.23 09:46, Herbert Kleebauer wrote:
    On 16.03.2023 16:28, Michael wrote:

    Worse, "/?" help doesn't really help (try it & let me know if it does).
    So is there a way for me to ADD that example into the "netsh /?" results?

    Create you own help file for things you want to know
    but always forget. For example, create a batch file
    with the name "helpme.bat" in a director which is in
    your %path% with a content like this:

    @echo off
    set topic=netsh dir copy
    set topic=%topic% move type
    set topic=%topic% mkdir
    echo.

    for %%i in (%topic%) do if [%%i]==[%1] goto :%%i

    echo help is available for:
    echo %topic%
    echo.
    goto :eof

    :netsh
    echo netsh interface ipv4 set address name="eth0" static 192.168.0.2 255.255.255.0 192.168.0.1
    echo.
    goto :eof

    :dir
    echo anything
    echo you want to
    echo know about
    echo dir
    echo.
    goto :eof

    :copy
    echo anything
    echo you want to
    echo know about
    echo copy
    echo.
    goto :eof

    :move
    echo anything
    echo you want to
    echo know about
    echo move
    echo.
    goto :eof

    :type
    echo anything
    echo you want to
    echo know about
    echo type
    echo.
    goto :eof

    :mkdir
    echo anything
    echo you want to
    echo know about
    echo mkdir
    echo.
    goto :eof

    On 17.03.23 09:46, Herbert Kleebauer wrote:
    Worse, "/?" help doesn't really help (try it & let me know if it does).
    So is there a way for me to ADD that example into the "netsh /?" results?

    Create you own help file for things you want to know
    but always forget. For example, create a batch file
    with the name "helpme.bat" in a director which is in
    your %path% with a content like this:

    I don't know about the op but I, for one, _love_ this workaround!

    Thank you for this elegant idea which will last me for years
    and many computers because it's so elegant and easy to maintain.

    I called your code manpage.bat because I've learned the names
    have to be easily remembered, and coming from Linux, that's
    the first thing that comes to mind as the proper name for it.

    You want all the added commands to be easily remembered even
    if you don't use them in a year or two or five or ten.

    In a command window at the location of the batch file, I typed:
    manpage
    Which said:
    help is available for:
    netsh dir copy move type mkdir
    I typed:
    manpage netsh
    It reported:
    netsh interface ipv4 set address name="eth0" static 192.168.0.2 255.255.255.0 192.168.0.1
    I typed:
    manpage dir
    It reported:
    anything
    you want to
    know about
    dir
    I typed:
    manpage foo
    It reported:
    help is available for:
    netsh dir copy move type mkdir

    I don't like sticking things into my $PATH so I added it to the AppPaths.
    HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\manpage.exe
    @default=c:\path\manpage.bat
    So that "Win+R" & then "manpage" would get the results over the years. https://learn.microsoft.com/en-us/windows/win32/shell/app-registration

    But it only flashed when I did that, even when I linked to a shortcut:
    @default=c:\path\manpage.lnk

    Googling said to add "explorer.exe" to the beginning of that shortcut
    target to keep the command window but that also just flashed at me.
    manpage.lnk
    target=explorer.exe /k c:\path\manpage.bat

    Then I prepended "%comspec% /k" to the shortcut target & that worked.
    target=%comspec% /k c:\path\manpage.bat

    That worked wonderfully to open up a command window with the initial
    list of available commands already waiting for me (as it runs it first).

    The command windows is already at the right path so there's no need
    to pollute the $PATH with yet another needless entry (enough already).

    That's the whole purpose of the Windows AppPaths registry sub key. https://helgeklein.com/blog/how-the-app-paths-registry-key-makes-windows-both-faster-and-safer/

    This is probably what I'll use for the next decade or two because
    it's simple and obvious and elegant enough to be easily remembered
    and when needed, it's eminently extensible as it's self explanatory.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From VanguardLH@21:1/5 to Michael on Sat Mar 18 02:03:01 2023
    XPost: alt.comp.os.windows-11, alt.internet.wireless

    Michael <michael@spamcop.com> wrote:

    VanguardLH wrote:

    netsh, as with many tools, gives you only top-level help if you use
    "<prog> /?". You have to drill down to get to a directive or even
    sub-directive to add /? to get help on the [sub]-directive, like:

    netsh /?
    netsh interface /?
    then
    netsh interface ipv4 /?
    then
    netsh interface ipv4 set /?
    then
    netsh interface ipv4 set address /?

    You could start at the end if you know all the args you want to specify,
    but I usually have to drill down through the help levels.

    There are no man pages in Windows like there is in Linux. Help is built
    into the program. There is the 'help' command, but that just lists some
    DOS-mode programs.

    I tried that, using a logical sequence, and also got stuck at a different point of the tree but it didn't seem that it would ever work logically.

    netsh /?
    ... interface - Changes to the 'netsh interface' context ...

    netsh interface /?
    ... ipv4 - Changes to the 'netsh interface ipv4' context.

    netsh interface ipv4 /?
    ... set interface - Sets interface parameters. ...

    netsh interface ipv4 set interface /?
    ^^^^^^^^^
    \___ address (not interface)

    That would match on the "netsh interface ipv4 set address ..." command
    you said you were using.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Carlos E.R.@21:1/5 to All on Sat Mar 18 15:17:45 2023
    XPost: alt.comp.os.windows-11, alt.internet.wireless

    On 2023-03-16 20:50, Zaidy036 wrote:
    On 3/16/2023 11:28 AM, Michael wrote:
    How can I edit the manpage for the Windows netsh command.

    ...

    Worse, "/?" help doesn't really help (try it & let me know if it does).
    So is there a way for me to ADD that example into the "netsh /?" results?
    take a screen pic and save it

    In powershell, you can mark the text and copy it, to a text file.

    --
    Cheers, Carlos.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Stan Brown@21:1/5 to Carlos E.R. on Sat Mar 18 08:21:14 2023
    XPost: alt.comp.os.windows-11, alt.internet.wireless

    On Sat, 18 Mar 2023 15:17:45 +0100, Carlos E.R. wrote:
    In powershell, you can mark the text and copy it, to a text file.


    Just like in the command prompt. :-)

    --
    Stan Brown, Tehachapi, California, USA https://BrownMath.com/
    Shikata ga nai...

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Herbert Kleebauer@21:1/5 to Freethinker on Sat Mar 18 21:26:53 2023
    XPost: alt.comp.microsoft.windows

    On 18.03.2023 02:01, Freethinker wrote:
    On 17.03.23 09:46, Herbert Kleebauer wrote:

    I don't like sticking things into my $PATH so I added it to the AppPaths.
    HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\manpage.exe
    @default=c:\path\manpage.bat
    So that "Win+R" & then "manpage" would get the results over the years.

    But you have to do this for every utility you use. I add one directory
    to the PATH variable, for historical reason this is "D:\dos622\befehle"
    (I used this first when transferring DOS utilities to Win98). Single
    exe utilities (like unzip, 7za, unrar, wget and so on) or batch programs
    are stored directly in this directory. Utilities with additional data
    (like "midnight commander", "tiny C compiler", "ffmpeg" and so on) have
    there own directory in d:\dos622\. Because they are not in the PATH
    variable I add a batch file to D:\dos622\befehle to start them, e.g.
    tcc.bat with the content: d:\dos622\tcc\tcc.exe %1 %2 %3 %4 %5
    This way I can just copy the directory d:\dos622 to an other PC
    and all is working without first having to make registry entries.


    But it only flashed when I did that, even when I linked to a shortcut:
    @default=c:\path\manpage.lnk

    Just add a "pause" at the end of the batch so the windows stays open
    until you press a key. But it is simpler to always have an open CMD
    window with Midnight- or Far-Commander running.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Freethinker@21:1/5 to Herbert Kleebauer on Sun Mar 19 08:16:18 2023
    XPost: alt.comp.microsoft.windows

    On 18.03.23 20:26, Herbert Kleebauer wrote:
    I don't like sticking things into my $PATH so I added it to the AppPaths.
    HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\manpage.exe
    @default=c:\path\manpage.bat
    So that "Win+R" & then "manpage" would get the results over the years.

    But you have to do this for every utility you use. I add one directory
    to the PATH variable, for historical reason this is "D:\dos622\befehle"
    (I used this first when transferring DOS utilities to Win98). Single
    exe utilities (like unzip, 7za, unrar, wget and so on) or batch programs
    are stored directly in this directory. Utilities with additional data
    (like "midnight commander", "tiny C compiler", "ffmpeg" and so on) have
    there own directory in d:\dos622\. Because they are not in the PATH
    variable I add a batch file to D:\dos622\befehle to start them, e.g.
    tcc.bat with the content: d:\dos622\tcc\tcc.exe %1 %2 %3 %4 %5
    This way I can just copy the directory d:\dos622 to an other PC
    and all is working without first having to make registry entries.

    We're both doing the same thing but different ways.
    You're using the PATH for what it was designed for.
    I'm using the AppPaths for what it was designed for.

    They have pros and cons and I'm not saying your method doesn't work well.
    It does.

    In fact, it's probably what most people use.
    (But most people don't know about the AppPaths sub key I would think.)

    For example.......

    I don't know how well your method works from the "Win+R" key but your
    method works well from the command line no matter where you are in the hierarchy (where the AppPaths key essentially only works from "Win+R".

    They are two different approaches to the same problem set.
    Each has their pros and cons.

    But it only flashed when I did that, even when I linked to a shortcut:
    @default=c:\path\manpage.lnk

    Just add a "pause" at the end of the batch so the windows stays open
    until you press a key. But it is simpler to always have an open CMD
    window with Midnight- or Far-Commander running.

    Thanks for the idea of the pause.
    Much appreciated!

    The Win+R manpage command is one that I will keep forevermore on my PCs!

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Herbert Kleebauer@21:1/5 to Freethinker on Sun Mar 19 09:41:06 2023
    XPost: alt.comp.microsoft.windows

    On 19.03.2023 07:16, Freethinker wrote:

    We're both doing the same thing but different ways.
    You're using the PATH for what it was designed for.
    I'm using the AppPaths for what it was designed for.

    I think, there is a big difference. The first is "one for all"
    and the second "one for one". I add a single directory to
    the PATH variable when I set up a new PC. That's all what
    is needed for the current and all future utilities I use.
    You have to do it for any utility you use and, if you setup
    a new PC, you have to do it again for all of them.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Commander Kinsey@21:1/5 to Paul on Sun Mar 19 11:54:52 2023
    XPost: alt.comp.os.windows-11, alt.internet.wireless

    On Thu, 16 Mar 2023 16:55:36 -0000, Paul <nospam@needed.invalid> wrote:

    On 3/16/2023 11:33 AM, Andy Burns wrote:
    Michael wrote:

    is there a way for me to ADD that example into the "netsh /?" results?

    Not really, just use notepad to create your own, err, notes.

    If there was a way to edit an executable,
    Windows Update would only replace it and
    your notes would be lost :-)

    Not sure if it works now, but in the 90s I edited (with a text editor!) command.com on a friend's computer for a laugh, so the error messages were amusing. I just found the strings of text and changed them, making sure the number of characters was the
    same.

    And of course there's a way to edit an executable, it's a decompiler.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Carlos E.R.@21:1/5 to Paul on Sun Mar 19 13:11:17 2023
    On 2023-03-16 21:41, Paul wrote:
    On 3/16/2023 2:41 PM, Bill wrote:
    On 3/16/2023 12:55 PM, Paul wrote:
    On 3/16/2023 11:33 AM, Andy Burns wrote:
    Michael wrote:

    is there a way for me to ADD that example into the "netsh /?" results? >>>>
    Not really, just use notepad to create your own, err, notes.


    If there was a way to edit an executable,
    Windows Update would only replace it and
    your notes would be lost :-)

        Paul

    You're the expert on virtually all matters concerning computer
    hardware to me. But strictly speaking, it's not hard to write a
    program to edit an executable. In fact, I have written code to edit
    machine code sitting in RAM (because that was far faster than
    rebuilding a relatively huge software system--which I could not have
    done on my own even if I wanted to). But modifying a few words in RAM
    fell under my control!  ; ) But it was not a Win-10 system (apologize
    for being off topic).
    In the same manner, I have edited .jpg files directly (with java or
    C++), just to convince myself that it doing so is as straightforward
    as I anticipated that it would be.  You just have to look up the way
    .jpg files are formatted, where their header ends, etc. Standards (and
    protocols) are one of the secrets to civilization! I know you know
    that, but I think most people do not realize that (or care! lol).

    I have edited executables before.

    But because you have to use a disassembler to figure out
    where you are and so on, this is not a preferred hobby
    or anything. I do it only when I have to.

    Some executables on Windows are signed, but others are not.

    Windows executables could have "resources" added to them, and these
    could be edited. That was before signing appeared.

    These resources could be of different kinds: they could be menus, icons,
    text strings, dialogs... I don't remember. You could publish the same executable with different resources, and you'd get a translated version.
    I used them with Borland C or Borland Pascal (just before Delphi), thus
    long ago. I assume things have changed.

    Basically, they were added to the end of the exe. They were designed to
    be editable.

    Not the same as a string in the middle of the code.

    --
    Cheers, Carlos.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From VanguardLH@21:1/5 to Herbert Kleebauer on Sun Mar 19 08:54:36 2023
    XPost: alt.comp.microsoft.windows

    Note: OP originally posted to:

    alt.comp.os.windows-10
    alt.comp.os.windows-11
    alt.internet.wireless

    When Kleebauer replied, he stripped out the last 2 newsgroups leaving:

    alt.comp.os.Windows-10

    Then when he replied later, he added:

    alt.comp.microsoft.windows

    which does not exist on my NNTP server. Maybe it does on his.
    Regardless of cause, I removed the *.windows newsgroup since it was
    probably a typo. My reply was therefore submitted to just:

    alt.comp.os.windows-10

    If I added back the original 2 newsgroups that Kleebauer stripped, this subthread would appear disconnected from the *.windows-11 and *.wireless newsgroups perhaps causing confusing for why there was missing posts.


    Herbert Kleebauer <klee@unibwm.de> wrote:

    Freethinker wrote:

    We're both doing the same thing but different ways.
    You're using the PATH for what it was designed for.
    I'm using the AppPaths for what it was designed for.

    I think, there is a big difference. The first is "one for all"
    and the second "one for one". I add a single directory to
    the PATH variable when I set up a new PC. That's all what
    is needed for the current and all future utilities I use.
    You have to do it for any utility you use and, if you setup
    a new PC, you have to do it again for all of them.

    AppPaths is defined in the registry under:

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths ^^^^^^^^^^^^^^^^^^
    \___ Everyone gets this.

    The definition is under HKLM, so every Windows account will see those definitions.

    The PATH environment variable consists of sysPATH (global) and userPATH
    (per Windows account). What you get in a Windows session is the two concatenated: sysPATH + userPATH. So you could have global paths
    defined for all, but have some defined only for your account.

    C:\Windows\System32\sysdm.cpl -> Advanced tab -> Environment variables

    You'll see there the userPATH envvars under your account, and the
    sysPATH envvars that all accounts will get. In a command shell, run:

    echo %path%

    Notice the string value of PATH is first the sysPATH string followed by
    the userPATH.

    Note: When appending userPATH to sysPATH, duplicates are removed. For
    example, say there are 9 args in sysPath, and 3 args in userPATH, for a
    total of 12 args; however, 2 are duplicates, so you see only 10 args in
    the compounded PATH envvar.

    Unlike PATH which can have sys (global) and user constituents, the
    AppPaths registry entries are under HKLM, so everyone sees those.

    Sorry if I misunderstood. In "one for all" and "one for one", no way to
    tell which one was which.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Herbert Kleebauer@21:1/5 to VanguardLH on Sun Mar 19 17:36:29 2023
    XPost: alt.comp.microsoft.windows

    On 19.03.2023 14:54, VanguardLH wrote:
    Note: OP originally posted to:

    alt.comp.os.windows-10
    alt.comp.os.windows-11
    alt.internet.wireless

    When Kleebauer replied, he stripped out the last 2 newsgroups leaving:

    alt.comp.os.Windows-10

    Because I couldn't post the message when it was cross posted to
    these 3 groups. news.aioe.org doesn't exist anymore so I now use news.eternal-september.org and there is no alt.comp.os.windows-11
    so I replied only to the group I have subscribed.


    Then when he replied later, he added:>
    alt.comp.microsoft.windows

    No, freethinker added in a reply the two groups:

    alt.comp.microsoft.windows
    alt.internet.wireless

    Because alt.comp.microsoft.windows is is available here,
    I only dropped alt.internet.wireless.


    which does not exist on my NNTP server. Maybe it does on his.
    Regardless of cause, I removed the *.windows newsgroup since it was
    probably a typo. My reply was therefore submitted to just:

    alt.comp.os.windows-10

    No, you cross posted also to:

    alt.comp.microsoft.windows


    If I added back the original 2 newsgroups that Kleebauer stripped, this subthread would appear disconnected from the *.windows-11 and *.wireless newsgroups perhaps causing confusing for why there was missing posts.

    Usenet is dead, especially the alt. hierarchy.


    Herbert Kleebauer <klee@unibwm.de> wrote:
    Freethinker wrote:

    We're both doing the same thing but different ways.
    You're using the PATH for what it was designed for.
    I'm using the AppPaths for what it was designed for.

    I think, there is a big difference. The first is "one for all"
    and the second "one for one". I add a single directory to
    the PATH variable when I set up a new PC. That's all what
    is needed for the current and all future utilities I use.
    You have to do it for any utility you use and, if you setup
    a new PC, you have to do it again for all of them.


    AppPaths is defined in the registry under:

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths

    The PATH environment variable consists of sysPATH (global) and userPATH
    (per Windows account).


    Unlike PATH which can have sys (global) and user constituents, the
    AppPaths registry entries are under HKLM, so everyone sees those.

    Sorry if I misunderstood. In "one for all" and "one for one", no way to tell which one was which.

    Yes, you misunderstood completely what I said. I have more than
    100 utilities (.exe .com .bat) in d:\dos622\befehle (many don't
    work anymore in 64 bit Windows because they are 16 bit code).
    By just adding one entry to the PATH variable when setting up
    a new PC, all these utilities are available from any directory
    in a CMD window because there location is in the PATH variable.
    That's what I called "one (entry) for all (utilities)".

    If you use the AppPaths method, you need a registry entry for
    each of the more than 100 utilities. That's what I called "one
    (entry) for one (utilities)". And if you get a new PC, you have
    to create all these entries again.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Freethinker@21:1/5 to VanguardLH on Sun Mar 19 19:04:24 2023
    XPost: alt.comp.microsoft.windows

    On 19.03.23 14:54, VanguardLH wrote:
    I think, there is a big difference. The first is "one for all"
    and the second "one for one". I add a single directory to
    the PATH variable when I set up a new PC. That's all what
    is needed for the current and all future utilities I use.
    You have to do it for any utility you use and, if you setup
    a new PC, you have to do it again for all of them.

    AppPaths is defined in the registry under:

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths ^^^^^^^^^^^^^^^^^^
    \___ Everyone gets this.

    The definition is under HKLM, so every Windows account will see those definitions.

    I think Herbert meant every physical computer gets it if you copy it over.

    It's really two different ways to approach the same problem set where
    there's nothing stopping you from exporting the Windows AppPaths key on one computer and importing it to the second, third, fourth, etc computer.

    In fact, that's exactly what I do, which is why I said I'll be using his
    batch file solution on all my computers a decade or more from now.

    There's nothing to remember on any computer once you copy stuff over.
    Win+R & then manpath (and then hit the enter key).

    Where of course I have the Win+R already pinned to the taskbar so it's just (Click on the taskbar Win+R icon) > manpath (and then hit the enter key).

    It would be nice to list the pros and cons of each method, where I can't
    think of any reason why _both_ methods can't work seamlessly together.

    I assume most people use the $PATH though because they don't know about AppPaths, but Herbert has a better system than most people because it's my assumption that most people constantly add more and more paths to the path.

    Herbert does not do that.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Freethinker@21:1/5 to Herbert Kleebauer on Sun Mar 19 19:21:35 2023
    XPost: alt.comp.microsoft.windows

    On 19.03.23 18:36, Herbert Kleebauer wrote:
    Yes, you misunderstood completely what I said. I have more than
    100 utilities (.exe .com .bat) in d:\dos622\befehle (many don't
    work anymore in 64 bit Windows because they are 16 bit code).
    By just adding one entry to the PATH variable when setting up
    a new PC, all these utilities are available from any directory
    in a CMD window because there location is in the PATH variable.
    That's what I called "one (entry) for all (utilities)".

    Each method has pros and cons where there's nothing preventing a user from implementing both methods and copying them to every computer for years on
    end (where it's two easy and obvious steps on that second computer).

    I don't use your single-path method but I assume you first copy over the directory to the second computer & then you append that location to the
    $PATH and voila, you have a replication that works on every computer.

    I follow the same two-step approach for every computer by first copying
    over the batch file directory and then importing the App Paths registry sub
    key to that second computer, and voila, I have an exact replication too.

    To do both would be a combination culminating in a three-step process.
    [1] First you copy the batch file hierarchy from PC1 to PC2, PC3, etc.
    [2] Then Herbert appends the path to that hierarchy on PC2, PC3, etc.
    [3] Then I import the AppPaths registry subkey into PC2, PC3, etc.

    At that point, both methods work on PC2, PC3, etc.

    One mainly works from the command line ($PATH).
    The other mainly works off the task bar (App Paths).

    Each have their pros and cons, such as the Windows RUN command *remembers*
    what you typed into it so you can just scroll down the list of all the previously used commands while the Windows command line doesn't have a
    history that I know of (I wish it did but that's why commands are made to
    be easily remembered).

    Another pro of the App Paths method is you can easily have two commands
    with the exact same name (if you want to do that), which can sometimes
    happen (such as "update" or "todo" or "calendar" or whatever).

    With the $PATH, not only can you not have two commands with the same name
    in the same single entry, but if you have the same command in different locations, you have to remember which location is first in the path because
    it will (almost) never find the same-name command in the second location.

    As I said, each method has its own pros and cons but both are easy.

    It's just that most people aren't aware of the App Paths sub key while
    everyone knows about the $PATH.

    If you use the AppPaths method, you need a registry entry for
    each of the more than 100 utilities. That's what I called "one
    (entry) for one (utilities)". And if you get a new PC, you have
    to create all these entries again.

    What would be nice would be to list the pros and cons of each method.

    For example, the App Paths method works nicely on the taskbar and it
    remembers what you used and presents a short list to you if you want.

    The $PATH method works nicely on the command line, but it doesn't have that history (that I know of) but it works without needing to use the Win+R key.

    Maybe we should work together to list the pros and cons, but those seem to
    me to be the main differences, where copying the command to PC2 and PC3
    isn't a problem because it's the same two-step process of copying the
    directory of commands, and then copying over either the $PATH addition, or importing the text file of the registry addition.

    Same thing. Two different ways. Slightly different. But same end result.
    Win+R manpage enter

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From VanguardLH@21:1/5 to Herbert Kleebauer on Sun Mar 19 14:29:45 2023
    XPost: alt.comp.microsoft.windows

    Herbert Kleebauer <klee@unibwm.de> wrote:

    No, you cross posted also to:

    alt.comp.microsoft.windows

    Yeah, realized I hadn't edited the Newsgroups header before I submitted
    after I hit the Send button. Got interrupted with a delivery, so I sent immediately since I didn't know when I'd be back. My fuckup. However,
    since you say alt.comp.microsoft.windows is available on your NNTP
    server, probably a good thing I accidentally left it included in reply,
    so I left it in for this reply, too.

    Usenet is dead, especially the alt. hierarchy.

    Oh, we must be zombies that still have fingers on our rotting corpses to
    type in replies. I might look like one in the morning until I shave,
    shower, and have some coffee.

    Noobs were weaned on web browsers. The vast majority of users haven't a
    clue what is NNTP, or how to configure an NNTP client. We die off, the
    noobs stick with the Web, so Usenet dies as we old farts die.

    Yes, you misunderstood completely what I said. I have more than
    100 utilities (.exe .com .bat) in d:\dos622\befehle (many don't
    work anymore in 64 bit Windows because they are 16 bit code).
    By just adding one entry to the PATH variable when setting up
    a new PC, all these utilities are available from any directory
    in a CMD window because there location is in the PATH variable.
    That's what I called "one (entry) for all (utilities)".

    Again, depends on whether you added the path to sysPATH or userPATH. If
    added to sysPATH, every Windows account will have PATH envvar pointing
    to your tools path. If added to userPATH, only your Windows account
    will have PATH envvar pointing to your tools path. Not mentioned is
    *how* you are adding your tools path to the PATH envvar.

    If you use the AppPaths method, you need a registry entry for
    each of the more than 100 utilities. That's what I called "one
    (entry) for one (utilities)". And if you get a new PC, you have
    to create all these entries again.

    Or export the regkey to a .reg file, and include in your backups. On a
    new setup, just 'run' the .reg file. If you want just the apppaths
    listed for only your tools, edit the .reg file to remove other entries
    before including the .reg file in your backups.

    Personally using the AppPaths registry entries should really only be
    done by installers. Far too much a nuisance for a user to be
    monitoring, editing, exporting, backing up, and restoring these registry entries. So, I, like you, use the PATH envvar. Since I want access to
    my utilities under any Windows account, the tools path gets added to the sysPATH. I really don't want to add it to userPATH since I want to use
    those tools under any Windows account, including Administrator if shit
    happens and I need to resort to use that account that I would otherwise
    never touch except for emergencies (and because user profiles can get corrupted, I also have an AdminBackup account as a backup to the
    emergency-only Administrator account).

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ken Blake@21:1/5 to All on Sun Mar 19 14:36:58 2023
    XPost: alt.comp.microsoft.windows

    On Sun, 19 Mar 2023 17:36:29 +0100, Herbert Kleebauer <klee@unibwm.de>
    wrote:

    Usenet is dead, especially the alt. hierarchy.


    Certainly dying, but fortunately not yet dead.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Frank Slootweg@21:1/5 to Ken Blake on Mon Mar 20 13:45:29 2023
    XPost: alt.comp.microsoft.windows

    Ken Blake <Ken@invalid.news.com> wrote:
    On Sun, 19 Mar 2023 17:36:29 +0100, Herbert Kleebauer <klee@unibwm.de>
    wrote:

    Usenet is dead, especially the alt. hierarchy.

    Certainly dying, but fortunately not yet dead.

    After our extended holiday there were some 8,000 articles waiting in 6
    high volume groups. Not dead at all, I would say! :-)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Freethinker@21:1/5 to VanguardLH on Mon Mar 20 21:09:25 2023
    XPost: alt.comp.microsoft.windows

    On 20.03.23 00:59, VanguardLH wrote:
    Personally using the AppPaths registry entries should really only be
    done by installers. Far too much a nuisance for a user to be
    monitoring, editing, exporting, backing up, and restoring these registry entries. So, I, like you, use the PATH envvar. Since I want access to
    my utilities under any Windows account, the tools path gets added to the sysPATH. I really don't want to add it to userPATH since I want to use
    those tools under any Windows account, including Administrator if shit happens and I need to resort to use that account that I would otherwise
    never touch except for emergencies (and because user profiles can get corrupted, I also have an AdminBackup account as a backup to the emergency-only Administrator account).

    I think there is nothing wrong with using %path% but it has severe
    limitations which the App Paths sub key does not have (and vice versa).

    They are different.

    For example, if you want to open up the Windows font folder, you just type "Win+R fonts" and if you want to edit one of your files you type "Win+R
    myfile" or if you want to run any of your shortcuts you type "Win+R myshortcut", etc.

    You can do all that using the %path% as Herbert suggested but unless you
    put all your executables and shortcuts and batch files into the same
    folder, it will mess up %path% won't it?

    Worse, how do you run firefox.exe from three different locations using the %path% when it's super trivial to run each of those from the App Paths
    subkey (as explained in another thread on the subject I posted later)?

    You can also run programs and open up folders and run any shortcut.
    These are just off the cuff examples I typed up for Stan Brown.

    This is my App Paths sub key to bring up all the %keywords% from MS.
    HKLM\Microsoft\Windows\CurrentVersion\App Paths\%.exe
    @Default=C:\path\keywords.ppt
    Which lists all the %keyword% Windows keywords for me, lest I forget.
    %PATH% ¡V C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem
    %PATHEXT% ¡V .com;.exe;.bat;.cmd;.vbs;.vbe;.js;.jse;.wsf;.wsh;.msc
    %HOMEPATH% -C:\Users\<username>
    %LOCALAPPDATA% ¡V C:\Users\<username>\AppData\Local
    %PSMODULEPATH% ¡V %SystemRoot%\system32\WindowsPowerShell\v1.0\Modules\

    The App Path is useful if you want to open something up without having to create a shortcut (although the App Path can run a shortcut also).

    It's probably important to note (because it's not intuitive) that the name
    of the subkey can be anything but it must end with "exe" for some reason.

    To take a common example likely everyone has, this common app path sub key:
    HKLM\Microsoft\Windows\CurrentVersion\App Paths\firefox.exe
    @Default=C:\path\firefox.exe
    Doesn't actually have to be "firefox.exe" but even "f.exe" would work.
    HKLM\Microsoft\Windows\CurrentVersion\App Paths\f.exe
    @Default=C:\path\firefox.exe

    That is, the only meaningful part of the sub key name is the "exe" and the
    fact that it has to be a unique sub key within the App Paths registry key.

    That gives you an advantage if, for example, you want to make a few Firefox
    App Paths sub keys (which I haven't tested) such as this off the cuff set.

    HKLM\Microsoft\Windows\CurrentVersion\App Paths\f1.exe
    @Default=C:\path\firefox.exe (with no options invoked)

    HKLM\Microsoft\Windows\CurrentVersion\App Paths\f2.exe
    @Default=C:\path\firefox.exe (with one set of options invoked)

    HKLM\Microsoft\Windows\CurrentVersion\App Paths\f3.exe
    @Default=C:\path\firefox.exe (with another set of options invoked)

    Where those sets of options can be targets inside separate shortcuts,
    but where those shortcuts don't have to clutter your GUI if you use
    them a lot at all you need to remember is f1, f2 and f3 to run them.

    In addition, you might have firefox in your path but maybe you want to run
    a different firefox, which the App Paths sub key allows you to easily do.

    HKLM\Microsoft\Windows\CurrentVersion\App Paths\f4.exe
    @Default=C:\different-path\firefox.exe

    To run each of these, you'd only need to pin the Win+R icon to the taskbar
    and then tap that icon and a selection of previous choices can be made
    from a list of the most recently used that Windows automatically maintains.

    You can turn that remembering off, of course, and of course you can always check your App Paths subkey if you forget the names you assigned to them.

    To import into a second computer, of course you'd need to be well
    organized that you put your scripts and folders in the same location.

    Notice that it also opens documents, which I use for frequently used stuff.
    HKLM\Microsoft\Windows\CurrentVersion\App Paths\doc1.exe
    @Default=C:\path\document.txt

    HKLM\Microsoft\Windows\CurrentVersion\App Paths\doc2.exe
    @Default=C:\path\document.xls

    HKLM\Microsoft\Windows\CurrentVersion\App Paths\doc3.exe
    @Default=C:\path\document.pdf

    Once you decide to run shortcuts, you can do almost anything with them.
    HKLM\Microsoft\Windows\CurrentVersion\App Paths\whatismyipaddress.exe
    C:\path\runcurl.lnk
    Where the shortcut runcurl.lnk has the following target
    %comspec% /k %windir%\system32\curl.exe icanhazip.com

    HKLM\Microsoft\Windows\CurrentVersion\App Paths\archives.exe
    C:\path\archives.lnk
    Where the shortcut archives.lnk has the following target
    %comspec% /c %windir%\explorer.exe c:\path\archives

    HKLM\Microsoft\Windows\CurrentVersion\App Paths\admin.exe
    C:\path\admim.bat
    Where admin.bat sets an obvious color when it invokes an admin window.
    @ECHO OFF
    SETLOCAL ENABLEEXTENSIONS
    IF NOT "%~1"=="" goto :START
    SET LogFile=%TEMP%\admin.vbs"
    Echo Set UAC = CreateObject("Shell.Application") >"%LogFile%"
    Echo UAC.ShellExecute "%~f0", "%cd%", "", "runas", 1 >>"%LogFile%"
    Start "" /MIN "%LogFile%"
    goto :EOF
    :START
    cmd /k "CD /D "%*" & Echo Administrator: & color 4F"
    REM runas.exe /user:administrator /savecred "put your command here instead, to skip UAC"
    :EOF

    It's advised to maintain a summary document that explains them all.
    HKLM\Microsoft\Windows\CurrentVersion\App Paths\apppaths.exe
    C:\path\my_app_paths.doc

    Which, brings up, for example, something like this quick summary.
    Win+R % (brings up all the Windows keywords)
    Win+R firefox (runs the default firefox with no options
    Win+R f1 (runs a different firefox with no options invoked
    Win+R f2 (runs firefox with one set of options invoked
    Win+R f3 (runs firefox with another set of options invoked
    Win+R f4 (runs yet another firefox)
    Win+R doc1 (opens a text document for edit)
    Win+R doc2 (opens an excel document for edit)
    Win+R doc3 (opens a pdf document for edit)
    Win+R whatismyipaddress (determines your current WAN/VPN IP address)
    Win+R archives (opens the archives folder in Windows file explorer)
    Win+R admin (opens an obvious red administrator command window)
    Win+R apppaths (opens a Word document of the app paths subkeys)

    Be advised that invoking the app paths sub key does not create the
    document but an empty document in its place will work for starters.

    While I never change the %path%, there is nothing preventing anyone from
    using both the Windows %path% and the App Paths sub key as intended.

    If you find out that App Paths does even better stuff, let me know as
    I'm always using this feature of Windows 10 every day many times a day.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Herbert Kleebauer@21:1/5 to Freethinker on Tue Mar 21 01:53:26 2023
    XPost: alt.comp.microsoft.windows

    On 20.03.2023 20:09, Freethinker wrote:


    For example, if you want to open up the Windows font folder, you just type "Win+R fonts"

    Or you type "start fonts" in a CMD window.


    You can do all that using the %path% as Herbert suggested but unless you
    put all your executables and shortcuts and batch files into the same
    folder, it will mess up %path% won't it?

    There is no big difference, you put all im ONE registry and I put
    it in ONE directory.


    Worse, how do you run firefox.exe from three different locations using the %path% when it's super trivial to run each of those from the App Paths subkey (as explained in another thread on the subject I posted later)?

    You put 3 entries in the registry, I put 3 batch flies (f1.bat, f2.bat
    f3.bat) in the directory which is in the PATH.


    You can also run programs and open up folders and run any shortcut.
    These are just off the cuff examples I typed up for Stan Brown.

    This is my App Paths sub key to bring up all the %keywords% from MS.
    HKLM\Microsoft\Windows\CurrentVersion\App Paths\%.exe
    @Default=C:\path\keywords.ppt

    And I could use a batch file with the content:

    start C:\path\keywords.ppt



    In addition, you might have firefox in your path but maybe you want to run
    a different firefox, which the App Paths sub key allows you to easily do.

    HKLM\Microsoft\Windows\CurrentVersion\App Paths\f4.exe
    @Default=C:\different-path\firefox.exe

    A batch file f4.bat with the content:

    C:\different-path\firefox.exe


    To run each of these, you'd only need to pin the Win+R icon to the taskbar and then tap that icon and a selection of previous choices can be made
    from a list of the most recently used that Windows automatically maintains.

    And where is the difference. You type f4 and firefox is started, either
    because there is a batch file f4.bat in the PATH-directory or because
    there is an entry in the registry.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Herbert Kleebauer@21:1/5 to Freethinker on Tue Mar 21 01:22:20 2023
    XPost: alt.comp.microsoft.windows

    On 18.03.2023 02:01, Freethinker wrote:


    This is probably what I'll use for the next decade or two because
    it's simple and obvious and elegant enough to be easily remembered
    and when needed, it's eminently extensible as it's self explanatory.

    Here a more usable version. Just insert the text between the two lines;

    @@keyword
    $$keyword

    Press q to close the window.



    @echo off
    if [%1]==[] goto :usage

    findstr /b @@%1 %~f0>nul
    if errorlevel 1 goto :usage
    findstr /b $$%1 %~f0>nul
    if errorlevel 1 goto :usage

    for /f "tokens=1 delims=:" %%i in ('findstr /n /b @@%1 %~f0') do set m=%%i
    for /f "tokens=1 delims=:" %%i in ('findstr /n /b $$%1 %~f0') do set n=%%i
    set /a n=n-m
    if %n% gtr 50 set /a n=50
    mode con cols=100 lines=%n%
    color 17
    more +%m% %~f0
    goto :eof

    :usage
    mode con cols=80 lines=25
    color 17
    set m=
    for /f "tokens=* delims=@" %%i in ('findstr /b @@ %~f0') do call set m=%%m%% %%i
    echo.&echo help available for:&echo.
    call :sub %m%
    echo.
    pause
    goto :eof

    :sub
    if [%1]==[] goto :eof
    echo %1 %2 %3 %4 %5 %6 %7 %8
    shift&shift&shift&shift&shift&shift&shift&shift
    goto :sub

    :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

    @@netsh

    netsh interface ipv4 set address name="eth0" static 192.168.0.2 255.255.255.0 192.168.0.1

    $$netsh

    @@echo
    Insert text about echo
    $$echo


    @@dir

    Insert text about dir
    $$dir

    @@find


    Insert text about find

    $$find

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From VanguardLH@21:1/5 to Freethinker on Tue Mar 21 19:38:33 2023
    XPost: alt.comp.microsoft.windows

    Freethinker <freethinker@mymail.com> wrote:

    You can do all that using the %path% as Herbert suggested but unless
    you put all your executables and shortcuts and batch files into the
    same folder, it will mess up %path% won't it?

    I have a C:\Batch folder containing all my .bat files. For some
    programs, they're installed or copied under C:\Programs but in
    subfolders for each program. I have added the subfolders to PATH for SysInternals and Nirsoft, but the rest I don't use that often, so I just
    use .bat files to find them which, of course, are in my C:\Batch folder.
    So, I've got about 3 folders that I add to PATH (and in the sysPATH
    envvar since I want the same access under any Windows account under
    which I login, including the Administrator account used only for
    emergencies): C:\Batch, C:\Programs\SysInternals, and
    C:\Programs\Nirsoft. Any other progs under C:\Programs (each in their
    own subfolder) are easily ran using the .bat files under C:\Batch. If I
    add shortcuts to the Start menu, desktop, or Taskbar toolbars, well, the
    path is already specified in the shortcut.

    I consider the AppPaths registry entry for use by installers of
    programs. That's really meant for their management. AppPaths is
    intended for app registration.

    https://learn.microsoft.com/en-us/windows/win32/shell/app-registration

    As with the AppPaths registry key, there is an Applications registry key
    for the same purpose. Apparently more app info can be stored under the Applications/<prognam> keys than for AppPaths/<progname>. So, now you
    have 2 keys, and all their subkeys, to track, synchronize, backup to
    .reg file, and import.

    If you edit the AppPaths and Applications subkeys, you could end up
    fucking up what the installed added, and what the program expects.

    Worse, how do you run firefox.exe from three different locations using
    the %path% when it's super trivial to run each of those from the App
    Paths subkey (as explained in another thread on the subject I posted
    later)?

    AppPaths and Applications registry keys only specify a single path to
    the executable, not 3 selections for multiple paths.

    If you are creating the AppPaths subkeys for multiple but separate
    instances of Firefox, like a subkey named firefox.exe, another named firefox2.exe, and another for firefox3.exe, why can't you do that using shortcuts, or .bat files in your batch folder added to PATH?

    The App Path is useful if you want to open something up without having
    to create a shortcut (although the App Path can run a shortcut also).

    Edit the registry to add a subkey under AppPaths, add all the subkeys
    under that subkey for command->open, etc. Or define a shortcut. I
    don't see one is easier than the other. In fact, to get all the
    sub-subkeys correct under an AppPath/<progname> key is more difficult.

    It's probably important to note (because it's not intuitive) that the
    name of the subkey can be anything but it must end with "exe" for
    some reason.

    The subkey for <progname> is expected to match on the executable
    filename. That you give it a different program "name" in AppPaths is
    because you're creating multiple keys pointing to the same program, but supposedly something is different in each, like adding an argument to
    the open command. You're creating multiple AppPath/<prog> subkeys with different names like you creating multiple .bat files with different
    names that call the same program, but with something different in each
    .bat file for why there are multiples of them for the same program
    (although with .bat files, you could use command-line arguments when
    calling the batch file to specify how to different execute the program).

    To take a common example likely everyone has, this common app path sub
    key:
    HKLM\Microsoft\Windows\CurrentVersion\App Paths\firefox.exe
    @Default=C:\path\firefox.exe
    Doesn't actually have to be "firefox.exe" but even "f.exe" would work.
    HKLM\Microsoft\Windows\CurrentVersion\App Paths\f.exe
    @Default=C:\path\firefox.exe

    So, you are not defining separate AppPaths subkeys with differing
    prognames, but creating aliases using AppPaths to point at the same
    program? Harken the DOSKEY command, or same-content .bat files
    executing the same scripts all residing in a folder added to PATH, or differently named shortcuts all pointing to the same program. Several
    ways to skin the same cat.

    Where those sets of options can be targets inside separate shortcuts,
    but where those shortcuts don't have to clutter your GUI if you use
    them a lot at all you need to remember is f1, f2 and f3 to run them.

    Shortcuts never have to clutter a GUI. Put the .lnk shortcut files in a
    folder you've added to your PATH envvar, like the same one where you're
    storing all your .bat files. .lnk shortcut files are executable, so you
    can call them from the command line, too. Create a shortcut on your
    desktop. Have it load "C:\Program Files\Mozilla Firefox\firefox.exe"
    (or whatever path you like where an instance is found - and works from
    there) along with any command-line arguments. Then move it to your
    common batch folder (which has been included in PATH). Name the
    shortcut "fx12". In a command shell, run fx12.lnk (you have to include
    the extension). Voila, Firefox opens from the shortcut stored in a
    PATH'ed location.

    HKLM\Microsoft\Windows\CurrentVersion\App Paths\f4.exe
    @Default=C:\different-path\firefox.exe

    That can run afoul of the program using its install-time defined
    AppPaths subkey, like when it runs an external updater that expects run
    the executable from the same path as where the updater was stored. Lots
    of programs expect pathing to be consistent which means the user hasn't
    fucked it up. That is why I said AppPaths (and Applications) are really
    for installer-defined and program-managed pathing.

    We can argue more example and scenarios, but it comes down to which is
    easier to manage. For you, you like AppPaths (and might now explore the Applications registry key, too). For others, they see no need to putz
    around in the registry for what they similarly accomplish with PATH,
    shortcuts, batch scripts, or other more "normal" methods of defining
    executable paths and arguments.

    I knew about AppPaths many years ago. Despite its possible convenience,
    I didn't see it as a plausible means to management pathing from my
    perspective, and I wasn't going to fuck with how installers, updaters,
    or programs were expecting those keys to be defined.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Bugsy@21:1/5 to Freethinker on Tue Mar 21 23:55:59 2023
    XPost: alt.comp.microsoft.windows

    Freethinker <freethinker@mymail.com> wrote:

    Why not have both tools so tasks better suited for the %path% use the Phillips screwdriver and tasks suited to App Paths use the Flathead?

    It's more like a set of pliers with different shaped heads where both will
    do everything but each tool will do some things with fewer keystrokes.
    --
    Please wear your mask!
    Bugs are everywhere. :)
    !__!
    (@)(@)
    \.'||'./
    -: :: :-
    /'..''..'\

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Freethinker@21:1/5 to Herbert Kleebauer on Wed Mar 22 06:51:01 2023
    XPost: alt.comp.microsoft.windows

    On 21.03.23 02:53, Herbert Kleebauer wrote:
    For example, if you want to open up the Windows font folder, you just type "Win+R fonts"

    Or you type "start fonts" in a CMD window.

    Yes. But the App Paths works for thousands upon thousands of useful things, whereas Microsoft only built in a few hundred things that work that way.

    An example is Microsoft didn't build in a way to open up any desired
    document just by typing a single word like "family" to open "family.xls".

    Neither did Microsoft build in a way to open up a folder in a long path
    by typing a single word like "archives" to open up your archival folder.

    Likewise, Microsoft didn't build a way to run any shortcut simply by
    typing a single word (one per shortcut) no matter where the links are
    stored.

    You can do all that using the %path% as Herbert suggested but unless you put all your executables and shortcuts and batch files into the same folder, it will mess up %path% won't it?

    There is no big difference, you put all im ONE registry and I put
    it in ONE directory.

    I never said your method didn't work as it works fine.

    But if you've searched for something in Windows even once, then that's more searches than I've needed to run in two decades, just to find my own stuff.

    An example of where it's ludicrous that people search for the simplest
    things, which I sure you do not do but many people do, is that people use
    the search to open up an administrator command window.

    Of course Windows supplies a way to open an admin command if you know the
    three keys to press after cmd, but what if you want a blue command window
    and a red one side by side? You can do that by typing "blue" and then "red" when you use the App Paths subkey.

    Could you do that a different way?
    Sure.

    In your method, I'm sure you'll put a blue.bat and red.bat in a single path
    and then open up a command window and type "blue" and "red" to open them.

    In the App Paths method, it's the same single word but the shortcuts or
    batch files can be in any path. You could even have multiple blue.bat files
    and the App Paths method will call them (lightblue => blue.bat, darkblue =>blue.bat) where blue.bat is in multiple locations).

    App Paths doesn't subtract functionality.
    It adds it.


    Worse, how do you run firefox.exe from three different locations using the %path% when it's super trivial to run each of those from the App Paths subkey (as explained in another thread on the subject I posted later)?

    You put 3 entries in the registry, I put 3 batch flies (f1.bat, f2.bat f3.bat) in the directory which is in the PATH.

    No arguments. All those have to be in the %path% though, whereas with the
    App Paths sub key, they can be anywhere you want (even on a portable drive)
    and there is no need to slow down Windows always looking on the portable
    drive when Windows runs down the %path% to find something.

    You can also run programs and open up folders and run any shortcut.
    These are just off the cuff examples I typed up for Stan Brown.

    This is my App Paths sub key to bring up all the %keywords% from MS.
    HKLM\Microsoft\Windows\CurrentVersion\App Paths\%.exe
    @Default=C:\path\keywords.ppt

    And I could use a batch file with the content:

    start C:\path\keywords.ppt

    I never said there wasn't more than one way to skin a cat.
    This App Paths subkey is designed by Microsoft to be additive.

    If you don't want to put an external USB drive in your path, but if you
    have a batch file, document or shortcut sitting on that external drive, you
    can still run (or open) them with a single word with the App Paths sub key.

    Otherwise you may have to add the external drive to your path and that
    stinks although you're clever enough to have the command self modify the
    path so there are always going to be multiple ways to skin a cat.

    Can you find even one negative to the App Paths capability?

    I don't mean can you find something it can't do, but I'm asking if I use
    the App Paths subkey, am I *losing* any functionality (or only gaining it)?

    In addition, you might have firefox in your path but maybe you want to run a different firefox, which the App Paths sub key allows you to easily do.

    HKLM\Microsoft\Windows\CurrentVersion\App Paths\f4.exe
    @Default=C:\different-path\firefox.exe

    A batch file f4.bat with the content:

    C:\different-path\firefox.exe

    Yes. But what if you don't want to put f4.bat in your path?
    What if f4.bat is on an external drive as just one example?

    To run each of these, you'd only need to pin the Win+R icon to the taskbar and then tap that icon and a selection of previous choices can be made from a list of the most recently used that Windows automatically maintains.

    And where is the difference. You type f4 and firefox is started, either because there is a batch file f4.bat in the PATH-directory or because
    there is an entry in the registry.

    I'm not saying there isn't an entry in the registry.
    Nor are you saying that you don't have to put everything in your path.

    These are additive.
    If you use both methods, can you come up with even one downside to that?

    If there are zero negatives, then what's the problem?

    It's like having two screwdrivers, one which you like which is a Phillips screwdriver, and the other which I like which is a Flathead screwdriver.

    It's not negative that one screwdriver does things one way and the other
    does them differently, is it?

    Why not have both tools so tasks better suited for the %path% use the
    Phillips screwdriver and tasks suited to App Paths use the Flathead?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Freethinker@21:1/5 to VanguardLH on Wed Mar 22 07:23:02 2023
    XPost: alt.comp.microsoft.windows

    On 21.03.23 19:38, VanguardLH wrote:
    You can do all that using the %path% as Herbert suggested but unless
    you put all your executables and shortcuts and batch files into the
    same folder, it will mess up %path% won't it?

    I have a C:\Batch folder containing all my .bat files.

    What if you maintain batch files on external drives and in multiple
    locations? Do you really add a billion entries to the %path% in that case?

    I realize what you're doing is putting everything into a single folder, but that's a limitation that you don't even think about for the App Paths tool.

    It's two different ways to do the same thing, which both will do.

    It's like having two grinding wheels or two different grits of sandpaper.
    Why would you argue against having the right tool for the job at hand?

    It's purely additive in functionality.

    For some
    programs, they're installed or copied under C:\Programs but in
    subfolders for each program. I have added the subfolders to PATH for SysInternals and Nirsoft, but the rest I don't use that often, so I just
    use .bat files to find them which, of course, are in my C:\Batch folder.

    According to Microsoft, this is precisely why they created the App Paths
    subkey in Windows XP.

    So, I've got about 3 folders that I add to PATH (and in the sysPATH
    envvar since I want the same access under any Windows account under
    which I login, including the Administrator account used only for emergencies): C:\Batch, C:\Programs\SysInternals, and
    C:\Programs\Nirsoft. Any other progs under C:\Programs (each in their
    own subfolder) are easily ran using the .bat files under C:\Batch. If I
    add shortcuts to the Start menu, desktop, or Taskbar toolbars, well, the
    path is already specified in the shortcut.

    I never said a bad thing about the %path% just like I wouldn't call 400
    grit sandpaper worse than 300 grit sandpaper.

    They're two tools that will do the same job.
    One is suited to some jobs better than the other.

    To argue vehemently against 300 grit sandpaper in favor of 400 grit sounds
    a bit wasteful since there is no disadvantage to using both if you want to.

    Or don't use both.
    It's up to you which grit sandpaper you want to use for any given task.

    I consider the AppPaths registry entry for use by installers of
    programs. That's really meant for their management. AppPaths is
    intended for app registration.

    https://learn.microsoft.com/en-us/windows/win32/shell/app-registration

    I'm sure it is.
    So what?

    As with the AppPaths registry key, there is an Applications registry key
    for the same purpose. Apparently more app info can be stored under the Applications/<prognam> keys than for AppPaths/<progname>. So, now you
    have 2 keys, and all their subkeys, to track, synchronize, backup to
    .reg file, and import.

    Yes. But you're arguing that you shouldn't have a Dremel tool because it
    can handle all sizes of bits, even if you only really use the cutting
    wheel.

    That's not sensible.

    You can't blame the Dremel tool because it does more than you need it to
    do. The way I use the App Paths is with just the "@Default" but if you want
    to use it with different bits (as you're describing) then that's not a negative.

    It's a positive.

    If you edit the AppPaths and Applications subkeys, you could end up
    fucking up what the installed added, and what the program expects.

    That's kind of like saying that a kitchen should only have forks because if
    you use chopsticks, you could end up fucking up the plate of spaghetti.

    What do you have against having the choice of forks or chopsticks?


    Worse, how do you run firefox.exe from three different locations using
    the %path% when it's super trivial to run each of those from the App
    Paths subkey (as explained in another thread on the subject I posted
    later)?

    AppPaths and Applications registry keys only specify a single path to
    the executable, not 3 selections for multiple paths.

    If you are creating the AppPaths subkeys for multiple but separate
    instances of Firefox, like a subkey named firefox.exe, another named firefox2.exe, and another for firefox3.exe, why can't you do that using shortcuts, or .bat files in your batch folder added to PATH?

    What is your reason for not wanting a variety of shovels to use when you
    want to use them, where all shovels end up doing the same thing, don't
    they?
    https://www.trees.com/gardening-and-landscaping/types-of-shovels

    Is it really that bad to have two types of shovels in your tool shed?

    The App Path is useful if you want to open something up without having
    to create a shortcut (although the App Path can run a shortcut also).

    Edit the registry to add a subkey under AppPaths, add all the subkeys
    under that subkey for command->open, etc. Or define a shortcut. I
    don't see one is easier than the other. In fact, to get all the
    sub-subkeys correct under an AppPath/<progname> key is more difficult.

    I'm not sure why you're arguing repeatedly against having multiple shovels. Don't use the Edging Shovel when you prefer to use the Trench Shovel.

    But why chastise me when I prefer to use the Trench Shovel over the Edging Shovel?

    (I'm randomly picking shovel types from the previous list where my argument
    is having two types of tools is not a bad thing like you're saying it is).

    It's probably important to note (because it's not intuitive) that the
    name of the subkey can be anything but it must end with "exe" for
    some reason.

    The subkey for <progname> is expected to match on the executable
    filename.

    That's just false.
    You think that.
    But it's false.

    It's a keyword.
    It can be anything.

    It just has to end with exe but it could be Poopy.exe for all that matters. What you said is like saying all shovels must have wooden handles.

    It's OK if a shovel has a fiberglass handle instead of a hickory handle.

    That you give it a different program "name" in AppPaths is
    because you're creating multiple keys pointing to the same program, but supposedly something is different in each, like adding an argument to
    the open command. You're creating multiple AppPath/<prog> subkeys with different names like you creating multiple .bat files with different
    names that call the same program, but with something different in each
    .bat file for why there are multiples of them for the same program
    (although with .bat files, you could use command-line arguments when
    calling the batch file to specify how to different execute the program).

    What I'm doing is no different than you owning more than one shovel.
    You're making a simple choice of tools into the bogeyman for some reason.


    To take a common example likely everyone has, this common app path sub
    key:
    HKLM\Microsoft\Windows\CurrentVersion\App Paths\firefox.exe
    @Default=C:\path\firefox.exe
    Doesn't actually have to be "firefox.exe" but even "f.exe" would work.
    HKLM\Microsoft\Windows\CurrentVersion\App Paths\f.exe
    @Default=C:\path\firefox.exe

    So, you are not defining separate AppPaths subkeys with differing
    prognames, but creating aliases using AppPaths to point at the same
    program? Harken the DOSKEY command, or same-content .bat files
    executing the same scripts all residing in a folder added to PATH, or differently named shortcuts all pointing to the same program. Several
    ways to skin the same cat.

    Again, you may prefer to dig a trench using a pickax and a shovel while I
    might want to dig that same trench using just the shovel. Why do you care?

    Use the tools that suit you best.
    Why is it so bad to have more than one tool that does the job slightly different?

    Is there any disadvantage to having more than one tool?
    What is it?

    I can't think of any.

    Where those sets of options can be targets inside separate shortcuts,
    but where those shortcuts don't have to clutter your GUI if you use
    them a lot at all you need to remember is f1, f2 and f3 to run them.

    Shortcuts never have to clutter a GUI. Put the .lnk shortcut files in a folder you've added to your PATH envvar, like the same one where you're storing all your .bat files. .lnk shortcut files are executable, so you
    can call them from the command line, too.

    What if I don't want to put all my shovels in one tool shed?
    What if I just want to leave some scattered about?

    What if I want a shovel in the garden.
    Another by the compost.
    Yet another at the chicken coop?

    Why must I put all my shovels in one spot because you do things that way?

    Create a shortcut on your
    desktop. Have it load "C:\Program Files\Mozilla Firefox\firefox.exe"
    (or whatever path you like where an instance is found - and works from
    there) along with any command-line arguments. Then move it to your
    common batch folder (which has been included in PATH). Name the
    shortcut "fx12". In a command shell, run fx12.lnk (you have to include
    the extension). Voila, Firefox opens from the shortcut stored in a
    PATH'ed location.

    Nobody ever said that you couldn't dig a trench with different shovels.
    But can you find a single negative to having two shovels?

    Choose the one you want.
    Don't blame the other shovel because you didn't choose it.


    HKLM\Microsoft\Windows\CurrentVersion\App Paths\f4.exe
    @Default=C:\different-path\firefox.exe

    That can run afoul of the program using its install-time defined
    AppPaths subkey, like when it runs an external updater that expects run
    the executable from the same path as where the updater was stored. Lots
    of programs expect pathing to be consistent which means the user hasn't fucked it up. That is why I said AppPaths (and Applications) are really
    for installer-defined and program-managed pathing.

    You're at the point that you bought too many Monty Python arguments, where,
    in the spirit of Monty Python, my rebuttal is that I always set up Firefox
    to disable updates using this simple registry file.

    Windows Registry Editor Version 5.00

    [HKEY_LOCAL_MACHINE\Software\Policies\Mozilla\Firefox]
    "DisableAppUpdate"=dword:00000001

    BTW, I could easily set up an App Paths subkey to "disable" and "enable"
    the updates at the typing of a single command, while you'd probably set
    that up using the %path% which is fine.

    I'm not sure why you are arguing against having two types of shovel, each
    of which has their own pros and cons, and both of which can do any job.

    We can argue more example and scenarios, but it comes down to which is
    easier to manage. For you, you like AppPaths (and might now explore the Applications registry key, too). For others, they see no need to putz
    around in the registry for what they similarly accomplish with PATH, shortcuts, batch scripts, or other more "normal" methods of defining executable paths and arguments.

    Exactly the same argument applies to sandpaper grit size.

    I knew about AppPaths many years ago. Despite its possible convenience,
    I didn't see it as a plausible means to management pathing from my perspective, and I wasn't going to fuck with how installers, updaters,
    or programs were expecting those keys to be defined.

    I'm not sure why you are arguing against having two types of shovel, each
    of which has their own pros and cons, and both of which can do any job.

    It's clear you don't like shovels with wooden handles because you favor
    shovels with fiberglass handles, but is it really such a bad thing to have
    one of each where you can use the shovel that best suits your personality.

    If you can find a single bad thing about having the choice of both, please
    let me know as some things are more efficient with one than with the other because they essentially do the same things different.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From VanguardLH@21:1/5 to Freethinker on Wed Mar 22 03:35:49 2023
    XPost: alt.comp.microsoft.windows

    Freethinker <freethinker@mymail.com> wrote:

    On 21.03.23 19:38, VanguardLH wrote:
    You can do all that using the %path% as Herbert suggested but unless
    you put all your executables and shortcuts and batch files into the
    same folder, it will mess up %path% won't it?

    I have a C:\Batch folder containing all my .bat files.

    What if you maintain batch files on external drives and in multiple locations? Do you really add a billion entries to the %path% in that case?

    An extreme exaggeration. You don't have billions of executables on your computer. You don't specify billions of additions to PATH, one for each location of an executable even if they were in separate folders. You
    add to the PATH those paths for which you don't want to specify in .bat
    files *all* of which are in *one* folder for all .bat files.

    If you were editing the PATH envvar for billions of entries, you'd also
    be editing billions of entries under AppPaths. Yours is a bad argument.

    I realize what you're doing is putting everything into a single
    folder, but that's a limitation that you don't even think about for
    the App Paths tool.

    No, the limitation with AppPaths is you have to specify a subkey for
    EVERY program, and you have to be familiar with all the subkeys under
    the AppPaths/<prog> subkey. My programs are NOT all in the same folder,
    and which you notably omitted in your comment. I use the hierarchical structure of the file system to put each program into its own folder.
    If one is especially important, I can add it to PATH. As I stated, I
    only add 3 entries to PATH: C:\Batch, C:\Programs\SysInternals, and C:\Programs\Nirsoft. Programs that use an installer manage their own
    AppPaths entries. Programs that I merely copy or unzip (they don't use
    an installer) all go under a subfolder under C:\Programs, but I don't
    add every subfolder that ever gets created under there. Batch files
    work great to specify where to find programs that would normally not be
    found in the working directory, PATH, or AppPaths.

    Mine is not a limitation. It is *organization*. Having all exe paths
    solely specified in the AppPaths registry entry is like those boobs that
    pile every entry in their Start menu in a 1-level hierarchy: a mess. I
    also use subfolders in the Start menu to organize those entries, and I
    even organize the Start menu tiles into groups.

    It's two different ways to do the same thing, which both will do.

    It's like having two grinding wheels or two different grits of sandpaper.
    Why would you argue against having the right tool for the job at hand?

    I am arguing your method isn't better than mine, or of others. You want
    to extol AppPaths, but it isn't the panacea you proclaim. Just another
    method to a similar end.

    For some
    programs, they're installed or copied under C:\Programs but in
    subfolders for each program. I have added the subfolders to PATH for
    SysInternals and Nirsoft, but the rest I don't use that often, so I just
    use .bat files to find them which, of course, are in my C:\Batch folder.

    According to Microsoft, this is precisely why they created the App Paths subkey in Windows XP.

    What you can specify is limited compared to what you can script inside a
    batch file. Just how, in an AppPaths entry for a program, are you going
    to perform any setup before loading a program, do cleanup after exiting
    the file, or do anything other than simply specify the executable?

    For example, I use a stream capture program called Jaksta, but I don't
    like how it leaves behind on its exit a bunch of data that gets reused
    in the next session of Jaksta. It's for recovery, like a resume
    function, but I don't want it. I can run commands after the program
    exits in a batch file to cleanup after its exit (make it pristine
    again). Can't do that with an AppPaths entry. There are programs that
    when you exit really don't exit. Their window disappears, but their
    process remains. In a batch script, I can kill the process to ensure it
    really does unload when I "exit" the program. I have batch files that
    edit the registry either by using a .reg file or specifying the actual
    keys using reg.exe. Requires several regedit lines, and perhaps
    multiple executes of reg.exe which cannot be specified in a single open
    command subkey under a progkey under AppPaths. What if you want to
    flush the local DNS cache? Requires more than one command to do
    properly. Perhaps you can specify a .bat file in an AppPaths subkey,
    but why? You must already have the batch file, and it's in your
    C:\Batch folder which is included in PATH.

    They're two tools that will do the same job.
    One is suited to some jobs better than the other.

    Nothing you can do in AppPaths that can't be done in a .bat file.
    Lots of things you cannot do with an AppPaths entry that you can do in a
    .bat file.

    I consider the AppPaths registry entry for use by installers of
    programs. That's really meant for their management. AppPaths is
    intended for app registration.

    https://learn.microsoft.com/en-us/windows/win32/shell/app-registration

    I'm sure it is.
    So what?

    "What" is you don't know how the OS or apps will be using AppPaths, and
    you're putzing around in there.

    You are also unaware (despite giving you an article mentioning it) that
    the maximum string length for an open command in an AppPaths progname
    entry is MAX_PATH * 2. Probably the same for the shell when running a
    batch inside it; however, rather than list too many arguments on the
    command line, you could slice the commands apart in a batch. There are programs that are recursive, and their command line can get very long.

    As with the AppPaths registry key, there is an Applications registry
    key for the same purpose. Apparently more app info can be stored
    under the Applications/<prognam> keys than for AppPaths/<progname>.
    So, now you have 2 keys, and all their subkeys, to track,
    synchronize, backup to .reg file, and import.

    Yes. But you're arguing that you shouldn't have a Dremel tool because
    it can handle all sizes of bits, even if you only really use the
    cutting wheel.

    Another bad analogy. I mentioned that you have two chuck sizes to
    manage instead of one.

    You can't blame the Dremel tool because it does more than you need it to
    do. The way I use the App Paths is with just the "@Default" but if you want to use it with different bits (as you're describing) then that's not a negative.

    Why are you arguing about the 2nd registry key (Applications)? I
    mentioned it because it is yet another means of doing what AppPaths
    does, so you have to manage 2 keys, not 1.

    If you edit the AppPaths and Applications subkeys, you could end up
    fucking up what the installed added, and what the program expects.

    That's kind of like saying that a kitchen should only have forks because if you use chopsticks, you could end up fucking up the plate of spaghetti.

    You're not the one programming the spaghetti as to what is allowed for
    its eating utensil.

    AppPaths and Applications registry keys only specify a single path to
    the executable, not 3 selections for multiple paths.

    If you are creating the AppPaths subkeys for multiple but separate
    instances of Firefox, like a subkey named firefox.exe, another named
    firefox2.exe, and another for firefox3.exe, why can't you do that using
    shortcuts, or .bat files in your batch folder added to PATH?

    What is your reason for not wanting a variety of shovels to use when you
    want to use them, where all shovels end up doing the same thing, don't
    they?

    Another bad analogy. Instead you are calling the same shovel by
    multiple names, but the shovel is still a shovel.

    The App Path is useful if you want to open something up without having
    to create a shortcut (although the App Path can run a shortcut also).

    Edit the registry to add a subkey under AppPaths, add all the subkeys
    under that subkey for command->open, etc. Or define a shortcut. I
    don't see one is easier than the other. In fact, to get all the
    sub-subkeys correct under an AppPath/<progname> key is more difficult.

    I'm not sure why you're arguing repeatedly against having multiple shovels. Don't use the Edging Shovel when you prefer to use the Trench Shovel.

    You wandered again. I said which incurs more difficulty in creating and editing and managing. You are still focused on wanting multiple aliases
    to the same program defined by AppPaths.

    Oh, by the way, all this registry key "stuff" is moot unless you are
    logged under a Windows admin-level account. Guess you've never created restricted accounts for users that you don't want fucking up the setup.
    None of the non-admin users can get into the registry. regedit.exe
    won't work for them. Double-clicking on a .reg file won't work. Also,
    just because the user happens to be the owner of a computer doesn't mean
    they log into an admin-level Windows account by default. Many users log
    into restricted user accounts to increase security. What a nuisance in
    having to logout and login to get into an admin-level account, and then
    logout and login again to get back to the safe restricted Windows
    account. With shortcuts or batch files, they don't get barred from
    creating and editing those.

    The subkey for <progname> is expected to match on the executable
    filename.

    That's just false.
    You think that.
    But it's false.

    It's a keyword.
    It can be anything.

    Not if one program expects to call another with a specific name with
    which it was coded. I'll give an example: games. Many games load a
    preloader program that then loads the game program. The preloader could
    be called anything in AppPaths, but the actual game program is expected
    by the preloader to have a specific name.

    It's OK if a shovel has a fiberglass handle instead of a hickory handle.

    Another bad analogy. Would you want to use a metal shovel to dig into
    an area of ground that has electrical wiring?

    So, you are not defining separate AppPaths subkeys with differing
    prognames, but creating aliases using AppPaths to point at the same
    program? Harken the DOSKEY command, or same-content .bat files
    executing the same scripts all residing in a folder added to PATH, or
    differently named shortcuts all pointing to the same program. Several
    ways to skin the same cat.

    Again, you may prefer to dig a trench using a pickax and a shovel while I might want to dig that same trench using just the shovel. Why do you care?

    Another bad analogy. You're just full of them. You are creating
    aliases in AppPaths, like firefox.exe, f1.exe, and f2.exe. You are
    using multiple names for the same program. A shovel by any name is
    still a shovel.

    What if I don't want to put all my shovels in one tool shed?
    What if I just want to leave some scattered about?

    Bad analogy again. Instead of a common folder for all batch files,
    you're using a common AppPaths registry key under which to store all
    your aliases. So, you're still putting all your shovels in one shed.

    You're at the point that you bought too many Monty Python arguments, where, in the spirit of Monty Python, my rebuttal is that I always set up Firefox
    to disable updates using this simple registry file.

    Windows Registry Editor Version 5.00

    [HKEY_LOCAL_MACHINE\Software\Policies\Mozilla\Firefox]
    "DisableAppUpdate"=dword:00000001

    Now you're wandering off again talking about something other than
    AppPaths. Plus your analogies suck, especially since you attempt to use
    them to belie what is really happening.

    BTW, I could easily set up an App Paths subkey to "disable" and
    "enable" the updates at the typing of a single command, while you'd
    probably set that up using the %path% which is fine.

    No, I just disable the Mozilla Maintenance service. However, Mozilla is
    rude. If I visit menu -> Help -> About, Firefox will look for and
    install updates although all I wanted was the current About info. So,
    after disabling the service, don't visit Help -> About.

    I'm not sure why you are arguing against having two types of shovel, each
    of which has their own pros and cons, and both of which can do any job.

    That's your bad interpreation of my statements. You want to use a bad
    analogy to counter argue.

    The argument isn't about shovels, or policies (in the registry), or
    anything other than using AppPaths (and Applications) in the registry.
    Stay on topic. Your argument, so far, is that using AppPaths is better.
    Sorry, I don't see that. In fact, the more you're in the registry, the
    more likely you'll fuck it up. With writing shortcuts or batch files, I
    don't have to use them, or can fix them, and not risk corrupting the
    registry making the OS unusable or unbootable. The registry is not for
    boobs, or even casual users. They should stay out of there unless they
    have take precautions, like saving an image backup of the OS
    partition(s). Do you save an image backup to restore the OS back to the
    exact same state as before before every registry edit should you do
    something untoward in the registry? You might be perfect, but I and
    others have occasionally thought what we were looking at is where the
    computer is making changes only to find out we changed something else.
    When you perform a delete in the registry, there is no undo function.
    Say you thought you were pointing at AppPaths, and wanted to delete a
    subkey for a program. Instead the AppPaths entry was hightlighted when
    you hit Delete. Poof, there goes all those AppPaths entries. There is
    no undo. If you didn't backup beforehand, those entries are toast
    forever. That's one explosive shovel.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Herbert Kleebauer@21:1/5 to Freethinker on Wed Mar 22 10:27:10 2023
    XPost: alt.comp.microsoft.windows

    On 22.03.2023 05:51, Freethinker wrote:

    An example is Microsoft didn't build in a way to open up any desired document just by typing a single word like "family" to open "family.xls".

    Family.bat in the PATH-directory with the content:

    start family.xls

    You make an entry in the registry, I make an entry in the
    PATH-directory.

    I think you see differences where no differences are. It's
    just a matter of preferences where you want to store the
    information.

    The registry is a global data base which is manipulated
    by many programs. My PATH-directory is fully under my control,
    no other program makes any changes nor can my changes affect
    other software. Functionally it is something like a second
    private registry which can't interfere with the rest of the
    system. I can transfer it to an other PC without the need to
    first extract it from the global registry and then import
    it on the new PC.

    I also install, if possible, portable versions of software
    which don't make any entries in the registry but store all
    information in ini files in the program directory. This way
    you can easily copy it to an other PC (without an installation)
    or directly use it from an USB stick on any PC.

    You can also store all your writings in a single global
    .doc file in the Windows directory and just specify the
    pages to print if you want to print one of the letters.
    I prefer to have a separate file for each letter in
    a user defined directory.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Freethinker@21:1/5 to VanguardLH on Wed Mar 22 17:08:03 2023
    XPost: alt.comp.microsoft.windows

    On 22.03.23 10:35, VanguardLH wrote:
    If you were editing the PATH envvar for billions of entries, you'd also
    be editing billions of entries under AppPaths. Yours is a bad argument.

    I have to nod my head in agreement where in the case of the %path% you can
    put a billion executable files in one path but App Paths takes a billion entries instead (you can get fancy to cut that number down, but I don't).

    Also I have to assume you're aware of pinned shortcuts, although we all
    know many people have a desktop full of them, I assume yours is clean so
    that only a small number of shortcuts are pinned to your taskbar currently.

    In addition, I have to assume you're aware of menus, which can either be
    the Microsoft ones (which I don't normally use because they get attacked by every program that is installed) and pinned menus (which I sometimes use).

    I bring this up because there are many ways to run a program in Windows.
    You use the tool that is best suited for your needs, where having them all
    is not as bad as you're making it out to be. Use a pick when you want a
    pick axe, and use a shovel when you want a shovel.

    Both can do the same job.
    Each does the same job different.

    I realize what you're doing is putting everything into a single
    folder, but that's a limitation that you don't even think about for
    the App Paths tool.

    No, the limitation with AppPaths is you have to specify a subkey for
    EVERY program, and you have to be familiar with all the subkeys under
    the AppPaths/<prog> subkey.

    App Paths is no more complex than the %path% is and you can save it once
    inside the registry as a Favorite so you don't have to look for it again.

    I don't even know what the other sub keys do other than the main one.

    Mine is not a limitation. It is *organization*.

    I have to nod my head in agreement as I never said anything was wrong with
    the %path% just like I never said a shovel or pick axe is bad.

    Each does the same job different.

    Having all exe paths
    solely specified in the AppPaths registry entry is like those boobs that
    pile every entry in their Start menu in a 1-level hierarchy: a mess. I
    also use subfolders in the Start menu to organize those entries, and I
    even organize the Start menu tiles into groups.

    Ah. I see where the issue is. You understood me incorrectly. Very
    incorrectly if you think "all my executables" go into the App Paths.

    For me, only the stuff I want to put in the App Paths go into the App Paths
    sub key. Mostly those I wrote myself. Mostly files I use a lot. Mostly directories I use a lot.

    If something is already in the %path%, I don't bother putting an App Paths
    sub key for it unless I use it so much that it's more efficient to use the
    App Paths but that's what the Windows menus are for.

    So my App Paths is mostly just for "my things", and not for everything.

    I am arguing your method isn't better than mine, or of others. You want
    to extol AppPaths, but it isn't the panacea you proclaim. Just another method to a similar end.

    It's like the difference between a pick and a shovel.
    Use the one you like for the job best suited.

    Having both has no drawbacks that I can think of.
    Can you?

    According to Microsoft, this is precisely why they created the App Paths
    subkey in Windows XP.

    What you can specify is limited compared to what you can script inside a batch file. Just how, in an AppPaths entry for a program, are you going
    to perform any setup before loading a program, do cleanup after exiting
    the file, or do anything other than simply specify the executable?

    First off, having both a pick and a shovel isn't as bad as you make it out
    to be if you can't find anything wrong with the App Paths subkey other than
    to say you like the shovel better than the pick for all jobs possible.

    Each does a job and you use the one that is best suited for your needs.
    If you have a phone list, for example, you can type "phone" and up it
    comes.

    I'm sure you can put a batch file in your path but then you need to be on
    the command line, so you first have to type cmd and then type phone.

    Isn't it double the steps of App Paths to use the %path% to bring up your
    phone list?

    For example, I use a stream capture program called Jaksta, but I don't
    like how it leaves behind on its exit a bunch of data that gets reused
    in the next session of Jaksta. It's for recovery, like a resume
    function, but I don't want it. I can run commands after the program
    exits in a batch file to cleanup after its exit (make it pristine
    again). Can't do that with an AppPaths entry.

    How do you *start* that Jaksta program?
    I'll bet it's more steps than starting it using the App Paths sub key.

    First you have to open a command window.
    Then you have to run the command.

    Shortcuts & menus don't count because you can do that with App Paths also.
    You probably start Jaksta from the command line, right?

    That's *double* the steps already, than using the App Paths key.

    To run your run-and-clean program in the App Paths, you type "runjak" and
    that does everything in a single step.

    I suspect Apps Paths is half the steps you currently use with %path%.
    If you're confused why I say that, just ask and I will explain it to you.

    There are programs that
    when you exit really don't exit. Their window disappears, but their
    process remains. In a batch script, I can kill the process to ensure it really does unload when I "exit" the program. I have batch files that
    edit the registry either by using a .reg file or specifying the actual
    keys using reg.exe. Requires several regedit lines, and perhaps
    multiple executes of reg.exe which cannot be specified in a single open command subkey under a progkey under AppPaths. What if you want to
    flush the local DNS cache? Requires more than one command to do
    properly. Perhaps you can specify a .bat file in an AppPaths subkey,
    but why? You must already have the batch file, and it's in your
    C:\Batch folder which is included in PATH.

    The method you're using requires two steps to do what the App Paths key
    does in one step if I understand what you're doing that is.

    But two steps isn't bad. It's just that one step is probably better.
    Just like a pick axe isn't bad. But sometimes a shovel is better.


    They're two tools that will do the same job.
    One is suited to some jobs better than the other.

    Nothing you can do in AppPaths that can't be done in a .bat file.

    That's not true. It means you don't understand App Paths.
    You really need to understand it before you say what you just said.

    The App Paths subkey definitely does things the %path% doesn't do.
    In fact, that's why it exists.

    For you to NOT understand that is pretty problematic.
    It means you purchased too many arguments this week.

    Donate those spurious arguments to the Goodwill store instead.
    At least you can claim the tax deduction for your expense.

    Lots of things you cannot do with an AppPaths entry that you can do in a
    .bat file.

    If you don't know that I said that already, then you're not reading what I wrote, and, worse, if you don't know there are things that each does which
    the other does NOT do, then it means you're arguing for arguments sake
    alone.

    Each does the same job.
    Different.

    There are jobs suited for the App Paths subkey and there are jobs suited
    for the %path% just like there are jobs suited for a pick axe and there are jobs suited for a shovel. Having both has no drawbacks that you've listed.

    https://learn.microsoft.com/en-us/windows/win32/shell/app-registration

    I'm sure it is.
    So what?

    "What" is you don't know how the OS or apps will be using AppPaths, and you're putzing around in there.

    I'm not even going to respond to that given you clearly don't understand
    how teh App Paths subkey works (see above where it's clear you don't).

    I think you need to use your extra arguments that you purchased on sale somewhere else because having a pick axe and a shovel is better than having only one of them because they each can do the same job but they do it different.

    You are also unaware (despite giving you an article mentioning it) that
    the maximum string length for an open command in an AppPaths progname
    entry is MAX_PATH * 2. Probably the same for the shell when running a
    batch inside it; however, rather than list too many arguments on the
    command line, you could slice the commands apart in a batch. There are programs that are recursive, and their command line can get very long.

    You're grasping for ways to find that the App Paths has limitations but you don't even notice that the %path% also has limitations.

    They each have limitations.
    Each has different limitations.

    A pick axe has limitations too. Just as a shovel does.
    Your argument that people can only use one and not the other is ludicrous.

    Yes. But you're arguing that you shouldn't have a Dremel tool because
    it can handle all sizes of bits, even if you only really use the
    cutting wheel.

    Another bad analogy. I mentioned that you have two chuck sizes to
    manage instead of one.

    I already know you don't know how the App Paths sub key works as you don't. Then I know you haven't noticed any of the limitations of the %path%
    either.

    Did you buy too many arguments this week?

    I don't mind a comparison of two methods just like I don't mind it if you
    said a pick axe does hole digging different than a shovel does it, but you
    are saying, in effect, nobody should ever use a shovel because you prefer
    the pick axe.

    And that's just bad advice.

    My advice is to use a pick axe where it's suited.
    And use the shovel where it's suited.

    There is nothing bad about having both at your disposal.

    You can't blame the Dremel tool because it does more than you need it to
    do. The way I use the App Paths is with just the "@Default" but if you want >> to use it with different bits (as you're describing) then that's not a
    negative.

    Why are you arguing about the 2nd registry key (Applications)? I
    mentioned it because it is yet another means of doing what AppPaths
    does, so you have to manage 2 keys, not 1.

    Maybe I misunderstood. I thought you were arguing about a sub sub key to
    App Paths (which I said I don't even bother to deal with).

    If you mean a DIFFERENT registry key altogether, then that's my bad for not realizing that. You have so many meaningless arguments, I didn't spend much time on looking at that. If I misunderstood, you can make your case again without cluttering it up with all your meaningless arguments against the
    App Paths sub key.

    You need to focus on what is important.

    If you are saying you found a rake, then that is a good thing when used in addition to a shovel and a pick axe.

    So now we have a pick axe, a shovel and a rake.
    That's fine.

    Use the tool that suits the job best.
    But it's not bad to have all three tools when you need to move soil around.

    If you edit the AppPaths and Applications subkeys, you could end up
    fucking up what the installed added, and what the program expects.

    That's kind of like saying that a kitchen should only have forks because if >> you use chopsticks, you could end up fucking up the plate of spaghetti.

    You're not the one programming the spaghetti as to what is allowed for
    its eating utensil.

    Call me confused.

    But almost certainly I didn't understand your complaint against
    "Applications" (whatever that is - which I'll refer to as a rake).

    What is your reason for not wanting a variety of shovels to use when you
    want to use them, where all shovels end up doing the same thing, don't
    they?

    Another bad analogy. Instead you are calling the same shovel by
    multiple names, but the shovel is still a shovel.

    I think what we have here is you use a pick axe to do every soil digging
    job and I use a pick axe and a shovel, and, then, for some reason unknown
    to me, you brought up the problems that you have with the rake.

    What's so bad about having all three soil managing tools?

    Use the pick axe where it fits best.
    Use the shovel where it fits best.
    Use the rake where it fits best.

    Having all three is not a bad thing.
    Why do you make it out to be?

    I'm not sure why you're arguing repeatedly against having multiple shovels. >> Don't use the Edging Shovel when you prefer to use the Trench Shovel.

    You wandered again. I said which incurs more difficulty in creating and editing and managing. You are still focused on wanting multiple aliases
    to the same program defined by AppPaths.

    That was just an example of what App Paths easily does that %path% doesn't
    as easily do. Don't shoot at the analogy without understanding the basics.

    The App Paths is a shovel.
    The %path% is a pick axe.
    The Applications (I think) is a rake.

    They all can do the same job of managing soil.

    There's nothing wrong with having all three.
    Use the one that fits the need best.

    Oh, by the way, all this registry key "stuff" is moot unless you are
    logged under a Windows admin-level account.

    I'm not sure why you say that as I've been using Windows since Windows 95
    and I have no problem with Windows 10 as a use (with administrator
    privileges) but I don't use the PC any other way and neither do most
    people.

    If you're dealing with a company computer, don't mess with the registry.

    Guess you've never created
    restricted accounts for users that you don't want fucking up the setup.

    I'm not advocating messing with the registry if you don't own the computer.

    None of the non-admin users can get into the registry. regedit.exe
    won't work for them. Double-clicking on a .reg file won't work. Also,
    just because the user happens to be the owner of a computer doesn't mean
    they log into an admin-level Windows account by default. Many users log
    into restricted user accounts to increase security. What a nuisance in having to logout and login to get into an admin-level account, and then logout and login again to get back to the safe restricted Windows
    account. With shortcuts or batch files, they don't get barred from
    creating and editing those.

    I'm not even considering a computer that you don't own yourself.

    It's a keyword.
    It can be anything.

    Not if one program expects to call another with a specific name with
    which it was coded. I'll give an example: games. Many games load a preloader program that then loads the game program. The preloader could
    be called anything in AppPaths, but the actual game program is expected
    by the preloader to have a specific name.

    Use a shovel where a shovel works best.
    Use a pick axe where a pick axe works best.

    Telling everyone to use a shovel in all situations is not good advice.

    It's OK if a shovel has a fiberglass handle instead of a hickory handle.

    Another bad analogy. Would you want to use a metal shovel to dig into
    an area of ground that has electrical wiring?

    You can defeat the analogy but all you're really saying is you think there
    is only one way to execute a program - which is just plain old bad advice.

    Again, you may prefer to dig a trench using a pickax and a shovel while I
    might want to dig that same trench using just the shovel. Why do you care?

    Another bad analogy. You're just full of them.

    I'm sticking to shovels and pick axes for now as I'm tired of giving you analogies that there are two methods to do the same thing, each of which
    has pros and cons, and each of which, in the end, does the job.

    What you're claiming is there is only one way and that's your way.
    What I'm informing people of is there is another way.

    Your argument is ludicrous.
    Mine is sensible.

    At least the way I see it (you may disagree).

    You are creating
    aliases in AppPaths, like firefox.exe, f1.exe, and f2.exe. You are
    using multiple names for the same program. A shovel by any name is
    still a shovel.

    That was clearly an example. It was just explaining that there are things
    each tool does that the other doesn't do as easily. That was all.

    Your argument is ludicrous that there is only one way to do things, and
    that one way does everything better.

    It's just ludicrous.

    You purchased too many arguments this week. Return them. Get a refund.
    Or donate them to the Goodwill and at least benefit from the deduction.

    What if I don't want to put all my shovels in one tool shed?
    What if I just want to leave some scattered about?

    Bad analogy again. Instead of a common folder for all batch files,
    you're using a common AppPaths registry key under which to store all
    your aliases. So, you're still putting all your shovels in one shed.

    You're arguing that the only way to move soil is with a pick axe.
    It's ludicrous your argument.

    Plus your analogies suck, especially since you attempt to use
    them to belie what is really happening.

    You can't get much simpler than a pick axe, shovel and rake.
    They all manage soil.
    Different.

    BTW, I could easily set up an App Paths subkey to "disable" and
    "enable" the updates at the typing of a single command, while you'd
    probably set that up using the %path% which is fine.

    No, I just disable the Mozilla Maintenance service. However, Mozilla is rude. If I visit menu -> Help -> About, Firefox will look for and
    install updates although all I wanted was the current About info. So,
    after disabling the service, don't visit Help -> About.

    It was just an example.
    If you don't want to use a rake, you can use a leaf blower instead.
    Both do the job but each is different.

    I'm not sure why you are arguing against having two types of shovel, each
    of which has their own pros and cons, and both of which can do any job.

    That's your bad interpreation of my statements. You want to use a bad analogy to counter argue.

    My point of view is simply that each method has pros and cons.
    Use the method that fits your needs.
    There is no disadvantage to having both methods at your disposal.
    If there were, you would have named it and you have not.

    So unless you find something wrong with Microsoft having implemented the
    App Paths key to get around issues with the %path%, then you should stop arguing that Microsoft doesn't know what they're doing.

    All I'm doing is letting you know about it.
    I didn't design it.

    Microsoft designed it.
    If you want it removed from Windows, then take that up with Redmond.

    The argument isn't about shovels, or policies (in the registry), or
    anything other than using AppPaths (and Applications) in the registry.
    Stay on topic.

    I've been as consistent as consistent can be.
    Microsoft designed both tools which each have pros and cons.
    Use the one you want.

    Your argument, so far, is that using AppPaths is better.

    Where did I ever say that?
    It's fewer steps in *some* situations.

    So in *those* situations, it's better to use the shovel.
    In *other* situations, it's better to use the pick axe.

    Use the tool that fits the situation.
    Your argument against that advice is ludicrous.

    Sorry, I don't see that. In fact, the more you're in the registry, the
    more likely you'll fuck it up.

    You need to take up your grievances with Microsoft, not with me.

    With writing shortcuts or batch files, I
    don't have to use them, or can fix them, and not risk corrupting the
    registry making the OS unusable or unbootable. The registry is not for boobs, or even casual users.

    I can't even count the many times over the decades that I fixed an issue by editing the registry. If you don't want to fix anything, you don't need it.

    They should stay out of there unless they
    have take precautions, like saving an image backup of the OS
    partition(s).

    Why are you dumping all your grievances about Microsoft on me?
    Your entire argument is that you don't like the registry?

    Do you save an image backup to restore the OS back to the
    exact same state as before before every registry edit should you do
    something untoward in the registry?

    Never. In Win95/XP days I might have backed up the registry before editing
    it, but it's been probably a decade or more since I've backed it up.

    I don't even make restore points anymore.
    Windows is much more stable (in my experience).

    I don't even install anti virus programs anymore.
    Windows of today is not your father's Oldsmobile.

    You might be perfect, but I and
    others have occasionally thought what we were looking at is where the computer is making changes only to find out we changed something else.

    I must agree with you that I've made so many tweaks to any given Windows
    system that I can't even remember them. I just make them on each new
    computer (which doesn't happen that often) when I need to do it again.

    I wish I remembered how I put certain programs in the right click context
    menu because paintshoppro messes them up and kills them for example.

    When you perform a delete in the registry, there is no undo function.

    I haven't corrupted a registry in two decades.

    Say you thought you were pointing at AppPaths, and wanted to delete a
    subkey for a program. Instead the AppPaths entry was hightlighted when
    you hit Delete. Poof, there goes all those AppPaths entries. There is
    no undo. If you didn't backup beforehand, those entries are toast
    forever. That's one explosive shovel.

    Here is the final result as I see your arguments.

    You are aware that Microsoft created the App Paths subkey to get over some
    of the problems that were in the %path% and you still want to use the
    %path% for everything which is fine by me as long as you're *aware* of what
    the advantages and disadvantages of the App Paths subkey are.

    It's your choice to use the %path% for everything.

    But don't denigrate my choice of using the App Paths where it fits best,
    and then using the %path% where it fits best, as I use what works best for
    the situation that I have at hand and you use what works best for the
    situation that you have at hand.

    For example, I have a pick axe, a shovel, a rake and a leaf blower in my
    tool shed & I use whichever one fits the job that it is which I need to do.

    You use the pick axe for everything and that's your right to do that.
    Use whatever works for you.

    I just want others to know about the App Paths subkey.
    And I've accomplished that.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Freethinker@21:1/5 to Herbert Kleebauer on Wed Mar 22 17:33:41 2023
    XPost: alt.comp.microsoft.windows

    On 22.03.23 11:27, Herbert Kleebauer wrote:
    An example is Microsoft didn't build in a way to open up any desired document just by typing a single word like "family" to open "family.xls".

    Family.bat in the PATH-directory with the content:
    start family.xls
    You make an entry in the registry, I make an entry in the
    PATH-directory.

    As I explained to VanguardLH, apparently Microsoft designed the %path%
    first, and then, when problems arose, they added the App Paths somewhere
    around the Windows XP time frame, which is when I found out about it.

    They both do the same thing different.
    Each has pros. Each has cons.

    For example, I got hooked on the App Pahts because in those XP days you
    could just make the App Paths subkey a folder name, and it would work. That broke between XP and Windows 10 so now you have to add a shortcut or batch
    file call that in the App Paths instead.

    I think you see differences where no differences are.

    Actually you're missing the differences I think so we should concentrate on
    why you don't see what I see and perhaps why I may not see what you see.

    I'll give you the same mano a mano challenge that I gave Vanguard.
    Tell me HOW many steps it is for you to execute the family.xls in practice.
    I suspect it's _half_ the number of steps to do the same thing with App
    Paths.

    Half.

    Now, of course, I suspect your method is two steps. So half is only one.
    But it's still half the number of steps to do what you do with App Paths
    than with the %path%.

    Note that we're ignoring that you can boot to a command line but most
    people do not. And we're ignoring you can have desktop or task bar
    shortcuts. And we're ignoring that you can put the command in a menu.

    It's
    just a matter of preferences where you want to store the
    information.

    Yes. No.
    Yes that both do the same job different.
    But I think your method is twice the number of physical steps in use.

    Just let me know what steps you take assuming your PC just booted up.
    All you have is your desktop like most people have after the PC booted up.

    I wager that your method (albeit easy) is *twice* the steps of the App
    Paths method (in practice).

    The registry is a global data base which is manipulated
    by many programs. My PATH-directory is fully under my control,
    no other program makes any changes nor can my changes affect
    other software. Functionally it is something like a second
    private registry which can't interfere with the rest of the
    system. I can transfer it to an other PC without the need to
    first extract it from the global registry and then import
    it on the new PC.

    VanguardLH brought up that he doesn't like the way Microsoft designed the registry also. I edit the registry probably, on average, once a week but sometimes more and sometimes less. It's been more than a decade probably
    since I backed one up. I haven't corrupted anything in probably a decade.

    You can't tell me you've never edited the registry.

    I also install, if possible, portable versions of software
    which don't make any entries in the registry but store all
    information in ini files in the program directory. This way
    you can easily copy it to an other PC (without an installation)
    or directly use it from an USB stick on any PC.

    I'm always wondering what choice to make when Irfanview asks that question.
    If you can give me advice on that, it would be helpful because I just take
    the default but maybe there's a reason for the ini file instead of the path when Irfanview installs?

    Do you know what I am asking about?
    What's your advice when Irfanview asks that question?

    You can also store all your writings in a single global
    .doc file in the Windows directory and just specify the
    pages to print if you want to print one of the letters.
    I prefer to have a separate file for each letter in
    a user defined directory.

    There's nothing wrong with using the %path% for everything.
    Even though you're executing *twice* the number of steps that I am to do
    simple things. Because twice times one is only two.

    You're always doing in two steps what I always do in one step.
    I'm not chastising you for that.

    I'm just saying there are multiple ways to do things, where each way has
    its own pros and cons and I only want you to be *aware* of them.

    If you don't know why I say your method is two steps, then just let me know
    how you execute your method at a cold boot which means what you have in
    front of you is what most people have in front of them, which is the
    desktop and nothing else but what's on a typical default Windows desktop
    other than your personal shortcuts in your taskbar and your menus and your desktop shortcuts (you know, what most people have on their desktops).

    I'll wager your method using the %path% is twice the number of steps than
    the App Paths method to bring up that family.xls spreadsheet.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Herbert Kleebauer@21:1/5 to Freethinker on Wed Mar 22 17:30:52 2023
    XPost: alt.comp.microsoft.windows

    On 22.03.2023 16:33, Freethinker wrote:

    An example is Microsoft didn't build in a way to open up any desired
    document just by typing a single word like "family" to open "family.xls".

    Family.bat in the PATH-directory with the content:
    start family.xls
    You make an entry in the registry, I make an entry in the
    PATH-directory.


    I'll give you the same mano a mano challenge that I gave Vanguard.
    Tell me HOW many steps it is for you to execute the family.xls in practice. I suspect it's _half_ the number of steps to do the same thing with App Paths.

    Half.

    I don't understand what you want to say. Didn't you say, you use

    <WIN>-r family


    You would exactly use the same command if you hadn't made the registry
    entry but put the above batch in the PATH-directory. There is no
    difference in the behavior, but only in the place where the information
    is stored.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Freethinker@21:1/5 to Herbert Kleebauer on Wed Mar 22 20:46:32 2023
    XPost: alt.comp.microsoft.windows

    On 22.03.23 16:30, Herbert Kleebauer wrote:
    I don't understand what you want to say. Didn't you say, you use

    <WIN>-r family

    You would exactly use the same command if you hadn't made the registry
    entry but put the above batch in the PATH-directory. There is no
    difference in the behavior, but only in the place where the information
    is stored.

    You're right!
    I was mistaken.

    It's the same number of steps either way.

    I just tested it by creating test.bat containing this one line.
    %comspec% /k echo hello
    I put test.bat into a directory that was in my %path%.

    Then I clicked the Win+R icon which is always pinned to my taskbar.
    And I typed "test" and then I hit the Enter key.

    It works.
    You're right.

    Both methods are the same number of steps!
    One.

    I had thought you needed to bring up a command window first.
    But the Run icon respects the %path% environment variable.

    I then left my "test" App Paths sub key in the form below.
    c:\path\family.xls

    In that case, the App Paths test.exe won out over the %path%\test.bat file.

    So Windows first checks the App Paths, and *then* it consults the %path%. That's useful in & of itself to override %path% on a case-by-case basis.

    Good to know.
    Thanks.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Herbert Kleebauer@21:1/5 to Freethinker on Wed Mar 22 21:02:49 2023
    XPost: alt.comp.microsoft.windows

    On 22.03.2023 19:46, Freethinker wrote:

    In that case, the App Paths test.exe won out over the %path%\test.bat file.

    So Windows first checks the App Paths, and *then* it consults the %path%. That's useful in & of itself to override %path% on a case-by-case basis.

    test.exe wins against test.bat. Put a test.exe in your PATH-directory
    than you will know what wins, PATH or App Path.

    But I suppose, PATH will win:

    https://learn.microsoft.com/en-us/windows/win32/shell/app-registration

    The file is sought in the following locations:

    The current working directory.
    The Windows directory only (no subdirectories are searched).
    The Windows\System32 directory.
    Directories listed in the PATH environment variable.
    Recommended: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Freethinker@21:1/5 to Herbert Kleebauer on Thu Mar 23 02:50:30 2023
    XPost: alt.comp.microsoft.windows

    On 23.03.23 01:32, Herbert Kleebauer wrote:
    So Windows first checks the App Paths, and *then* it consults the %path%.
    That's useful in & of itself to override %path% on a case-by-case basis.

    test.exe wins against test.bat. Put a test.exe in your PATH-directory
    than you will know what wins, PATH or App Path.

    Are you telling me App Paths actually lost the race to a technicality? :=)

    I'm confused but I think it means we have to be a wee bit careful extension order when specifically testing the %path% with the App Paths subkey
    because with the App Paths, the ".exe" doesn't (usually) even exist, EXCEPT
    in the registry itself.

    In fact for most of the cases that I use the App Paths for (documents,
    folders, shortcuts, etc), the "thing" that the App Paths "text.exe" points
    to isn't an executable and the extension (for example *.lnk) isn't in the
    path extension shell environment variable which determines action order.

    For example, on my system, "echo %PATHEXT%" shows the action order to be
    .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC

    But I suppose, PATH will win:

    https://learn.microsoft.com/en-us/windows/win32/shell/app-registration

    Thank you for pointing that out again, as I noticed Microsoft says this.

    "When the ShellExecuteEx function is called with the name of an
    executable file in its lpFile parameter, there are several places
    where the function looks for the file."

    Where the next sentence tells us what Microsoft suggests apps use.

    "We recommend registering your application in the App Paths
    registry subkey. Doing so avoids the need for applications
    to modify the system PATH environment variable."

    This makes sense because otherwise our %path% could have as many entries as
    the number of programs we've installed, each of which added to %path%.

    The file is sought in the following locations:

    The current working directory.
    The Windows directory only (no subdirectories are searched).
    The Windows\System32 directory.
    Directories listed in the PATH environment variable.
    Recommended: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths

    I see that the LAST place Microsoft looks is App Paths (even as Microsoft recommends developers use the App Paths subkey instead of the %path%),
    so maybe I made a mistake when I had tested the executable order perhaps?

    Let me try a different test anyone can reproduce to see what happens.
    echo %path%
    Put the one-line "test.bat" in the %path%

    test.bat (which consists of one line)
    %comspec% /k echo hello

    Put this one-line "text.exe" subkey into the App Paths.
    HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\test.exe
    @Default=osk

    When I type "test" into the run box, the App Paths "osk" wins over %path%.

    It's only after I rename the App Paths "test.exe" to something other than "test" that the %path% wins out over my App Paths in that specific test.

    Is it because of the %PATHEXT% ?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From VanguardLH@21:1/5 to Freethinker on Thu Mar 23 02:18:10 2023
    XPost: alt.comp.microsoft.windows

    Freethinker <freethinker@mymail.com> wrote:

    Also I have to assume you're aware of pinned shortcuts, although we
    all know many people have a desktop full of them, I assume yours is
    clean so that only a small number of shortcuts are pinned to your
    taskbar currently.

    I'm a bit of a neat freak. I don't like messes. That means not having
    1 tier to the Start menu, but organized in folders for category of
    programs, and subfolders under there for each program. I've seen users scanning their eyes up and down in a long Start menu trying to find an
    entry. There is now a search (just start typing when the Start menu is display) but that requires you remember the first character(s) of the
    entry to find it in a results list from which you pick the one you were
    looking for. It's still better than having to scan a mess of 1-tier
    entries.

    I've tried pinned shortcuts, but don't like them. Consumes realestate
    in the Taskbar even when the programs are not running. There is an
    indicator showing if a pinned shortcut has a running instance of that
    program (it's a tiny indicator, like a blue bar along the top), but I
    dislike having my Taskbar polluted with shortcut icons for apps that
    aren't even running.

    I have a 2-row Taskbar. Bottom row is for toolbars (folders) for:
    QuickLaunch (emulate the old QuickLaunch toolbar), web browser,
    communication, info & games, security, tools, address bar. The 2-row
    setup also makes the systray bigger, so I get more clock data (time, day-of-week, mm/dd/yyyy), and 2 rows for systray icons (but I still hide
    many of them, just show the most used). Got rid of the Search box since
    it is superfluous. Just open the Start menu and start typing to get the
    same search results. The top row of the Taskbar is *only* to show
    currently running programs. I also have the Taskbar configured to group
    icons for the same program, and use the popup thumbnails to pick which
    in the same set on which to focus. I've played off and on with the
    auto-hide option, but found too many programs don't resize when the
    Taskbar is unhidden resulting in the bottom portion of the app's window
    getting obscured by the Taskbar, so I just stick with always-show for
    the Taskbar.

    If that level of organization is not sufficient, I will use the virtual
    desktop manager to group windows in a screen, like web browsing in one
    desktop, coding in another desktop, writing letters in another, playing
    a game in another, and so on. Windows 10's virtual screen manager is sufficient for me. Before that I used Dexpot. There have been times I
    wanted multiple monitors, but multiple desktops is good enough, so far.

    Pinned shortcuts to the Taskbar is for users that don't mind clutter.
    Instead of pinning shortcuts to the Taskbar, I have shortcuts in
    toolbars shown in the bottom row of a 2-row Taskbar. I can have a hell
    of lot more shortcuts in toolbar than pinned ones in the Taskbar. In
    fact, I purposely squash some toolbar to show a right-ward
    double-chevron to popup a list of more shortcuts that are normally
    hidden. For example, in the web toolbar that is squashed down to show
    only 1 icon (for Firefox), the chevron that displays the popup list
    shows: Firefox (private), Firefox (safe), Kill all Firefox, No Proxy,
    Microsoft Edge. There used to be more, but the list got pared down.
    Taskbar toolbars are a far better solution to shortcut access than using
    pinned shortcuts.

    and you have to be familiar with all the subkeys under the
    AppPaths/<prog> subkey.

    App Paths is no more complex than the %path% is and you can save it once inside the registry as a Favorite so you don't have to look for it again.

    Okay, let's test that claim. You already know the subkey under AppPaths
    has the syntax <progname>.exe. Under that subkey, what are the possible
    data item names and values? There can be more than just the "(Default)"
    key defining a path to the program. There can also be a PATH data item
    with a path value. What's the difference between (Default) and PATH
    data items? What other data items may be defined under the <progname>
    subkey? What are the SaveURL and UseURL data items for? How about the
    data items that are unique to a program? What are the sub-subkeys, if
    any, under the <progname> subkey for? Maybe they define multiple
    protocols supported by the program, or other arguments.

    I mentioned there is also the Applications registry key which has a
    similar purpose to the AppPaths registry key, except the Applications
    subkeys can have more data on identifying the program, and its
    attributes or arguments. I gave the MS article mentioned how
    Applications has more attributes than does AppPaths. Here it is again
    (with a pointer to the section on the Applications key):

    https://learn.microsoft.com/en-us/windows/win32/shell/app-registration#using-the-applications-subkey

    Do you have that document memorized, so you know how to properly define
    the <prognam> subkey along with all the data items that are appropriate
    for each program?

    For me, only the stuff I want to put in the App Paths go into the App
    Paths sub key. Mostly those I wrote myself. Mostly files I use a lot.
    Mostly directories I use a lot.

    AppPath entries cannot point at folders. You're not using AppPaths to
    specify how to find all executables (and AppPaths never has done that
    even with all installers). It's up the installer as to whether or not
    it adds an AppPath/<progname>.exe subkey. For you, you're just adding a
    few AppPath subkeys for some of your programs. However, you're still
    editing the registry. regedit.exe is not a safe tool for editing the
    registry.

    There is no undo. If you delete something, it's gone forever. If you
    make a mistake in the registry, you'll have to restore from an image
    backup (you cannot individually restore the registry files since even
    admin users won't have permissions), or always remember to export the
    registry (or, at least the parent key under which you intend to edit) to
    save a .reg file that you can use to restore back to before your screw
    up. When editing the registry, all changes are immediate. Some
    changes, like under HKU, require you to logout and log back into your
    Windows account to effect the changes. When Windows loads, it reads the
    HKLM and HKC hives, and when you log into a Windows account the
    HKU/<sid> hive is read. The registry is read from files, but stored in
    memory for fast binary access. Registry API calls are against the
    memory copy, but editing is against the files, so you need to get the
    files to overwrite the memory copy. Sometimes F5 (refresh) will work,
    or exiting the registry editor which does the refresh. Yet sometimes
    you have to logout and login, or even restart Windows, to effect the
    changes. The biggest danger to editing the registry is the lack of an
    Undo. No matter how much anyone professes to be an expert or uber-guru,
    we all mistakes, like deleting the wrong stuff. Editors accomodate our mistakes by having Undo (and often multiple undo through a history
    feature). No undo when registry editing. Oops! Shit!

    With editing a .bat file, you always have Undo (Ctrl+Z) to get back what
    you deleted. And nothing is effected until you later run the batch
    script.

    If something is already in the %path%, I don't bother putting an App
    Paths sub key for it unless I use it so much that it's more efficient
    to use the App Paths but that's what the Windows menus are for.

    The installer will decide what to do. It can: update the PATH settings (sysPATH for global reference, or userPATH for per-account access),
    create a shortcut with "Start in" specified to change to that as the
    working directory, add an AppPath or Applications entry, a combo of
    those, or none of them.

    There is also an order to scanning the aggregate PATH envvar. sysPATH
    gets used first, then userPATH. That is, the string is concatenated as
    sysPATH + userPATH. If you don't specify the file extension for an
    executable, and .exe in sysPATH gets used first before the same-named
    file in userPATH. That's why, for example, I add C:\Batch at the head
    of sysPATH instead of in userPATH. I want my batch files by the same
    filename (but with .bat extension) to get used before any .exe by the
    same filename found farther down in sysPATH or down in userPATH. I may
    want a .bat file to override an .exe file. I might specify the
    extension (and have gotten into the habit of always including it) to
    make sure which file I actually want to run, but sometimes I forget to
    add the extension, and want to run jmr.bat instead of jmr.exe. Both can
    be found in the aggregate PATH envvar, but the \Batch folder in PATH is
    before the folder for JMR. Sometimes I want something differently setup
    for an executable by using a batch file, they have the same names, both
    are executable (.bat and .exe), but I was the .bat to be found before
    the .exe when they have the same filename. This works because AppPaths
    is used last to find an executable.

    - The current working directory.
    - The Windows directory only (no subdirectories are searched).
    - The Windows\System32 directory.
    - Directories listed in the PATH environment variable.
    - HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths

    Shortcuts don't require a search if the Start In field is non-blank
    (i.e., specifies the path).

    So my App Paths is mostly just for "my things", and not for everything.

    Okay, understood. However, when there are more traditional and safe
    mechanism, I recommend *against* editing the registry. Too dangerous.
    Even self-proclaimed professionals, like you and I, make mistakes.

    For example, I use a stream capture program called Jaksta, but I don't
    like how it leaves behind on its exit a bunch of data that gets reused
    in the next session of Jaksta. It's for recovery, like a resume
    function, but I don't want it. I can run commands after the program
    exits in a batch file to cleanup after its exit (make it pristine
    again). Can't do that with an AppPaths entry.

    How do you *start* that Jaksta program?
    I'll bet it's more steps than starting it using the App Paths sub key.

    Exactly. Both start up and shutdown of the app has additional steps
    that cannot be specified in a single command line.

    Sometimes ffmpeg.exe is left behind after exiting JMR. That is a
    problem with orphaned ffmpeg process that become unresponsive. Jaksta
    can't do anything about the problem. ffmpeg.org would have to fix it.
    So, before loading Jaksta, I make sure there are no orphaned ffmpeg
    processes that JMR might try to use, and after exiting JMR all ffmpeg
    instances are killed.

    After editing JMR, I purge its 2 library folders and URL cache. Those
    are kept across JMR sessions as a resume feature, like your computer
    crashed or had a power outage, and you can start JMR later to resume
    from where it got stopped. You might even deliberately stop JMR, and
    want it to resume in a later run of JMR. I don't want any of that, and
    the library and cache often get full of antiquated entries. I'm a neat
    freak, so I do cleanup after exiting JMR.

    JMR also works by using a transparent proxy to monitor web traffic,
    especially to inject its certificate to intercept HTTPS traffic. I've
    had the computer crash, or a power outage, or JMR crash which left in
    place its proxy definition (Internet Options -> Connections -> LAN
    settings -> Proxy server). Previously I didn't realize the proxy was
    still active, but was screwed, so it interfered with web traffic. I'd
    be in a web browser trying to connect to an HTTPS site, but Windows is
    still defined to use JMR's proxy which is an unusable state, so I
    couldn't visit any HTTPS sites - until I realized JMR's proxy was
    probably the culprit, and I have to reset the proxy settings in Windows.
    Easier to call another batch file that was used to reset the proxy
    settings in the registry using reg.exe. I called a separate batch file,
    so it was usable by itself should I suspect web connects were failing
    because of something defining a proxy setup.

    Not anything possible using a single command line in an AppPaths
    command. But this is probably an extreme case of what AppPaths is not
    intended to support, and probably not likely to be anything you want to
    do, either. While I can work with program authors on bug fixes, I don't
    want to wait until they get around to fixing the problems, especially if
    the devs consider something a feature that I want disabled (oh, yes,
    devs always know better what users should be afflicted with).

    That's not true. It means you don't understand App Paths.
    You really need to understand it before you say what you just said.

    Or, I could retort that you don't understand how batch scripts can do
    the same, AND can be far more robust by committing more than just
    loading an exectuable.

    The App Paths subkey definitely does things the %path% doesn't do.
    In fact, that's why it exists.

    Oh really. Then why is it the *LAST* method of finding an executable?
    It is a catch-all location, if there is an applicable entry.

    I'm not even going to respond to that given you clearly don't understand
    how teh App Paths subkey works (see above where it's clear you don't).

    You would like to believe that I don't understand. So far, I've proved
    more about how AppPaths and Applications are defined and used than you.

    You're not the one programming the spaghetti as to what is allowed for
    its eating utensil.

    Call me confused.

    The installer defines the AppPaths entry, if it so decides. The program
    can create one, too. Different code, but each using the registry API to
    define or modify the same key or data items within it. However, you are
    not touching those AppPaths entries, so that hazard is avoided. You are
    adding AppPaths entries only for your own programs, so you or your code
    are acting as the installer or program managing that registry key.

    Oh, by the way, all this registry key "stuff" is moot unless you are
    logged under a Windows admin-level account.

    I'm not sure why you say that as I've been using Windows since Windows
    95 and I have no problem with Windows 10 as a use (with administrator privileges) but I don't use the PC any other way and neither do most
    people.

    You use an admin-level Windows account. I cannot speak as to what
    account type gets used by the vast majority of users. I do know many
    users want additional security, especially against any malware that gets
    past any anti-malware defense, so their daily-use Windows account is
    either Standard or Guest. If they want to install software, or edit the registry, they switch from their daily user hat to logout and then login
    under an admin-level Windows account to wear their sysadmin hat. The
    malware gets the same privileges as the Windows account under which you
    are logged into. Anything you can do is also what malware can do. A restricted, standard, or guest account is not what malware wants. It
    loves users that always log under an admin-level Windows account. An
    easier target.

    If you're dealing with a company computer, don't mess with the
    registry.

    Guess you've never created restricted accounts for users that you
    don't want fucking up the setup.

    I'm not advocating messing with the registry if you don't own the
    computer.

    The "company" could be the parents that own the computer, and don't want
    their kids easily messing it up. Unless you physically protect your
    computer, anyone can change anything. Kids seems to have lots of free
    time to break stuff.

    BTW, I could easily set up an App Paths subkey to "disable" and
    "enable" the updates at the typing of a single command, while you'd
    probably set that up using the %path% which is fine.

    No, I just disable the Mozilla Maintenance service. However, Mozilla is
    rude. If I visit menu -> Help -> About, Firefox will look for and
    install updates although all I wanted was the current About info. So,
    after disabling the service, don't visit Help -> About.

    It was just an example.
    If you don't want to use a rake, you can use a leaf blower instead.
    Both do the job but each is different.

    Your method would be to go to shed, get a shovel, rake, pick axe, or
    some tool, go back into the house, and flip the inside light switch.
    You make the solution much harder than just disabling a service.

    Sorry, I don't see that. In fact, the more you're in the registry,
    the more likely you'll fuck it up.

    You need to take up your grievances with Microsoft, not with me.

    Taking up an issue that drive car tars over a fire melts them is the
    fault of the driver that decided to drive over the coals, not who manufacturered the tires.

    The registry is what it is. And regedit.exe is what it is. And putzing
    around in the registry is fraught with hazard. Deny it as much as you
    want, but anyone reading your contrary retort would see how inane was
    any claim otherwise. Edit the registry is dangerous. Editing a .bat
    file is safe.

    So, let's hear your retort on which is safer and which is more risky:
    - Editing the registry?
    - Editing a file?

    I don't care if you claim you've never made a mistake. I would already
    know that was a lie. Everyone that edits the registry learns by doing,
    and that incur learning from mistakes. Oh, yes, only you have never hit
    the Delete key when looking at something but the pointer is elsewhere.

    They should stay out of there unless they
    have take precautions, like saving an image backup of the OS
    partition(s).

    Why are you dumping all your grievances about Microsoft on me?
    Your entire argument is that you don't like the registry?

    You want to avoid the obvious where editing the registry is far more
    risky than editing a file. It is not Microsoft's fault that you chose
    to edit the registry without no recovery available (no Undo). YOU chose
    to take the risk.

    Using your own garden tool analogies: It is not the fault of the pick
    axe maker that you swung the tool which had it impale your butt.

    I'm reminded of the idiot that sued Sears because he incurred loss of
    fingers and a chunk of missing scalp because he used a lawn mower as a
    hedge trimmer. His argument was that Sears was at fault for him inappropriately using the lawn mower, and the manual never said the
    mower couldn't be used as a hedge trimmer.

    That regedit.exe or reg.exe or .reg files can be used by a user doesn't
    make it a safe tool. It's just a tool, and the user assumes the risk.

    When you perform a delete in the registry, there is no undo function.

    I haven't corrupted a registry in two decades.

    Funny. Reminds me of a Law & Order episode where the defendent's lawyer
    tried to get bail dismissed, because the defendent never killed anyone
    before. The prosecutor argued that not killing before is not an excuse
    to dismiss bail.

    You saying you've never made a mistake while editing the registry
    doesn't dismiss the risk that *other* following your advice would incur.
    You're perfect. Most users are not.

    I just want others to know about the App Paths subkey. And I've
    accomplished that.

    I'm arguing your advice is risky to those other users, because it
    involves modifying the registry by the user. There are safer methods.

    There are folks that extol registry cleaners. That's okay for gurus
    that not only understand the registry (and that there are only 3 real
    hives, and the others are pseudo-hives that are aggregates of the real
    hives), and prepare for editing the registry (reg backup, image backup), realize that searches can point to entries that have nothing to do with cleaning remnants left behind after a program's uninstallation, realize
    the dependencies between multiple registry entries, and so on. The tool
    should only be used to provide a convenience to those who already know
    how to manually edit the registry the same way. Registry editing by the uneducated is dangerous, like giving someong a scapel and telling them
    to go operate on someone. The tool wielded by the inexperienced and
    unprepared is a formula for trouble.

    The same for any registry editing suggested to others when there are
    safer methods: bad advice. There is no reason to recommend registry
    editing when safer methods are available.

    I will grant that editing the AppPaths entries is unlikely to cause catastrophic disaster to the computer. I don't like shooting at the
    range when boobs come there to squirt out bullets as fast as they can
    while pointing the muzzle all over the place, like at other shooters.
    Yep, they know how to pull the trigger. Doesn't take much to figure
    that out. Shooting someone else is not what they can handle. Yep, you
    can shoot your OS by putzing around in the registry. It's okay advice,
    and brings up an alternate method of pathing, but it seems something you recently discovered and feel a need to share without considering the
    risk it puts to other users.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Herbert Kleebauer@21:1/5 to Freethinker on Thu Mar 23 10:00:05 2023
    XPost: alt.comp.microsoft.windows

    On 23.03.2023 01:50, Freethinker wrote:

    It's only after I rename the App Paths "test.exe" to something other than "test" that the %path% wins out over my App Paths in that specific test.

    I did only a quick testing (so I may be wrong) but as I see it:

    If you use "start progname" it use %PATH% first and then "App Path"

    If you use "<WIN>-r progname" it use "App Path" first and then %PATH%

    The first place in the above search order it finds an executable,
    it is executed (no matter whether it is a com exe or bat). Only
    if there are more executable in this directory, the order is
    .com , .exe, .bat

    If you open a CMD window and type

    wordpad

    you get a not found message (because it is not in the %PATH%).

    If you use

    start wordpad

    Wordpad is started (I suppose, because of the "App Path" entry)


    <WIN>-r wordpad also starts Wordpad.


    Now create a wordpad.bat in a PATH-directory with the content "pause".

    "wordpad" and "start wordpad" now start the batch.


    Whereas "<WIN>-r wordpad" still starts Wordpad.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Stan Brown@21:1/5 to VanguardLH on Thu Mar 23 07:31:40 2023
    On Thu, 23 Mar 2023 02:18:10 -0500, VanguardLH wrote:
    I'm a bit of a neat freak. I don't like messes. That means not having
    1 tier to the Start menu, but organized in folders for category of
    programs, and subfolders under there for each program. I've seen users scanning their eyes up and down in a long Start menu trying to find an
    entry.

    There is now a search (just start typing when the Start menu is
    display) but that requires you remember the first character(s) of the
    entry to find it in a results list from which you pick the one you were looking for. It's still better than having to scan a mess of 1-tier
    entries.

    I didn't know I could do that. Thank you!

    When I want VirtualBox, it's certainly faster to type Virt{Enter}
    than click on one of the alphabet letters, click again on the V in
    the letter matrix that appears, click _again_ on the VirtualBox
    folder, and then, finally, click on the VirtualBox shortcut -- if I
    can still remember why I opened the Start Menu.

    --
    Stan Brown, Tehachapi, California, USA https://BrownMath.com/
    Shikata ga nai...

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Heron@21:1/5 to Stan Brown on Thu Mar 23 10:27:22 2023
    On 3/23/2023 9:31 AM, Stan Brown wrote:
    There is now a search (just start typing when the Start menu is
    display) but that requires you remember the first character(s) of the
    entry to find it in a results list from which you pick the one you were
    looking for. It's still better than having to scan a mess of 1-tier
    entries.

    I didn't know I could do that. Thank you!

    That's the funny thing about search which is that it's always there.
    You don't need a big fat advertisement for cortana just to run a search.

    The real problem is that you should never need to run any search on your computer because that's like searching for your tools when you need them.

    You should know where everything is.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Freethinker@21:1/5 to VanguardLH on Thu Mar 23 18:55:08 2023
    XPost: alt.comp.microsoft.windows

    On 23.03.23 02:18, VanguardLH wrote:
    I'm a bit of a neat freak. I don't like messes. That means not having
    1 tier to the Start menu, but organized in folders for category of
    programs, and subfolders under there for each program. I've seen users scanning their eyes up and down in a long Start menu trying to find an
    entry. There is now a search (just start typing when the Start menu is display) but that requires you remember the first character(s) of the
    entry to find it in a results list from which you pick the one you were looking for. It's still better than having to scan a mess of 1-tier
    entries.

    I've tried pinned shortcuts, but don't like them. Consumes realestate
    in the Taskbar even when the programs are not running. There is an
    indicator showing if a pinned shortcut has a running instance of that
    program (it's a tiny indicator, like a blue bar along the top), but I
    dislike having my Taskbar polluted with shortcut icons for apps that
    aren't even running.

    I have a 2-row Taskbar. Bottom row is for toolbars (folders) for: QuickLaunch (emulate the old QuickLaunch toolbar), web browser, communication, info & games, security, tools, address bar. The 2-row
    setup also makes the systray bigger, so I get more clock data (time, day-of-week, mm/dd/yyyy), and 2 rows for systray icons (but I still hide
    many of them, just show the most used). Got rid of the Search box since
    it is superfluous. Just open the Start menu and start typing to get the
    same search results. The top row of the Taskbar is *only* to show
    currently running programs. I also have the Taskbar configured to group icons for the same program, and use the popup thumbnails to pick which
    in the same set on which to focus. I've played off and on with the
    auto-hide option, but found too many programs don't resize when the
    Taskbar is unhidden resulting in the bottom portion of the app's window getting obscured by the Taskbar, so I just stick with always-show for
    the Taskbar.

    If that level of organization is not sufficient, I will use the virtual desktop manager to group windows in a screen, like web browsing in one desktop, coding in another desktop, writing letters in another, playing
    a game in another, and so on. Windows 10's virtual screen manager is sufficient for me. Before that I used Dexpot. There have been times I wanted multiple monitors, but multiple desktops is good enough, so far.

    Pinned shortcuts to the Taskbar is for users that don't mind clutter.
    Instead of pinning shortcuts to the Taskbar, I have shortcuts in
    toolbars shown in the bottom row of a 2-row Taskbar. I can have a hell
    of lot more shortcuts in toolbar than pinned ones in the Taskbar. In
    fact, I purposely squash some toolbar to show a right-ward
    double-chevron to popup a list of more shortcuts that are normally
    hidden. For example, in the web toolbar that is squashed down to show
    only 1 icon (for Firefox), the chevron that displays the popup list
    shows: Firefox (private), Firefox (safe), Kill all Firefox, No Proxy, Microsoft Edge. There used to be more, but the list got pared down.
    Taskbar toolbars are a far better solution to shortcut access than using pinned shortcuts.

    I'm probably as organized as you are, and maybe even more so as I don't
    even need to use the Windows menus as I maintain my own taskbar menus.

    and you have to be familiar with all the subkeys under the
    AppPaths/<prog> subkey.

    App Paths is no more complex than the %path% is and you can save it once
    inside the registry as a Favorite so you don't have to look for it again.

    Okay, let's test that claim. You already know the subkey under AppPaths
    has the syntax <progname>.exe. Under that subkey, what are the possible
    data item names and values? There can be more than just the "(Default)"
    key defining a path to the program. There can also be a PATH data item
    with a path value. What's the difference between (Default) and PATH
    data items? What other data items may be defined under the <progname> subkey? What are the SaveURL and UseURL data items for? How about the
    data items that are unique to a program? What are the sub-subkeys, if
    any, under the <progname> subkey for? Maybe they define multiple
    protocols supported by the program, or other arguments.

    I think I mentioned it but maybe it was in that other thread titled
    Subject: Random changing of "stuff" inside a Windows directory
    Date: Tue, 21 Mar 2023

    The only thing I know about the %App Paths% is the "@Default" value.
    I've never delved any deeper so it's a credit to you that you have.

    Herbert also found out that the key name "might" make a difference given
    echo %pathext% => .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC

    It may be that if I call an App Paths subkey "test.exe" it runs before
    a "test.bat" in the %path% but if I call the App Paths subkey some other extension, then the test.bat in the %path% might actually win out.

    Even so, Herbert showed me that the App Paths is the last path, in that
    it's added onto the %path%, just as you've whown me that the App Paths
    subkey can also add its own temporary path to the %path% at runtime.

    I don't deal with any of that so you know it now better than I do.

    I mentioned there is also the Applications registry key which has a
    similar purpose to the AppPaths registry key, except the Applications
    subkeys can have more data on identifying the program, and its
    attributes or arguments. I gave the MS article mentioned how
    Applications has more attributes than does AppPaths. Here it is again
    (with a pointer to the section on the Applications key):

    https://learn.microsoft.com/en-us/windows/win32/shell/app-registration#using-the-applications-subkey

    Do you have that document memorized, so you know how to properly define
    the <prognam> subkey along with all the data items that are appropriate
    for each program?

    When you mentioned that, it was the first time I had heard of the
    Applicaions subkey, but at the moment I haven't delved into it as I don't
    know what good it can be used for. I can't think yet of why I'd need it.

    What do you suggest using the Applications key for that I need to do?

    For me, only the stuff I want to put in the App Paths go into the App
    Paths sub key. Mostly those I wrote myself. Mostly files I use a lot.
    Mostly directories I use a lot.

    AppPath entries cannot point at folders.

    The funny thing is in Windows XP, the App Paths subkey DID open a folder!

    Even funnier (in a sad way of course), that now-lost feature of the App
    Paths subkey was precisely what turned me on to the App Paths subkey in the first place.

    It was so easy to create a single word to jump to often used folders in
    those days. But in Windows 10 I have to point to "something else, which
    opens the folder.

    The good news is lots of "something elses" can open a folder, such as a
    batch file with one line in it such as this one line for my archives.
    %comspec% /k cd C:\path\archives\
    The App Paths subkey allows the one word 'archives' to open that folder.
    Win+R archives
    HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\archives.exe
    @Default=C:\path\open_archives.bat

    Opening the folder could just as well have been done with a shortcut.
    @Default=C:\path\open_archives.lnk
    Target=%comspec% /c %windir%\explorer.exe C:\path\archives

    If you want, you could even open up multiple folders using the ampersand.

    But what's interesting to note is that you still can open "some" folders.
    Win+R tasks
    Win+R fonts
    Win+R security

    You're not using AppPaths to
    specify how to find all executables (and AppPaths never has done that
    even with all installers). It's up the installer as to whether or not
    it adds an AppPath/<progname>.exe subkey. For you, you're just adding a
    few AppPath subkeys for some of your programs. However, you're still
    editing the registry. regedit.exe is not a safe tool for editing the registry.

    As I said, I have been editing the registry since it came out, and
    therefore I'm kind of tired of all the "sky is falling" warnings.

    You'd be shocked to know that in the WinXP days I'd move a hive from one computer to another just by loading it into it, but I don't do that now.

    There is no undo. If you delete something, it's gone forever. If you
    make a mistake in the registry, you'll have to restore from an image
    backup (you cannot individually restore the registry files since even
    admin users won't have permissions), or always remember to export the registry (or, at least the parent key under which you intend to edit) to
    save a .reg file that you can use to restore back to before your screw
    up. When editing the registry, all changes are immediate. Some
    changes, like under HKU, require you to logout and log back into your
    Windows account to effect the changes. When Windows loads, it reads the
    HKLM and HKC hives, and when you log into a Windows account the
    HKU/<sid> hive is read. The registry is read from files, but stored in memory for fast binary access. Registry API calls are against the
    memory copy, but editing is against the files, so you need to get the
    files to overwrite the memory copy. Sometimes F5 (refresh) will work,
    or exiting the registry editor which does the refresh. Yet sometimes
    you have to logout and login, or even restart Windows, to effect the
    changes. The biggest danger to editing the registry is the lack of an
    Undo. No matter how much anyone professes to be an expert or uber-guru,
    we all mistakes, like deleting the wrong stuff. Editors accomodate our mistakes by having Undo (and often multiple undo through a history
    feature). No undo when registry editing. Oops! Shit!
    With editing a .bat file, you always have Undo (Ctrl+Z) to get back what
    you deleted. And nothing is effected until you later run the batch
    script.

    As I said, I've been editing the registry for as long as anyone has.
    I'm sick and tired of the repetitive warnings. They're for noobs. Not us.


    If something is already in the %path%, I don't bother putting an App
    Paths sub key for it unless I use it so much that it's more efficient
    to use the App Paths but that's what the Windows menus are for.

    The installer will decide what to do. It can: update the PATH settings (sysPATH for global reference, or userPATH for per-account access),
    create a shortcut with "Start in" specified to change to that as the
    working directory, add an AppPath or Applications entry, a combo of
    those, or none of them.

    By now you should have realized I don't use what any installer put into the
    App Paths subkey. I only use what I have put into the App Paths subkey.

    There is also an order to scanning the aggregate PATH envvar. sysPATH
    gets used first, then userPATH. That is, the string is concatenated as sysPATH + userPATH. If you don't specify the file extension for an executable, and .exe in sysPATH gets used first before the same-named
    file in userPATH. That's why, for example, I add C:\Batch at the head
    of sysPATH instead of in userPATH. I want my batch files by the same filename (but with .bat extension) to get used before any .exe by the
    same filename found farther down in sysPATH or down in userPATH. I may
    want a .bat file to override an .exe file. I might specify the
    extension (and have gotten into the habit of always including it) to
    make sure which file I actually want to run, but sometimes I forget to
    add the extension, and want to run jmr.bat instead of jmr.exe. Both can
    be found in the aggregate PATH envvar, but the \Batch folder in PATH is before the folder for JMR. Sometimes I want something differently setup
    for an executable by using a batch file, they have the same names, both
    are executable (.bat and .exe), but I was the .bat to be found before
    the .exe when they have the same filename. This works because AppPaths
    is used last to find an executable.

    - The current working directory.
    - The Windows directory only (no subdirectories are searched).
    - The Windows\System32 directory.
    - Directories listed in the PATH environment variable.
    - HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths

    Shortcuts don't require a search if the Start In field is non-blank
    (i.e., specifies the path).

    You may want to see my test of the App Paths in this thread and in the
    other thread, but I'll repeat it here because you haven't run it yet.

    These three ordering things need to be considered when typing a command.
    App Paths
    echo %path%
    echo %pathext%

    To test which is run first by Microsoft design, run this simple test.

    First, "echo %pathext%" in a command window, which, for me, outputs this.
    .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC

    Second, "echo %path% and put this one line test.bat into your path.
    %comspec% /k echo hello

    Third, add an App Paths subkey of the same core name to the registry.
    HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\test.exe
    @Default=osk

    Then in the "Win+R" run box, type "test" and then hit the enter key.
    Who wins?

    Notice it's not what you'd intuitively think as documented by Microsoft. https://learn.microsoft.com/en-us/windows/win32/shell/app-registration

    The fundamental reason is in how Microsoft looks for the file to run.

    "When the ShellExecuteEx function is called with the name of an
    executable file in its lpFile parameter, there are several places
    where the function looks for the file."

    Where the next sentence tells us what Microsoft suggests apps use.

    "We recommend registering your application in the App Paths
    registry subkey. Doing so avoids the need for applications
    to modify the system PATH environment variable."

    This makes sense because otherwise our %path% could have as many entries as
    the number of programs we've installed, each of which added to %path%.

    What is harder to determine intuitively is which will win if you
    change the filename extension, which still confuses me a little bit.

    It would be nice if someone can write a better summary (or a better test).

    So my App Paths is mostly just for "my things", and not for everything.

    Okay, understood. However, when there are more traditional and safe mechanism, I recommend *against* editing the registry. Too dangerous.
    Even self-proclaimed professionals, like you and I, make mistakes.

    As I said, I'm sick and tired of everyone warning me about what hasn't
    happened to me in more than a decade, and I edit the registry a lot.

    If someone is afraid of the registry, then the App Paths subkey isn't for
    them. It's not any more complicated than that.

    For example, I use a stream capture program called Jaksta, but I don't
    like how it leaves behind on its exit a bunch of data that gets reused
    in the next session of Jaksta. It's for recovery, like a resume
    function, but I don't want it. I can run commands after the program
    exits in a batch file to cleanup after its exit (make it pristine
    again). Can't do that with an AppPaths entry.

    How do you *start* that Jaksta program?
    I'll bet it's more steps than starting it using the App Paths sub key.

    Exactly. Both start up and shutdown of the app has additional steps
    that cannot be specified in a single command line.

    Actually, I apologize to you for saying that it's multiple steps because Herbert showed me that the Win+R run box respects the %path%, so to run anything using the %path% is one step just as it is one step to run
    anything using the App Paths subkey.

    My mistake was that I had forgotten that you do NOT need to first open a command window to run any batch command. It was my fault. Not yours.

    Sometimes ffmpeg.exe is left behind after exiting JMR. That is a
    problem with orphaned ffmpeg process that become unresponsive. Jaksta
    can't do anything about the problem. ffmpeg.org would have to fix it.
    So, before loading Jaksta, I make sure there are no orphaned ffmpeg
    processes that JMR might try to use, and after exiting JMR all ffmpeg instances are killed.

    After editing JMR, I purge its 2 library folders and URL cache. Those
    are kept across JMR sessions as a resume feature, like your computer
    crashed or had a power outage, and you can start JMR later to resume
    from where it got stopped. You might even deliberately stop JMR, and
    want it to resume in a later run of JMR. I don't want any of that, and
    the library and cache often get full of antiquated entries. I'm a neat freak, so I do cleanup after exiting JMR.

    JMR also works by using a transparent proxy to monitor web traffic, especially to inject its certificate to intercept HTTPS traffic. I've
    had the computer crash, or a power outage, or JMR crash which left in
    place its proxy definition (Internet Options -> Connections -> LAN
    settings -> Proxy server). Previously I didn't realize the proxy was
    still active, but was screwed, so it interfered with web traffic. I'd
    be in a web browser trying to connect to an HTTPS site, but Windows is
    still defined to use JMR's proxy which is an unusable state, so I
    couldn't visit any HTTPS sites - until I realized JMR's proxy was
    probably the culprit, and I have to reset the proxy settings in Windows. Easier to call another batch file that was used to reset the proxy
    settings in the registry using reg.exe. I called a separate batch file,
    so it was usable by itself should I suspect web connects were failing
    because of something defining a proxy setup.

    Not anything possible using a single command line in an AppPaths
    command. But this is probably an extreme case of what AppPaths is not intended to support, and probably not likely to be anything you want to
    do, either. While I can work with program authors on bug fixes, I don't
    want to wait until they get around to fixing the problems, especially if
    the devs consider something a feature that I want disabled (oh, yes,
    devs always know better what users should be afflicted with).

    I was wrong so I want to repeat that Herbert showed me that you can run
    your jak.bat command in a single step by typing "jak" in the Win+R run box.

    Whether or not the "jak.bat" file is found by the %path% or by the "App
    Paths" subkey mechanism, it's one step in either case.

    It seems the only difference is in the order that Windows looks for things, which is why it's important for you to run that quick test I suggested
    above because the results aren't intuitive even after you've read the
    Microsoft documentation. It's a Microsoft thing so don't blame me.

    That's not true. It means you don't understand App Paths.
    You really need to understand it before you say what you just said.

    Or, I could retort that you don't understand how batch scripts can do
    the same, AND can be far more robust by committing more than just
    loading an exectuable.

    Well, I accept that as I'm not here to "retort" but to gather information
    and disseminate it where I just realized one advantage of the App Paths
    subkey that the batch method does not enjoy - wanna hear it?

    You can run your jak.bat command from the Win+R run box by typing jak.
    But you can run your jak.bat command from the Win+R run box by typing foo.

    Which of those two can only be (easily) done using the App Paths subkey?

    The App Paths subkey definitely does things the %path% doesn't do.
    In fact, that's why it exists.

    Oh really. Then why is it the *LAST* method of finding an executable?
    It is a catch-all location, if there is an applicable entry.

    Let's say (for whatever reason) I want to call your jakarta.bat script by
    the word "foo" and also by the word "bar" and, while we're at it, by "jak".

    That's easy to do with the App Paths subkey, isn't it?
    HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\foo.exe
    @Default=c:\path\jakarta.bat

    HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\bar.exe
    @Default=c:\path\jakarta.bat

    HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\jak.exe
    @Default=c:\path\jakarta.bat

    Of course, using the %path% you could do that too, but you'd have to
    copy the batch file to all three names {foo,bar,jak}.bat to do it.

    One thing the App Paths does easily is extend the path temporarily,
    but you could do that too, if you know a lot about command variables. https://www.howtogeek.com/789660/how-to-use-windows-cmd-environment-variables/

    I'm not even going to respond to that given you clearly don't understand
    how the App Paths subkey works (see above where it's clear you don't).

    You would like to believe that I don't understand. So far, I've proved
    more about how AppPaths and Applications are defined and used than you.

    I'm not here for one upsmanship. You have shown you know more about the App Paths subkey now than I do, and you know about the Applications key which I didn't even know about.

    As I said, the only thing I use the App Paths subkey for is to open up
    folders, run shortcuts, run batch files, and run things that avoid the UAC (which usually entails running a shortcut which runs the task manager).

    Mostly I use it to edit files, where the subkey is named as the file is.
    HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\family.exe
    @Default=c:\path\family.xls

    Or to open folders.
    HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\archives.exe
    @Default=c:\path\open_archives.bat
    or, if I want do open a folder via a shortcut target, I use
    @Default=c:\path\open_archives.lnk

    You're not the one programming the spaghetti as to what is allowed for
    its eating utensil.

    Call me confused.

    The installer defines the AppPaths entry, if it so decides. The program
    can create one, too. Different code, but each using the registry API to define or modify the same key or data items within it. However, you are
    not touching those AppPaths entries, so that hazard is avoided. You are adding AppPaths entries only for your own programs, so you or your code
    are acting as the installer or program managing that registry key.

    Thanks for clarifying.
    You are correct in understanding I don't touch any App Paths subkey that is already there, and, since I don't use them, I could just as well delete
    them (if that's something I wanted to do).

    Oh, by the way, all this registry key "stuff" is moot unless you are
    logged under a Windows admin-level account.

    I'm not sure why you say that as I've been using Windows since Windows
    95 and I have no problem with Windows 10 as a use (with administrator
    privileges) but I don't use the PC any other way and neither do most
    people.

    You use an admin-level Windows account. I cannot speak as to what
    account type gets used by the vast majority of users. I do know many
    users want additional security, especially against any malware that gets
    past any anti-malware defense, so their daily-use Windows account is
    either Standard or Guest. If they want to install software, or edit the registry, they switch from their daily user hat to logout and then login under an admin-level Windows account to wear their sysadmin hat. The
    malware gets the same privileges as the Windows account under which you
    are logged into. Anything you can do is also what malware can do. A restricted, standard, or guest account is not what malware wants. It
    loves users that always log under an admin-level Windows account. An
    easier target.

    If I couldn't edit the registry at least once a week (on average), then
    Windows 10 would be useless to me becasue I wouldn't be able to tweak it.

    Remember in the Windows 95/XP days the explosion of Windows tweaks?

    The need for a vast number of tweaks has abated over time, but without
    tweaks, Windows wouldn't be efficient for me to use.

    If you're dealing with a company computer, don't mess with the
    registry.

    Guess you've never created restricted accounts for users that you
    don't want fucking up the setup.

    I'm not advocating messing with the registry if you don't own the
    computer.

    The "company" could be the parents that own the computer, and don't want their kids easily messing it up. Unless you physically protect your computer, anyone can change anything. Kids seems to have lots of free
    time to break stuff.

    My kids edit the registry.

    BTW, I could easily set up an App Paths subkey to "disable" and
    "enable" the updates at the typing of a single command, while you'd
    probably set that up using the %path% which is fine.

    No, I just disable the Mozilla Maintenance service. However, Mozilla is >>> rude. If I visit menu -> Help -> About, Firefox will look for and
    install updates although all I wanted was the current About info. So,
    after disabling the service, don't visit Help -> About.

    It was just an example.
    If you don't want to use a rake, you can use a leaf blower instead.
    Both do the job but each is different.

    Your method would be to go to shed, get a shovel, rake, pick axe, or
    some tool, go back into the house, and flip the inside light switch.
    You make the solution much harder than just disabling a service.

    What I would do in Firefox, if it must be discussed on a thread asking how
    to randomize the contents of a Windows directory is find the special to
    Firefox way that disables updates, for example, but this isn't about
    Mozilla, is it?

    C:\Program Files\Mozilla Firefox\policies.json
    {
    "policies":
    {
    "DisableAppUpdate": true
    }
    }

    Or I could run this registry file to disable Firefox updates.
    Windows Registry Editor Version 5.00
    [HKEY_LOCAL_MACHINE\Software\Policies\Mozilla\Firefox]
    "DisableAppUpdate"=dword:00000001

    Or maybe I'd go to about:config and find something to break it.
    app.update.background.interval = forever
    app.update.background.timeoutSec = 0
    app.update.backgroundMaxErrors = 0
    app.update.background.previous.reasons = because I can

    But this ever changing and senseless complexity is my main beef with doing things browser by browser by browser by browser by browser by browser, etc. especially since I wipe out the browser files after a brower is run (for reasons that should be obvious to you by now).

    Sorry, I don't see that. In fact, the more you're in the registry,
    the more likely you'll fuck it up.

    You need to take up your grievances with Microsoft, not with me.

    Taking up an issue that drive car tars over a fire melts them is the
    fault of the driver that decided to drive over the coals, not who manufacturered the tires.

    The registry is what it is. And regedit.exe is what it is. And putzing around in the registry is fraught with hazard. Deny it as much as you
    want, but anyone reading your contrary retort would see how inane was
    any claim otherwise. Edit the registry is dangerous. Editing a .bat
    file is safe.

    So, let's hear your retort on which is safer and which is more risky:
    - Editing the registry?
    - Editing a file?

    I don't care if you claim you've never made a mistake. I would already
    know that was a lie. Everyone that edits the registry learns by doing,
    and that incur learning from mistakes. Oh, yes, only you have never hit
    the Delete key when looking at something but the pointer is elsewhere.

    I'm not here for a pissing contest. Nobody disputes editing the registry doesn't have issues. Least of all me. We agree. No need to hash it again.

    They should stay out of there unless they
    have take precautions, like saving an image backup of the OS
    partition(s).

    Why are you dumping all your grievances about Microsoft on me?
    Your entire argument is that you don't like the registry?

    You want to avoid the obvious where editing the registry is far more
    risky than editing a file. It is not Microsoft's fault that you chose
    to edit the registry without no recovery available (no Undo). YOU chose
    to take the risk.

    Using your own garden tool analogies: It is not the fault of the pick
    axe maker that you swung the tool which had it impale your butt.

    I'm reminded of the idiot that sued Sears because he incurred loss of
    fingers and a chunk of missing scalp because he used a lawn mower as a
    hedge trimmer. His argument was that Sears was at fault for him inappropriately using the lawn mower, and the manual never said the
    mower couldn't be used as a hedge trimmer.

    That regedit.exe or reg.exe or .reg files can be used by a user doesn't
    make it a safe tool. It's just a tool, and the user assumes the risk.

    The warning to not edit the registry is the same warning your mother gave
    you to chew your food before swallowing. It doesn't need to be repeated.

    When you perform a delete in the registry, there is no undo function.

    I haven't corrupted a registry in two decades.

    Funny. Reminds me of a Law & Order episode where the defendent's lawyer tried to get bail dismissed, because the defendent never killed anyone before. The prosecutor argued that not killing before is not an excuse
    to dismiss bail.

    You saying you've never made a mistake while editing the registry
    doesn't dismiss the risk that *other* following your advice would incur. You're perfect. Most users are not.

    While I use scissors at least once a week, I don't run with them in my
    hand. My mother told me that. She doesn't need to tell me it every time.

    I just want others to know about the App Paths subkey. And I've
    accomplished that.

    I'm arguing your advice is risky to those other users, because it
    involves modifying the registry by the user. There are safer methods.

    There are folks that extol registry cleaners. That's okay for gurus
    that not only understand the registry (and that there are only 3 real
    hives, and the others are pseudo-hives that are aggregates of the real hives), and prepare for editing the registry (reg backup, image backup), realize that searches can point to entries that have nothing to do with cleaning remnants left behind after a program's uninstallation, realize
    the dependencies between multiple registry entries, and so on. The tool should only be used to provide a convenience to those who already know
    how to manually edit the registry the same way. Registry editing by the uneducated is dangerous, like giving someong a scapel and telling them
    to go operate on someone. The tool wielded by the inexperienced and unprepared is a formula for trouble.

    I think most of us used ccleaner (when it was crap cleaner) in the days of
    old but I suspect almost none of us still use them (or even AV programs).

    At some point, piriform (or whoever bought them) made it into a mess.
    I haven't used a registry cleaner since its last known good version.

    The same for any registry editing suggested to others when there are
    safer methods: bad advice. There is no reason to recommend registry
    editing when safer methods are available.

    If you can't edit the registry, then you are going to have a tough time wrestling Windows tweaks to get Windows to do things how you want them.

    I will grant that editing the AppPaths entries is unlikely to cause catastrophic disaster to the computer. I don't like shooting at the
    range when boobs come there to squirt out bullets as fast as they can
    while pointing the muzzle all over the place, like at other shooters.
    Yep, they know how to pull the trigger. Doesn't take much to figure
    that out. Shooting someone else is not what they can handle. Yep, you
    can shoot your OS by putzing around in the registry. It's okay advice,
    and brings up an alternate method of pathing, but it seems something you recently discovered and feel a need to share without considering the
    risk it puts to other users.


    [continued in next message]

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Freethinker@21:1/5 to Herbert Kleebauer on Fri Mar 24 07:07:26 2023
    XPost: alt.comp.microsoft.windows

    On 23.03.23 11:00, Herbert Kleebauer wrote:
    On 23.03.2023 01:50, Freethinker wrote:

    It's only after I rename the App Paths "test.exe" to something other than "test" that the %path% wins out over my App Paths in that specific test.

    I did only a quick testing (so I may be wrong) but as I see it:

    I appreciate the testing as it's confusing what the sequence is
    given the document said the App Paths was after the %path% but my specific
    test showed under that circumstance, the %path% was after the App Paths.

    If you use "start progname" it use %PATH% first and then "App Path"
    If you use "<WIN>-r progname" it use "App Path" first and then %PATH%

    Oh. Well. That might be it. I never use "start progname" as I always
    use the Win+R shortcut pinned to my taskbar and then the progname.

    The first place in the above search order it finds an executable,
    it is executed (no matter whether it is a com exe or bat). Only
    if there are more executable in this directory, the order is
    .com , .exe, .bat

    This is only slightly confusing because it applies only to the
    "start progname" I think, as usually with App Paths you specify the
    full filespec (where that filespec can be to a .com, .exe, .bat,
    or even to any file such as a .txt .ppt or .lnk or whatever).

    If you open a CMD window and type
    wordpad
    you get a not found message (because it is not in the %PATH%).
    If you use
    start wordpad
    Wordpad is started (I suppose, because of the "App Path" entry)
    <WIN>-r wordpad also starts Wordpad.

    I just tried all three and I agree with you on all three.
    wordpad
    fails
    start wordpad
    works
    Win+R wordpad
    works

    This is what I found in the registry for App Paths.
    HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\WORDPAD.EXE
    @Default="%ProgramFiles%\Windows NT\Accessories\WORDPAD.EXE"

    Now create a wordpad.bat in a PATH-directory with the content "pause". "wordpad" and "start wordpad" now start the batch.
    Whereas "<WIN>-r wordpad" still starts Wordpad.

    I'll take it from you that your summary is correct on the path order.
    start progname ==> puts %path% in front of App Paths
    Win+R progname ==> puts App Paths in front of %path%

    Then, of course, there's the case of the ability to temporarily extend
    the path which I found an example of put there by Microsoft I guess.
    HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\Winword.exe
    @Default=C:\Program Files\Office12\WINWORD.EXE
    @Path=C:\Program Files\Office12\
    @SaveURL= string value of 1
    @useURL= string value of 1

    In a way, that Microsoft Office entry exemplifies the best of both worlds
    in that we can presume Winword.exe, once run from the App Paths, will run through the %path% first for things it calls out, and then it will look in
    its own folder which it temporarily added to the path in the App Paths.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)