Adding new top-level foldeer to PATH: what can I do that I could not


  1. Posts : 1,779
    Windows 10 Pro
       #1

    Adding new top-level foldeer to PATH: what can I do that I could not


    I have a bunch of portable programs that I have collected into a top level folder called \bin" with subdirectories for various categories like batch cmds, general utilities, photo utilities, etc. On a different forum, someone said that I should add this to my PATH variable
    c:\bin

    So I did this and then rebooted my system. I checked PATH to see that my addition was now part of PATH. However, when I typed the name of one of these portable programs I got a web search for that program, but the program itself did not run.

    Was I expecting too much? Did I skip any steps? I like the idea of typing (or clicking on a shortcut icon) for a program instead of having to navigate to the right subfolder, and then double-click on the program file.

    Win 10 2H22 V 19045 (plus all MS patches)
      My Computers


  2. Posts : 10
    Windows 10 22H2
       #2

    Adding a directory to the path will enable you to run programs in that directory without specifying the full path. So, it won't help you to run programs (or scripts) in subdirectories.

    If you have a directory which contains command line programs or scripts you could add that to the path. This does work for GUI programs, but there is a better way of doing this: using 'App Paths'

    look in the registry at:

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

    and

    HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths

    any of the programs listed there can be started from the Run box, or from a command or powerShell prompt by using start progname

    eg:

    start wordpad

    will run wordpad, whereas simply typing wordpad will produce the normal message for an unknown program. As a bonus using write (the forerunner of wordpad) will also start wordpad. If you examine the entry under write.exe you'll see that it points to wordpad. So you can set up aliases if you like.

    Some entries will also have path value. This is only useful or needed if the program wants or needs additions to the path when it is running. This is added at the front of the path, so these folder(s) are searched first which enables the program to find them by name only. This is rarely necessary.

    Whether you set the App Paths entries in HKLM or HKCU is up to you. I keep such programs in the user programs folder, normally \users\username\appdata\local\programs (you can access this as shell:userprogramfiles if it already exists) to keep them away from other users.
      My Computer


  3. Posts : 16,978
    Windows 10 Home x64 Version 22H2 Build 19045.4170
       #3

    x509 said:
    I like the idea of typing (or clicking on a shortcut icon) for a program instead of having to navigate to the right subfolder, and then double-click on the program file
    This is not the same as your question about changing the Path but is, I think, a much better approach.
    Just browse through the \bin subfolders once and right-click on the executables you want shortcuts for, select Create shortcut then move the shortcut to your Desktop [unless you have set up suitable folder permissions that force that choice on you anyway.
    Adding new top-level foldeer to PATH:  what can I do that I could not-create-shortcut-desktop-instead.png
    By "suitable folder permissions", I mean Set up my Tools folder ditty - TenForums


    When you have made them all, you can sort them out however you want. Personally, I use Taskbar Toolbars to organise my shortcuts.
    Taskbar Toolbars - Creating and naming, customising, moving [post #20] - TenForumsTutorials


    If you really do want to fart about with the Path, see
    Edit User and System Environment Variables - TenForumsTutorials



    Best of luck,
    Denis
      My Computer


  4. Posts : 8,115
    windows 10
       #4

    from a cmd prompt type

    set
    is the bin in the path?
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 19:34.
Find Us




Windows 10 Forums