Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Win 10 File Explorer - open to a folder, to the View tab, using NirCmd  (Read 4263 times)

0 Members and 1 Guest are viewing this topic.

slack7639

    Topic Starter


    Rookie

    • Experience: Beginner
    • OS: Unknown
    Win 10 File Explorer defaults to opening to the "Home" tab, which I don't use too much - so I wanted it to open to "View"

    It's kind of confusing to figure out how to use NirCmd.  As I have read elsewhere, NirCmd's help file is not that comprehensive.

    Is there a page somewhere that fills this need, showing you how to do common, useful things with it?

    For example, I would add this (my comments are in the REM - for example, why doesn't it say anywhere that you need to "wait"?)

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    @ECHO OFF

    REM 1.) Without START "", alt+v makes it necessary to do Esc Esc to get rid of the letters (No)
    REM 2.) If you don't wait, then the commands are not received
    REM 500 isn't always enough time.  Go between that and 1000?  Sometimes 750 is too fast.
    REM But then you get the letters.  So at 500, it's not giving it enough time to bring those up.

    START "" "C:\Windows\Explorer.exe" "C:\1\02 projects A\A"

    "C:\Program Files (x86)\NIRCMD\nircmdc.exe" wait 1000

    "C:\Program Files (x86)\NIRCMD\nircmdc.exe" sendkey alt press
    "C:\Program Files (x86)\NIRCMD\nircmdc.exe" sendkey v press

    "C:\Program Files (x86)\NIRCMD\nircmdc.exe" sendkey Esc press
    "C:\Program Files (x86)\NIRCMD\nircmdc.exe" sendkey Esc press

    soybean



      Genius
    • The first soybean ever to learn the computer.
    • Thanked: 469
    • Computer: Specs
    • Experience: Experienced
    • OS: Windows 10
    I'm not familiar with NirCmd.  An alternative might be deciphered from https://www.winhelp.us/change-folder-views-and-options-in-windows.html

    patio

    • Moderator


    • Genius
    • Maud' Dib
    • Thanked: 1769
      • Yes
    • Experience: Beginner
    • OS: Windows 7
    " Anyone who goes to a psychiatrist should have his head examined. "

    slack7639

      Topic Starter


      Rookie

      • Experience: Beginner
      • OS: Unknown
      Soybean - That looks like just working with folders.  I think it would be a switch for the "View" tab, but I don't think that exists

      Patio - Yes, NirCmd has a help file, but what I'm getting at is . . . do you see anything there that says you need to have NirCmd "wait" for one second for the program to open, before it sends the keys you want?  I don't . . . So, this makes it quite confusing when you use the Help File syntax, and then nothing happens . . . That's why I'm saying, it would be good if someone had a page devoted to explaining basic things like that, and everyday "useful" applications.

      Here are a couple of others I use.

      The first one opens Skype, gives it my password, and logs me in . . . How does just putting the pw into the clipboard make it automatically enter into Skype?

      The second BAT file is a fast way to close Skype, completely, not have it in the Notification Area.

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

      START "" "C:\Program Files (x86)\Skype\Phone\Skype.exe"

      "C:\Program Files (x86)\NIRCMD\nircmdc.exe" clipboard set ThisIsMyPassword

      "C:\Program Files (x86)\NIRCMD\nircmdc.exe" closeprocess Windows Command Processor

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

      "C:\Program Files (x86)\NIRCMD\nircmdc.exe" closeprocess skype.exe

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      « Last Edit: March 28, 2018, 10:22:15 AM by slack7639 »

      slack7639

        Topic Starter


        Rookie

        • Experience: Beginner
        • OS: Unknown
        Here are some other uses I have found for NirCmd:

        * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

        Use these in two BAT files, to quickly toggle between headset and speakers:

        - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

        START "" /B "C:\Program Files (x86)\NIRCMD\nircmdc.exe" setdefaultsounddevice "Logitech Headset" 1
        START "" /B "C:\Program Files (x86)\NIRCMD\nircmdc.exe" setdefaultsounddevice "Logitech Headset" 2

        START "" /B "C:\Program Files (x86)\NIRCMD\nircmdc.exe" setdefaultsounddevice "Logitech Mic" 1
        START "" /B "C:\Program Files (x86)\NIRCMD\nircmdc.exe" setdefaultsounddevice "Logitech Mic" 2

        - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

        START "" /B "C:\Program Files (x86)\NIRCMD\nircmdc.exe" setdefaultsounddevice "Desktop Speakers" 1
        START "" /B "C:\Program Files (x86)\NIRCMD\nircmdc.exe" setdefaultsounddevice "Desktop Speakers" 2

        START "" /B "C:\Program Files (x86)\NIRCMD\nircmdc.exe" setdefaultsounddevice "Stereo Mix Input" 1
        START "" /B "C:\Program Files (x86)\NIRCMD\nircmdc.exe" setdefaultsounddevice "Stereo Mix Input" 2

        * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

        Use this in a BAT file to do Standby:

        - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

        @ECHO OFF

        "C:\Program Files (x86)\NIRCMD\nircmdc.exe" standby

        * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

        Use this in a BAT file to move something to the Recycle Bin:

        - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

        @ECHO OFF

        "C:\Program Files (x86)\NIRCMD\nircmdc.exe" moverecyclebin "C:\Users\MyUserName\Desktop\output.csv"

        * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

        With Firefox open, use one or the other of these to get to "Other Bookmarks" (Ctrl+Shift+B).

        A question I have is, how much of a difference is there between using "press" vs. "down" and "up" ?

        - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

        @ECHO OFF

        "C:\Program Files (x86)\Mozilla Firefox\firefox.exe" -chrome chrome://browser/content/places/places.xul

        "C:\Program Files (x86)\NIRCMD\nircmdc.exe" sendkey pagedown press
        "C:\Program Files (x86)\NIRCMD\nircmdc.exe" sendkey enter press

        - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

        @ECHO OFF

        "C:\Program Files (x86)\Mozilla Firefox\firefox.exe" -chrome chrome://browser/content/places/places.xul

        "C:\Program Files (x86)\NIRCMD\nircmdc.exe" sendkey pagedown down
        "C:\Program Files (x86)\NIRCMD\nircmdc.exe" sendkey enter press

        "C:\Program Files (x86)\NIRCMD\nircmdc.exe" sendkey pagedown up

        * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

        patio

        • Moderator


        • Genius
        • Maud' Dib
        • Thanked: 1769
          • Yes
        • Experience: Beginner
        • OS: Windows 7
        As always when we get batch requests the goal changes midstream...i hope you find a solution to your original query...
        " Anyone who goes to a psychiatrist should have his head examined. "

        slack7639

          Topic Starter


          Rookie

          • Experience: Beginner
          • OS: Unknown
          I'm just showing some uses I've had for NirCmd (for below) . . . and there are a couple of questions in there.

          My other question is, could there be a forum just for NirCmd, and some tutorials

          In the forum, people can ask about what's confusing them, or provide examples of what they've done

          slack7639

            Topic Starter


            Rookie

            • Experience: Beginner
            • OS: Unknown
            NirCmd - Auto Login to Yahoo Mail
            « Reply #7 on: April 21, 2018, 10:03:08 AM »
            Here's how to use NirCmd to log you into your Yahoo E-mail account, and then go to Yahoo Mail Basic.

            If you don't want it to go to Yahoo Mail Basic, leave off that last part.

            Key things to know about NirCmd are:  activate ititle, max ititle, and wait . . . It took me a while to figure this out

            I have another version of this for my Startup BAT, where it waits 10 seconds (10000), then it works.

            Is there a way to combine all of the tabs onto one line, or do they have to be separate lines like this?

            - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

            @ECHO OFF

            START "" "C:\Program Files (x86)\Mozilla Firefox\firefox.exe" "https://att.yahoo.com/mail"
            nircmd.exe wait 8000

            nircmd.exe win activate ititle "AT&T - Login - Mozilla Firefox"
            nircmd.exe win max ititle "AT&T - Login - Mozilla Firefox"
            nircmd.exe sendkey tab press
            nircmd.exe sendkey tab press
            nircmd.exe sendkey tab press
            nircmd.exe sendkey tab press
            nircmd.exe sendkey tab press
            nircmd.exe sendkey tab press
            nircmd.exe sendkey tab press
            nircmd.exe clipboard set [email protected]
            nircmd.exe sendkeypress ctrl+v

            nircmd.exe sendkey tab press
            nircmd.exe sendkey tab press
            nircmd.exe sendkey tab press
            nircmd.exe sendkey tab press
            nircmd.exe sendkey tab press
            nircmd.exe sendkey tab press
            nircmd.exe sendkey tab press
            nircmd.exe sendkey enter press
            nircmd.exe wait 4000

            nircmd.exe win max ititle "[email protected] - att.net Mail - Mozilla Firefox"

            nircmd.exe sendkey tab press
            nircmd.exe sendkey tab press
            nircmd.exe sendkey tab press
            nircmd.exe sendkey tab press
            nircmd.exe wait 1000

            nircmd.exe clipboard set "https://mail.yahoo.com/neo/b/launch?.src=neo&reason=ymv_mismatch"
            nircmd.exe sendkeypress ctrl+v
            nircmd.exe sendkey enter press

            EXIT

            - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -