【发布时间】:2015-06-21 19:22:10
【问题描述】:
我在 HTA 中使用以下代码创建了一个 GUI:
Sub result ( )
Dim strComputer, objShell, objExec, strPingResults, WshShell
strComputer = Trim( UCase( ComputerNameTextBox.Value ) )
Set WshShell = CreateObject("WScript.Shell")
Set objExec = WshShell.Exec("cmd.exe /c C: \Program Files (x86)\VMware\VMware vSphere CLI\bin & esxcli -s "&strComputer&" -u root -p NTMC_Admin network nic list ")
strPingResults = LCase(objExec.StdOut.ReadAll)
ResultsTextArea.Value = ""
ResultsHiddenText.Value = strComputer & vbTab
ResultsHiddenText.Value = strComputer & vbcr & vblf & strPingResults
ResultsTextArea.Value = ResultsTextArea.Value & strPingResults
CopyButton.Disabled = False
ResetButton.Disabled = False
' change mouse pointer back to default
Document.Body.Style.Cursor = "default"
End Sub
请帮助我保护我的代码,以便任何人都无法在任何视图源下看到此功能。
【问题讨论】:
-
请为截取的代码的语言添加标签(VBScript?)