Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Identifying a machine
Message
From
17/12/2010 05:02:34
 
 
To
17/12/2010 04:23:04
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01492926
Message ID:
01493046
Views:
66
On my Win7 machine with 2 physical NICs and VirtualBox installed, IPCONFIG /ALL reports 7 "adapters", the 3 mentioned plus 4 tunnel adapters. When I run the code referenced in the message below I do get the MAC address of the 2nd physical adapter, which is not the one in use. So, that code may need to be enhanced to ensure it doesn't return the MAC address of a virtual or tunneling adapter, which could change.

Also, if the adapter is discrete and gets replaced with a different part, the MAC address will change.

>If you need to identify the physical machine, you can check for the network card's serial number. Check Message ID: 1078322.
>
>>>Ah ok, Many thanks,
>>
>>Would it then be possible for an ordinary user to change the machine name & ulimately change the access of the machine?
>>
>>I presume if the logged on use doesnt Administrator rights they cant change the computer name?
>>
>>>
>>>>Someone already pointed out that the first part of SYS( 0 ) returns the machine (NetBIOS) name.
>>>>
>>>>>Thanks for that, I was hoping to just pick a machine name or whatever, it needs to be guided by the actual physical machine IE one machine in CANNING is able to CAN TAB, a mching in weighing is able to amend WEIGHTING TAB.
>>>>>
>>>>>>>I have an application where I want to grant access to certain menu options depending on which machine it is on a network.
>>>>>>>
>>>>>>>Whats the best way to achieve this?
>>>>>>>
>>>>>>>I want a supervisor to be able to say MACHINE X in CANNING has access to the CANNING TAB for example or
>>>>>>>machine Y is an administrator in the office so has full access to all of the programs.
>>>>>>>
>>>>>>>Is the easiest way to detect the current users login name?
>>>>>>
>>>>>>You've got answers to that - but if you want a 'supervisor' to control this externally you should maybe assign rights to windows *groups* and let the supervisor control which users belong to a specific group. Would be a doddle in .NET but I'm not sure how you would do this in VFP beyond the fact that you'd need the WINAPI CheckMembershipToken function....
>>>>>>
>>>>>>UPDATE: Found this from Sergey: http://www.berezniker.com/content/pages/visual-foxpro/-user-member-administrators-group
>>>>>>but it's working with a built-in role whereas you would need to specify the role.....
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
Previous
Reply
Map
View

Click here to load this message in the networking platform