Be seen. Boost your question’s priority for more expert views and faster solutions
# $language = "VBScript" # $interface = "1.0" ' This script sets a specific logfile, enables logging then connects ' to a server. After capturing the output of a command to the logfile ' logging is disabled and it disconnects. Sub Main ' Set the name of the log file name "YYMMDD.log" ' Dim logfile logfile = "C:\TEMP\mysession.log" crt.Session.LogFileName = logfile ' Enable logging ' crt.Session.Log True ' Send a unix command. The output of the command will ' be captured to the logfile. ' crt.Screen.Send "date" & vbCr ' Wait again for my login prompt or 5 seconds ' crt.Screen.WaitForString "linux$", 5 ' Turn off synchronous mode crt.Screen.Synchronous = false ' Stop logging and disconnect. ' crt.Session.Log False crt.Session.Disconnect End Sub
Join the community of 500,000 technology professionals and ask your questions.