This is a windows login script ... I'm not sure what the technical wording is nor do I know about the sync or async.
But you go into group policies to tell it to run this script as a login script.

Here is a snippet: look for %CLIENTNAME%


Code:

$connection = createobject("adodb.connection")

$ConnDSN = "DRIVER={MySQL ODBC 3.51 Driver};SERVER=172.16.1.183;DATABASE=ncives;USER=webadmin;PASSWORD=webadmin;";OPTION=3;"

$= $connection.open($connDSN)

? @SERROR


$rs = $connection.execute("SELECT workst.wSid FROM workst WHERE workst.pcName = '" + %CLIENTNAME% + "'")

? @SERROR