Jump to content

Users Accounts


Recommended Posts

Hi everyone...

In my project the first front panel is to choose the account if it is administrator or client;

If it's an administrator it will lead to a fnother front panel (with control and supervisory),

If it's a client it will lead to the same front panel but with less permission (with supevisory only)...

So how can I do this ??

Link to comment

The user accounts on a system can be read from the registry (stored here: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList)

The easiest way is to extract them from the ProfileImagePath string value in each 'profile' key.

The current (logged on) user can be retreived using the Advapi32.dll exported function GetUserNameA, or use the Application\Username property node.

I'm not sure how to get the permissions

QUOTE(sara @ Feb 13 2008, 10:21 AM)

Hi everyone...

In my project the first front panel is to choose the account if it is administrator or client;

If it's an administrator it will lead to a fnother front panel (with control and supervisory),

If it's a client it will lead to the same front panel but with less permission (with supevisory only)...

So how can I do this ??

Link to comment

QUOTE(Dirk J. @ Feb 13 2008, 09:55 AM)

The user accounts on a system can be read from the registry (stored here: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList)

The easiest way is to extract them from the ProfileImagePath string value in each 'profile' key.

The current (logged on) user can be retreived using the Advapi32.dll exported function GetUserNameA, or use the Application\Username property node.

I'm not sure how to get the permissions

Thanks for your replying..

But really I don't understand what are you want to say, So can you please give me an example for it

Thanks

Link to comment

QUOTE(Dirk J. @ Feb 13 2008, 04:55 AM)

The user accounts on a system can be read from the registry (stored here: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList) The easiest way is to extract them from the ProfileImagePath string value in each 'profile' key.

I agree with Dirk J. - you shoudn't code this unless you need to. Use the logged on user from Windows securtiy (use the LabVIEW "Read Registry Key" VI, or look at LabVIEW DSC - it has user managmenet built in. Also, if you're using TestStand, that has it biult in too.

Link to comment

QUOTE(crelf @ Feb 13 2008, 07:35 PM)

...but only if you have the option checked in LabVIEW for it to use the OS logon for app.user (which is on by default, so it's pretty safe).

True, but App.User is platform independant and could be used on Macs/Linux machines as well.

Perhaps it will also work on Vista :P

/J

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.