I have created one GUI using below code in HTA:
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
Please help me out to secure my code so that no one can see the this function under any view source.
You should try to convert your vbscript and your HTA to executables files !
(VbsEdit/HTAEdit), it's a package includes (VbsEdit 32-bit, VbsEdit 64-bit, HtaEdit 32-bit and HtaEdit 64-bit). has a good feature is to compile and convert your vbs or your HTA files into .exe and it is totaly free.