PASSPORT Knowledge Base
Macros

Date Published: December 10, 2008

Title

Startup Macro to Pass Domain User Name to Host

Product

PASSPORT PC to Host, PASSPORT Web to Host

Emulation Types

TN3270, TN5250, VT, SCO ANSI, Wyse 60

Issue

I have a Visual Basic Application that detects domain user(s) names.  I would like to pass the domain user name to the host at startup so that the user(s) do not have to authenticate twice.  How can this be done with PASSPORT?

Solution

Configure the sample macro (.zmc) below as a startup macro to pass the domain user name to the host at startup:

 

Sub ZMain()

Dim Text, ret, objNet, userid

 

'Create the Wscript Network object

Set objNet = CreateObject("WScript.NetWork")

 

'Send the domain user name to the host

    SendHostKeys objNet.UserName

    SendHostKeys ("<ENTER>")

    WaitForNoX 10

 

'Destroy the Object to free the Memory

Set objNet = Nothing

 

End Sub

More Information

Configure Session to Automatically Run a Macro

Keywords

detects, user, name, pass, domain, host, startup