NirCmd: Copy Path vs. Copy File Name

Page 3 of 4 FirstFirst 1234 LastLast

  1. Posts : 8
    Windows 10 pro
       #21

    Please, going to the system's Language settings, selecting Administrative language settings, clicking Change system locale... and checking the Beta: Use Unicode UTF-8 for worldwide language support box and then restarting my pc. Source

    Test if this change something, and if possible, copy all strings in this file name (???מסמך טקסט ?חדש.txt), encode to base64 and add here.... if not, plz, identify the hex code to then

    After, test one by one cmd options in:

    Code:
    ... & cmd /v /s /c \"..
    /D      Disable execution of AutoRun commands from registry (see below)         // ... & cmd /v /D /s /c \"..
    /A      Causes the output of internal commands to a pipe or file to be ANSI     // ... & cmd /v /A /s /c \"..
    /U      Causes the output of internal commands to a pipe or file to be          // ... & cmd /v /U /s /c \"..

    And one more test:

    Code:
    Windows Registry Editor Version 5.00
    
    ;@(cls&%__APPDIR__%reg.exe import "%~f0" & goto :EOF)
    
    [HKEY_CLASSES_ROOT\*\shell\CopyFileName]
    @="CopyFileName"
    
    [HKEY_CLASSES_ROOT\*\shell\CopyFileName\command]
    @="C:\\\\Windows\\\\nircmd.exe execmd set \"_=%L\" & cmd /v /s /c \"chcp 862>nul & color & echo\\|set/p;.=\"!_:%W\\=!\"|clip\""
      My Computer


  2. Posts : 62
    Windows 10 64-bit
    Thread Starter
       #22

    @iT WasnT Me,

    I apologize for the late reply. And many thanks again for your help.

    Please, going to the system's Language settings, selecting Administrative language settings, clicking Change system locale... and checking the Beta: Use Unicode UTF-8 for worldwide language support box and then restarting my pc.
    Yes, that solved the issue. But it creates many other (and more serious) problems system-wide.

    Code:
    [HKEY_CLASSES_ROOT\*\shell\CopyFileName\command]
    @="C:\\\\Windows\\\\nircmd.exe execmd set \"_=%L\" & cmd /v /s /c \"chcp 862>nul & color & echo\\|set/p;.=\"!_:%W\\=!\"|clip\""
    Does not solve the issue.

    Code:
    ... & cmd /v /s /c "..
    /D      Disable execution of AutoRun commands from registry (see below)         // ... & cmd /v /D /s /c "..
    /A      Causes the output of internal commands to a pipe or file to be ANSI     // ... & cmd /v /A /s /c "..
    /U      Causes the output of internal commands to a pipe or file to be          // ... & cmd /v /U /s /c "..
    Could you please clarify that?
      My Computer


  3. Posts : 8
    Windows 10 pro
       #23

    Yaron said:
    @iT WasnT Me,

    I apologize for the late reply. And many thanks again for your help.
    No problem, i've been busy too

    Yes, that solved the issue.
    So it solves and it doesn't help...

    But it creates many other (and more serious) problems system-wide.
    Some things on windows are like this, fix it here, change something there, fix it, return the problem here...

    Code:
    [HKEY_CLASSES_ROOT\*\shell\CopyFileName\command]
    @="C:\\\\Windows\\\\nircmd.exe execmd set \"_=%L\" & cmd /v /s /c \"chcp 862>nul & color & echo\\|set/p;.=\"!_:%W\\=!\"|clip\""
    Does not solve the issue.

    Code:
    ... & cmd /v /s /c "..
    /D      Disable execution of AutoRun commands from registry (see below)         // ... & cmd /v /D /s /c "..
    /A      Causes the output of internal commands to a pipe or file to be ANSI     // ... & cmd /v /A /s /c "..
    /U      Causes the output of internal commands to a pipe or file to be          // ... & cmd /v /U /s /c "..
    Could you please clarify that?
    It would be three attempts adding one more command complement at a time in cmd /c...
    I'm splitting it into three files for your tests...

    File test #1

    Code:
    Windows Registry Editor Version 5.00
    
    ;@(cls&%__APPDIR__%reg.exe import "%~f0" & goto :EOF)
    
    [HKEY_CLASSES_ROOT\*\shell\CopyFileName]
    @="CopyFileName"
    
    [HKEY_CLASSES_ROOT\*\shell\CopyFileName\command]
    @="C:\\\\Windows\\\\nircmd.exe execmd set \"_=%L\" & cmd /v /u /s /c \"chcp 862>nul & color & echo\\|set/p;.=\"!_:%W\\=!\"|clip\""
    File test #2

    Code:
    Windows Registry Editor Version 5.00
    
    ;@(cls&%__APPDIR__%reg.exe import "%~f0" & goto :EOF)
    
    [HKEY_CLASSES_ROOT\*\shell\CopyFileName]
    @="CopyFileName"
    
    [HKEY_CLASSES_ROOT\*\shell\CopyFileName\command]
    @="C:\\\\Windows\\\\nircmd.exe execmd set \"_=%L\" & cmd /v /a /s /c \"chcp 862>nul & color & echo\\|set/p;.=\"!_:%W\\=!\"|clip\""
    File test #3

    Code:
    Windows Registry Editor Version 5.00
    
    ;@(cls&%__APPDIR__%reg.exe import "%~f0" & goto :EOF)
    
    [HKEY_CLASSES_ROOT\*\shell\CopyFileName]
    @="CopyFileName"
    
    [HKEY_CLASSES_ROOT\*\shell\CopyFileName\command]
    @="C:\\\\Windows\\\\nircmd.exe execmd set \"_=%L\" & cmd /v /d /s /c \"chcp 862>nul & color & echo\\|set/p;.=\"!_:%W\\=!\"|clip\""
      My Computer


  4. Posts : 62
    Windows 10 64-bit
    Thread Starter
       #24

    @iT WasnT Me,

    Unfortunately none of the commands has solve the issue.

    Thanks again. I appreciate your perseverance. :)
      My Computer


  5. Posts : 8
    Windows 10 pro
       #25

    Yaron said:
    @iT WasnT Me,

    Unfortunately none of the commands has solve the issue.

    Thanks again. I appreciate your perseverance. :)
    Understanding that this does not happen with all strings, only some are replaced by "?".
    To try a few things I have in mind, I ask you to use a coder for base64, and send me the resulting strings from that conversion, so I can have the same ones and run some more tests.
      My Computer


  6. Posts : 62
    Windows 10 64-bit
    Thread Starter
       #26

    Thanks again. I appreciate it.

    Here is the encoded string:
    Code:
    Pz8/157Xodee15og15jXp9eh15ggP9eX15PXqS50eHQ=
    I'd like to emphasize that the problem only occurs when creating a new folder or text file (New -> Text Document).
    As soon as I rename the newly created file/folder, there are no "?" in the copied string.
      My Computer


  7. Posts : 8
    Windows 10 pro
       #27

    I can say the same to you d;)
    Thanks again. I appreciate your perseverance. :)


    Please, try this...
    This will use NirCMD.exe to run the console version (NirCMDc.exe) and get the strings there.

    I need to see the result more to clear a doubt.


    Code:
    Windows Registry Editor Version 5.00
    
    ;@(cls&%__APPDIR__%reg.exe import "%~f0" & goto :EOF)
    
    [HKEY_CLASSES_ROOT\*\shell\CopyFileName]
    @="CopyFileName"
    
    [HKEY_CLASSES_ROOT\*\shell\CopyFileName\command]
    @="C:\\\\Windows\\\\nircmd.exe execmd  \"chcp 862>nul & color & C:\\\\Windows\\\\nircmdc.exe execmd set \"_=%L\" & cmd /v /d /s /c \echo\\|set/p;.=\"!_:%W\\=!\"|clip\""\"
      My Computer


  8. Posts : 62
    Windows 10 64-bit
    Thread Starter
       #28

    I can say the same to you d
    That's very kind of you. :)

    For some reason I can not merge the last command into the Registry.
    Any idea?

    EDIT: something is wrong with the string.

    Thank you.
      My Computer


  9. Posts : 18,044
    Win 10 Pro 64-bit v1909 - Build 18363 Custom ISO Install
       #29

    iT WasnT Me said:
    Code:
    [HKEY_CLASSES_ROOT\*\shell\CopyFileName\command]
    @="C:\\\\Windows\\\\nircmd.exe execmd  \"chcp 862>nul & color & C:\\\\Windows\\\\nircmdc.exe execmd set \"_=%L\" & cmd /v /d /s /c \echo\\|set/p;.=\"!_:%W\\=!\"|clip\""\"
    Yaron said:
    For some reason I can not merge the last command into the Registry.

    Check the " [ Speech Marks ]. I think there is an EXTRA ONE or ONE MISSING in the original code.
      My Computer


  10. Posts : 62
    Windows 10 64-bit
    Thread Starter
       #30

    Could you please post the correct command? - I think that would be better.
    Thanks.
      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 20:54.
Find Us




Windows 10 Forums