调用Windows安全对话框(C#或VB.NET) [英] Invoking the Windows Security Dialog (in C# or VB.NET)

查看:175
本文介绍了调用Windows安全对话框(C#或VB.NET)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,首先第一件事情这个问题难倒我了大约一个星期,我很想工作的答案!

我会想知道如何调用Windows安全对话框(按Ctrl + Alt + Del在Windows工作站上的注:我不想在任务管理器的)。编程

I would like to know how to invoke the Windows Security Dialog (press ctrl+alt+del on a windows workstation NOTE: i dont want the task manager!) programatically.

在一个XP工作站,不用担心的Win7或Vista

ON AN XP WORKSTATION, don't worry about Win7 or Vista

在理想情况下,在C#(或者如果必须VB.NET)一个简单的例子

Ideally with a quick example in C# (or VB.NET if you must)

香港专业教育学院搜查了许多DLL的如的msgina.dll ,我找不到它的任何地方!

Ive searched many of the DLL's such as msgina.dll and i can't find it anywhere!

另外只需调用更改密码的屏幕将是不错!

Alternatively Just invoking the change password screen would be nice!

提前感谢互联网络

推荐答案

安全功能可能会站在你的方式,通过编程方式管理与安全相关的功能,如安全性对话框<大骨节病>控制 <大骨节病>替代 <大骨节病>删除。我已经运行到了同样的问题。

Security features might be standing in your way to programmatically manage security-related features like Security Dialog through CtrlAltDel. I've been running into the same kinds of problems.

关于你的请求来调用的密码更改对话框

About your request to invoke password change dialog.

设计成一个网络[和本地]上表示和管理最终用户帐户。

如果你发现自己短的解决方案,您可能会自己动手快的Windows窗体与密码字段,并在窗口的 IADsUser接口 使用WinNT提供程序来绑定到本地(而不是网络)的XP计算机上的用户帐户

If you find yourself short on solutions, you might whip up your own quick Windows form with password fields and communicate with the Windows IADsUser Interface using the WinNT provider to bind to a local (instead of network) user account on the XP machine.

GetObject("WinNT://MYCOMPUTER/jeffsmith,user") //WinNT provider

...并使用的ChangePassword(..)方法 (链接到代码示例)。

... and use the ChangePassword(..) method (links to code sample).

usr.ChangePassword szOldPass, szNewPass

如果你试图调用Windows的功能,直接导致用户信任的过程,然后承认一个自定义窗体为更改密码可能看起来有点愚蠢。

If you're trying to invoke the Windows features directly to cause the user to trust the process then admittedly a custom form for changing a password might look a bit goofy.

另一种途径,你可以尝试在命令行编程调用的Rundll32.exe和定位正确赢DLL,弹出密码更改对话框。一个论坛上表示,在XP下面的作品如果没有安装SP2。因为我在Vista上我不能对它进行测试。

Another avenue you might try is programmatically invoking RunDLL32.exe at the command line and targeting the correct Win DLL to bring up the password change dialog box. One forum said the following works in XP if SP2 isn't installed. I can't test it because I'm on Vista.

rundll32.exe shell32.dll,Control_RunDLL password.cpl

您可以的谷歌的许多,然而它似乎要拿出短尽可能更改密码或调用Windows安全对话框。

You can Google for many of these, however it does seem to come up short as far as changing the password or invoking Windows security dialog.

微软的有关信息Run32Dll

这篇关于调用Windows安全对话框(C#或VB.NET)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆