I'm doing this with the new MapXtreme and ASP.NET, and I'm sure it would be
possible with VB.NET or even C#.NET or other windows programming .NET
language.
For those that might be considering (or are already) getting away from
MapBasic, since with the next release of MI Pro MapBasic won't be supported
any longer..... here's what I've done in .NET:
Public Function GetUserName()
Dim logonStr() As String
On Error Resume Next
If InStr(Request.ServerVariables("LOGON_USER"), "\") > 0 Then
logonStr = Split(Request.ServerVariables("LOGON_USER"), "\")
Else
logonStr = Split(Request.ServerVariables("LOGON_USER"), "/")
End If
If logonStr(1) = "" Then
GetUserName = logonStr(0)
Else
If logonStr(0) = "" Then
Response.Redirect(Application("URL") + "notondomain.asp")
Else
GetUserName = logonStr(1)
End If
End If
Err.Clear()
End Function
Have fun!
Eric D
-----Original Message-----
From: Gilbert, Antoine [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 09, 2004 2:52 PM
To: [EMAIL PROTECTED]
Subject: MI-L %USERPROFILE%
How i could retrieve that value of a windows os from a mapbasic application
this is the directory of the user
ex on my winxp os: %USERPROFILE%=C:\Documents and Settings\agilbert
i guess i will have to use some call to system dll
Antoine
----------------------------------------
Ma bo�te aux lettres est prot�g�e par SPAMfighter
6776 e-mails spam ont �t� bloqu�s jusqu'� maintenant.
T�l�chargez au jour d'hui gratuitement SPAMfighter!
---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 12107
---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 12123