且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在访问中使用Windows用户名和密码

更新时间:2023-01-02 11:30:37

有一种检查用户窗口的方法登录ID,但不是他们的密码(据我所知),但我不认为这是一个问题,因为PC通过登录到PC来处理密码验证。


过去我使用过这样的函数:
There is a way of checking a users windows Log On ID, but not their password (as far as I know), but I wouldn''t see this as an issue since the PC took care of password verification by the fact that they are logged in to the PC.

In the past I used a function like this:
展开 | 选择 | Wrap | 行号


快速劫持,


之前使用Environ,值得一提的是AFAIK它只返回本地登录,


您提供的其他功能是否会查找Active Directory网络名称(这值得我这么做)?
Just a quick hijack,

Used Environ before, worth mentioning that AFAIK it returns only the local logon,

does the other function you give look for the Active Directory network name (this would be worth my while)?


@ Dan2kx


我会把它作为上面代码的澄清,而不是劫持。 =)

据我所知,这个函数只返回本地登录ID,但我从来没有需要任何比这个ID更多的东西。


P.S.我们有使用像 AFAIK 这样的简短手牌的规则,我相信你知道,但我必须抬头查找它意味着据我所知,我一定不能接受与lingo =)约会,但我认为它与你的问题有关。没有伤害,没有犯规,只是一个FYI。


-AJ
@Dan2kx
I''ll take this as a clarification of my code above, not a hijack. =)
As far as I know, this function only returns the local logon ID, but I have never needed anything more than that ID.

P.S. We have rules against using short hand like AFAIK which I am sure you know, but i had to look up just to find out it means "As Far As I Know", I must not be up to date with the lingo =), but i thought it was relative to your question. No harm, no foul, just an FYI.

-AJ