On 11/11/07, Mark Villa <iseries.4.me@xxxxxxxxx> wrote:
Imagine that you can not use Microsoft products - or rather you want
to do this as generic as possible. A call to "C" then possibly going

There's the Environment Variable %USERNAME%, which seems to be pretty
generic to me as a way to retrieve the current username. Getting the
current username is always operating system specific.

to 'Netapi32.dll' is required. I am leaning toward getting current
office user.

Office doesn't authenticate users.

I was just looking for a registry entry I could rely on

The registry is for storing configuration information, not usernames.

as a simple implementation - I think the actual logon is encrypted
number that decodes to the current user.

Yes and No. Internally, Windows uses a SID (Security Identifier) to
identify the user.
This number looks like this:

S-1-5-12-7623811015-3361044348-030300820-1013

It can be resolved to a human readable username. It's actually more or
less the same as the Unix UID system, which just uses integers to keep
track of a user (e.G. root has Uid 0, and everyone else is just a
normal users - by convention, some Unix variants use UID 1 - 999 for
system users, and everything starting from 1000 are actual users).

i5/OS is different here - it uses actual profile name as an identifier
throughout the OS. This has several disadvantages, though:

* Restricts length of username to 10 chars
* Users cannot be renamed

Still, it would help if you could say what you actually want to achieve...


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.