PowerBuilder Function Get Domain UserName ComputerName Using VBScipt gf_get_domain_and_username_and_computername
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
// Function Name : gf_get_domain_and_username_and_computername // Argument Name : as_Domain, Arg Type : string, Pass By : Reference // as_UserName, Arg Type : string, Pass By : Reference // as_ComputerName, Arg Type : string, Pass By : Reference // Return Type : (None) Integer li_connect OleObject ole_wsh ole_wsh = Create OleObject li_connect = ole_wsh.ConnectToNewObject("WScript.Network") If li_connect = 0 Then as_Domain = ole_wsh.UserDomain as_UserName = ole_wsh.UserName as_ComputerName = ole_wsh.computername End If |
Good Luck!
Subscribe
Login
0 Comments
Oldest