Paramu


Hi There,

Well.

Actually I want to give Authentication rights for users to access my program accrding to their login...

Suppose one user will log on different places of desktops...So I need to identify his system..means which user is currently sitting on which system..

For that I need to identify the system name or any ID ...And another thing is ..some systems they are using the administrator name in general manner...So I need to know any System No...like that anything available...

Please..anyone to help me

by PARAMU





Re: How To Findout Users System in VFP?

dni


You may store in a variable var1:

var1 = SYS(0)

var1 will be a string like: string1#string2 ,where:

string1 = machine name

string2 = user name







Re: How To Findout Users System in VFP?

Markish

Hi,

The following code will give you the serial number

Code Snippet

oWMI = getobject("winmgmts:")

ocs=oWMI.InstancesOf("Win32_OperatingSystem")

for each oinfo in ocs

oinfo.SerialNumber

next

the following code should give you the current logged in username

Code Snippet

oWMI = getobject("winmgmts:")

ocs=oWMI.InstancesOf("Win32_UserAccount")

for each oinfo in ocs

oinfo.Username

next

I think this will help you solve your problem.

Best regards,

Markish







Re: How To Findout Users System in VFP?

Paramu

Thanks For Both Response