【问题标题】:Redirection in windows shortcutsWindows 快捷方式中的重定向
【发布时间】:2014-08-14 19:32:05
【问题描述】:

我有一个如下所示的批处理文件:

netsh interface dump > net.cfg

我想从快捷方式运行实际命令,所以我尝试了所有这些(在.lnk 快捷方式中):

%windir%\system32\netsh.exe interface dump > net.cfg
%windir%\system32\netsh.exe interface dump>net.cfg
%windir%\system32\netsh.exe "interface dump" > net.cfg
%windir%\system32\netsh.exe "interface dump > net.cfg"
%windir%\system32\cmd.exe /c start /min netsh interface dump > net.cfg
%windir%\system32\cmd.exe /c start /min netsh interface dump>net.cfg
%windir%\system32\cmd.exe /c start /min netsh "interface dump" > net.cfg
%windir%\system32\cmd.exe /c start /min netsh "interface dump > net.cfg"

似乎没有任何效果......我做错了什么?

【问题讨论】:

    标签: windows shortcut netsh lnk


    【解决方案1】:

    你和引号很接近......

    %windir%\system32\cmd.exe /c "netsh interface dump > net.cfg"
    

    【讨论】:

      【解决方案2】:

      试试这个:

      %windir%\System32\cmd.exe /k netsh interface dump > net.cfg
      

      来源:http://www.tech-recipes.com/rx/257/cmd-create-shortcut-to-command-linedos-programs/

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2011-06-29
        • 2012-05-07
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多