Dim oTestApp, strSource, strDestination, strCommand
Set oTestApp = CreateObject("AWREM32.APPLICATION")
oTestApp.awConnect("C:\Documents and Settings\All Users\Application Data\Symantec\pcAnywhere\test.chf")
'Transfer From Host
strSource = "C:\testfile.txt"
strDestination = "C:\temp\testfile.txt"
bResult = oTestApp.FileXferFromHost(strSource, strDestination)
if bResult = True then
MsgBox "Transfer from host successful"
elseif bResult = False then
MsgBox "Transfer from host not successful"
end if
'Transfer to Host
strSource = "C:\temp\testfile.txt"
strDestination = "C:\testfile.txt"
bResult = oTestApp.FileXferToHost(strDestination, strSource)
if bResult = True then
MsgBox "Transfer from host successful"
elseif bResult = False then
MsgBox "Transfer from host not successful"
end if
'Execute Program on remote computer
strCommand = "C:\winnt\notepad.exe"
bResult = oTestApp.ExecuteHostFile(strCommand)