Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Login name and SYS(0) different
Message
De
22/10/2012 13:16:28
 
 
À
19/10/2012 14:54:23
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Divers
Thread ID:
01555309
Message ID:
01555472
Vues:
74
>>>As far as I know sys(0) returns "computername#username".
>>>
>>>
>>> cComputerUser = Sys    (0)
>>> cComputer     = Left   (cComputerUser, At ("#", cComputerUser) - 2)
>>> cUser         = Substr (cComputerUser, At ("#", cComputerUser) + 1)
>>>
>>> MessageBox ("ComputerName: " + cComputer + " User Name: " + cUser)
>>>
>>
>>This much I do know. The problem is that the SYS(0) is NOT returning the current logged on user, but the user name that was assigned when the OS was installed.
>
>Maybe you (or someone else) changed the user name from "User" to whatever it is now:
>
>http://answers.microsoft.com/en-us/windows/forum/windows_7-security/how-to-change-user-name-in-windows-7-professional/d95ddaa7-4235-454e-83d6-77232207c7e2
>
>A name change is cosmetic, a lot of underlying stuff doesn't get changed. If SYS(0) is relying on something that doesn't get changed, that might explain what you're seeing.

Thanks for tips.
Greg Reichert
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform