C#Windows安全中心设置 [英] C# Windows Security Center Settings

查看:386
本文介绍了C#Windows安全中心设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在Windows中禁用行动中心的消息。我知道那里的注册表保存值这些检查,但这些都是该机的具体。我知道我可以禁用完整的服务。但我不希望禁用的服务,我只是想不显示通知/警报/消息。

I would like to disable the Action Center messages in Windows. I know where the registry holds the values for these checks but those are machine specific. And I know that I can disable the complete service. But I do not want to disable the service, I only want to not show the notifications/alerts/messages.

要查看这些选项我谈论转到:CMD.EXE - > RUNDLL32.EXE SHELL32.DLL,Control_RunDLL wscui.cpl

To see these options I am talking about goto: cmd.exe -> RunDll32.exe shell32.dll,Control_RunDLL wscui.cpl

安全中心将启动,并单击左侧的更改操作中心设置。

The security center will be started and click on the left on "Change Action Center settings".

现在我有C:\\ WINDOWS \\ SYSTEM32 \\ wscui.cpl引用我的C#项目,并添加

Now I have referenced "C:\Windows\System32\wscui.cpl" in my C# project and added

using SecurityCenterAdmin;

我看我可以创建该对象

I see I can create this object

SecurityCenterAdmin.WscAdmin admin = new WscAdmin();
admin.DoModalSecurityAction();

不过,我可以找到关于它的任何引用。搜索在谷歌WscAdmin MSDN或SecurityCenterAdmin产生任何结果。

But I can find no references about it. Searching on Google for "WscAdmin msdn" or "SecurityCenterAdmin" yields no results.

任何提示?

在此先感谢。
迈克

Thanks in advance. Mike

推荐答案

如果你不愿意去通过适当的渠道来获得访问API(wscisv@microsoft.com)。你总是可以尝试机器人婷的过程。

If you're unwilling to go through the proper channels to get access to the API (wscisv@microsoft.com). You can always try robot-ting the process.

  • Use Process.Start to open the action center, you seem to already have the command line "RunDll32.exe shell32.dll,Control_RunDLL wscui.cpl".
  • Use the FindWindow and FindWindowEx API functions to get window and control handles. http://msdn.microsoft.com/en-us/library/windows/desktop/ms633499%28v=vs.85%29.aspx You'll want to make use of the "Microsoft SPY++" Windows SDK tool for getting class names etc.
  • Use the SendMessage API to simulate mouse messages to the window/controls http://msdn.microsoft.com/en-us/library/windows/desktop/ms644950%28v=vs.85%29.aspx WM_LBUTTONDOWN, WM_LBUTTONUP, WM_MOUSEMOVE etc etc. Using SPY++ will also help with this process.

如果你这样做是没有正确通知用户的情况那么你的软件是pretty黑幕 - maleware。我能看到的实际用途,作为内部程序的公司可能会使用快速配置独立的台式机或东西​​,但它的确是一个舒展。

If you're doing this without properly notifying the user then your software is pretty shady - maleware. I could see practical uses, as an internal program your company may use to quickly configure stand alone desktops or something, but it's really a stretch.

这篇关于C#Windows安全中心设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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