Vista (with IE7) brings it's own challanges. The two of them have teamed up
to tighten up on security. This means that some of the previous techniques
of faking out an IE call with things like the telnet command may not work
anymore..
check this out
http://www.cisconet.com/index.php/Network-App/Enable-Telnet-on-IE7.0-with-Windows-XP-and-Vista.html
To add to this dilema the customary response of wrapping a command in a
shell script can also lead to issues on an x64 machine. This is due to the
attempt by MS to support both x32 and x64 programs on the same system. In
short if the program you want (such as Telnet) doesn't have both images you
can be in trouble. I use the following code to call telnet (after copying
the telnet exe file from the windows 32 directory to the 64bit directory
(that's also not a support fix)).
al
'
'
'
Public Sub TelnetToTarget(ByRef visWin As Visio.Window, _
ByVal strShape As String)
On Error GoTo ErrHandler
Dim visPage As Visio.Page
Dim visShapes As Visio.Shapes
Dim visShape As Visio.Shape
Dim visCell As Visio.Cell
Dim shellWin As Object
Dim strCommand As String
strCommand = "c:\windows\system32\telnet "
Set visPage = visWin.Page
Set visShapes = visPage.Shapes
Set visShape = visShapes.Item(strShape)
' can we determine the rules appropriate
' if there get ip address if not get out
If visShape.CellExists("prop.compIpAddress", False)
Then
Set visCell =
visShape.Cells("prop.compIpAddress")
strCommand = strCommand & visCell.ResultStr("")
Else
MsgBox ("couldn’t find compIpAddress custom
property")
Exit Sub
End If
' create the script shell environment
Set shellWin = CreateObject("wscript.shell")
' now execute the command that we built
'Debug.Print "shellwin start"
DoEvents
shellWin.Run strCommand
DoEvents
Exit Sub
ShellCommand:
'Debug.Print "shell start"
Shell strCommand, vbNormalFocus
'Debug.Print "shell start"
DoEvents
Exit Sub
ErrHandler:
Dim myErr As ErrObject
Set myErr = Err
If Err.Number = -2147024894 Then
Debug.Print "shellwin failed"
GoTo ShellCommand
End If
Debug.Print "telnet " & Err.Description
End Sub