例如,在Bash中,我可以这样做:
emacs foo.txt &
Windows中是否有任何等价物? 我似乎无法找出一个方法来与Windows版本的emacs做到这一点。
在Windows中从命令行启动程序的命令是“开始”
Starts a separate window to run a specified program or command. START ["title"] [/D path] [/I] [/MIN] [/MAX] [/SEPARATE | /SHARED] [/LOW | /NORMAL | /HIGH | /REALTIME | /ABOVENORMAL | /BELOWNORMAL] [/AFFINITY <hex affinity>] [/WAIT] [/B] [command/program] [parameters] "title" Title to display in window title bar. path Starting directory B Start application without creating a new window. The application has ^C handling ignored. Unless the application enables ^C processing, ^Break is the only way to interrupt the application I The new environment will be the original environment passed to the cmd.exe and not the current environment. MIN Start window minimized MAX Start window maximized SEPARATE Start 16-bit Windows program in separate memory space SHARED Start 16-bit Windows program in shared memory space LOW Start application in the IDLE priority class NORMAL Start application in the NORMAL priority class HIGH Start application in the HIGH priority class REALTIME Start application in the REALTIME priority class ABOVENORMAL Start application in the ABOVENORMAL priority class BELOWNORMAL Start application in the BELOWNORMAL priority class AFFINITY The new application will have the specified processor affinity mask, expressed as a hexadecimal number. WAIT Start application and wait for it to terminate
您可能想要使用MIN选项来启动一个最小化的程序
我不知道这是否足够,但尝试
start emacs foo.txt
它不会进入后台,但它将启动命令单独的cmd.exe窗口。
取决于您使用的Windows版本。
在Vista中,您应该能够在path中inputexe的名称,并在命令提示符closures后使其生效。
开始计算
如何从Windows中的命令提示符启动程序
在MS-DOS提示符下使用START命令启动基于MS-DOS的或基于Windows的程序。 该程序作为一个单独的任务启动,可以在前台或后台运行。
不幸的是,我不认为这是可能的。
您可以在Windows脚本主机脚本中执行此操作,如下所示:
Set oShell = WScript.CreateObject("WScript.Shell") Set oProc = oShell.Run "<your command here>",0,True
如果“0”表示窗口应该被隐藏(对于其他选项,请参阅http://msdn.microsoft.com/en-us/library/d5fk67ky(VS.85).aspx )和“真“,表示您希望在脚本继续之前等待命令完成。
这是一个简单的练习,将其包含在通用的“运行隐藏命令”脚本中,您可以从命令行使用该脚本。
如果你安装了微软新的PowerShell,那么可能有更简单的方法来做到这一点(我还没有使用过PowerShell)。
如果你很乐意把窗口最小化,那么你可以用其他提到的“start”命令来做到这一点。 不幸的是,“/ B”选项(这听起来像是你想要的)只用于命令,并不会停止窗口应用程序出现在屏幕上。
注意:您使用的是以上哪一种方法来启动一个带有隐藏/最小化主窗口的程序,没有任何东西可以阻止它创build可见的新窗口,或者在主窗口运行时将主窗口拉上并聚焦。
哈哈,我成功了,使用崇高的text3作为降价预览的服务器是我的build议,在我closures崇高文本的窗口后,我不会工作。 我会尝试很多方法,最后它的工作。 首先,你应该创build一个蝙蝠来启动这个程序。
start /B "" "D:\dev\sublime3\Sublime Text 3\subl.exe" "-s" "%USERPROFILE%\Dropbox\dev\apis\*.markdown"
第二,按计划运行这个蝙蝠任务。
run window+R->taskschd.msc->add a task
根据这个时间表添加一个触发器来运行这个蝙
添加这个蝙蝠作为一个操作来执行
这个结果是避免显示崇高的文本窗口,并且它与正常打开的崇高文本发生冲突。
也许你已经猜到了,我使用OmniMarkupPreviewer插件预览markdown.I已经修复了这个错误(或不完美的function),它使用不同的视图ID每次。