Vb.net 如何在运行批处理文件后退出cmd shell?
我有一段VB.Net代码:Vb.net 如何在运行批处理文件后退出cmd shell?,vb.net,shell,batch-file,console,hide,Vb.net,Shell,Batch File,Console,Hide,我有一段VB.Net代码: Private Sub Android50LPreviewToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles Android50LPreviewToolStripMenuItem.Click Shell("cmd /K c:\Zeustools\frameworks\apktool if framework-res_apiL.apk ", vbHide) End Sub
Private Sub
Android50LPreviewToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles Android50LPreviewToolStripMenuItem.Click
Shell("cmd /K c:\Zeustools\frameworks\apktool if framework-res_apiL.apk ", vbHide)
End Sub
在上述操作完成后,如何退出/终止cmd控制台?您可以尝试使用cmd/c而不是cmd/k吗 /C执行字符串指定的命令,然后终止
/K执行由字符串指定的命令,但保持不变
D:\>cmd /?
Starts a new instance of the Windows XP command interpreter
CMD [/A | /U] [/Q] [/D] [/E:ON | /E:OFF] [/F:ON | /F:OFF] [/V:ON | /V:OFF]
[[/S] [/C | /K] string]
/C Carries out the command specified by string and then terminates
/K Carries out the command specified by string but remains
/S Modifies the treatment of string after /C or /K (see below)
/Q Turns echo off
/D Disable execution of AutoRun commands from registry (see below)
/A Causes the output of internal commands to a pipe or file to be ANSI
/U Causes the output of internal commands to a pipe or file to be
Unicode
/T:fg Sets the foreground/background colors (see COLOR /? for more info)
/E:ON Enable command extensions (see below)
/E:OFF Disable command extensions (see below)
/F:ON Enable file and directory name completion characters (see below)
/F:OFF Disable file and directory name completion characters (see below)
/V:ON Enable delayed environment variable expansion using ! as the
delimiter. For example, /V:ON would allow !var! to expand the
variable var at execution time. The var syntax expands variables
at input time, which is quite a different thing when inside of a FOR
loop.
/V:OFF Disable delayed environment expansion.