Can I run Win32 API functions in a VBScript?

I'm having NT4.0 clients only connected to my intranet, and would like to use the API-function "GetUserName". If this is not possible, is there another way to retrieve the clients logonID?

Regards,

John Martin

Sun, 11 May 2003 03:00:00 GMT

Michael Harri#2 / 3

Can I run Win32 API functions in a VBScript?

Client side or server side???

If server side AND you use authentication (disallow anonymous) then use Request.ServerVariables("AUTH_USER") on the server elseIf client side then you have to get users to allow use of "unsafe" (from the browser's perspective) activex components (WScript.Network). else you're outta luck! end if

end reply!

-- Michael Harris Microsoft.MVP.Scripting --

Please do not email questions - post them to the newsgroup... --

Quote:

> I'm having NT4.0 clients only connected to my intranet, and would like to > use the API-function "GetUserName". If this is not possible, is there > another way to retrieve the clients logonID?

> Regards,

> John Martin

Mon, 12 May 2003 03:00:00 GMT

Matt#3 / 3

Can I run Win32 API functions in a VBScript?

I'm pretty sure you can use api calls in VBScript, but you certainly don't need to if you're just trying to get the logon id.

http://msdn.microsoft.com/scripting

wshnetwork.userdomain wshnetwork.username.

-Matt.

Quote:

> I'm having NT4.0 clients only connected to my intranet, and would like to > use the API-function "GetUserName". If this is not possible, is there > another way to retrieve the clients logonID?