Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Login name and SYS(0) different
Message
De
19/10/2012 14:54:23
Al Doman (En ligne)
M3 Enterprises Inc.
North Vancouver, Colombie Britannique, Canada
 
 
À
19/10/2012 11:09:30
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:
01555365
Vues:
65
>>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.
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform