Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Current login username
Message
De
08/02/2006 18:26:04
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01094665
Message ID:
01094821
Vues:
12
This may be a long shot. But if you are looking to retreive the user name that is also used in the "Documents and Settings" folder, then try this. It parses the user name out of a path that contains that user name.
? GETWORDNUM(HOME(7),3,"\")
>Did not work. "loUsers" did not return nothing and "crashed".
>
>Let me explain more: the user may have changed it's original account name only.
>Example: To simulate the trouble at my end, the account was created with Steve but changed to Steve1. The folder Steve in Documents and Settings still exist and all info point to it and it's ok. It's just the Login Username(Steve1) that have change. It could had been renamed has Bob or Mike instead of creating a new account. I have no control on that last part.
>
>
>
>>Hi Steve,
>>
>>Not sure exactly what you want, what about this:
>>
>>
>>clear
>>loLDAP			= Getobject('Winmgmts://./root/directory/ldap')
>>loUsers			= loLDAP.ExecQuery('Select * from ds_user where ds_SAMAccountName="' + Getenv("USERNAME") + '"')
>>
>>for each loUser in loUsers
>>	? loUser.ds_name, loUser.ds_SAMAccountName
>>endfor
>>
Greg Reichert
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform