让 .NET 应用程序成为唯一可以运行的程序?
使 Windows .NET 应用程序成为唯一可以在计算机上使用的程序的最佳方法是什么? 我遇到过计时器或事件将窗口切换回具有匹配文本的窗口以及一些 api32 调用以将表单置于最顶层。
是否有可能制作一个像 Windows 锁屏这样除了屏幕上显示的内容之外什么都不能做的应用程序?我想阻止用户执行其他操作,只允许管理员访问桌面。
What would be the best way to make a Windows .NET application be the only program that can be used on a computer?
I have come across timers or events to switch windows back to a window with matching text and some api32 calls to make a form top most.
Is it possible to make an application like the windows lock screen where nothing can be done except that what is on screen? I want to block users from doing other things and only let administrators get to the desktop.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您需要在 kiosk 模式下运行应用程序。
外部方法
常量
方法
禁用热键
隐藏任务栏
示例表单在信息亭模式
您可以查看以下文章:
http://www.c-sharpcorner.com/UploadFile/scottlysle/KioskCS01292008011606AM /KioskCS.aspx
以下是一些可供研究的打包软件:
http://www.kioware.com/productoverview.aspx?source=google& ;gclid=CPeQyrzz8qsCFZFV7Aod6noeMw
You need to run your application in kiosk mode.
External methods
Constants
Methods
Disable hot keys
Hide the taskbar
Example form in kiosk mode
Here's an article you can check out:
http://www.c-sharpcorner.com/UploadFile/scottlysle/KioskCS01292008011606AM/KioskCS.aspx
Here's some packaged software to look into:
http://www.kioware.com/productoverview.aspx?source=google&gclid=CPeQyrzz8qsCFZFV7Aod6noeMw
如果您的目的是永久阻止指定用户的此行为,您可以通过适当的组策略进行管理。
例如,在本地组策略编辑器(开始菜单 →
gpedit.msc
)中,转到本地计算机策略 → 用户配置 → 管理模板 → 系统。您会发现两个选项:当然,您必须对组策略进行精细管理,以限制指定用户的其他操作,防止更改配置、重新启动计算机等等,您还必须让您的应用程序通过键盘挂钩阻止特殊键。
请记住:不要仅依赖挂钩、全屏模式和其他阻止用户离开应用程序的东西。如果您这样做,有一天您的应用程序将崩溃,从而使用户可以无限制地访问底层操作系统、文件系统等。
If your intent is to block this permanently for a specified user, you can manage this through appropriate group policies.
For example in Local Group Policy Editor (Start menu →
gpedit.msc
), go to Local Computer Policy → User Configuration → Administrative Templates → System. You'll find two options:Of course, you have to do fine management of group policy to restrict other things for a specified user, preventing to change the configuration, to reboot the machine, etc. and you also have to make your application blocking special keys through keyboard hooks.
Remember: don't rely only on hooks, full screen mode and other things preventing the user from getting outside your application. If you do it, one day your application will crash, giving to the user the unlimited access to the underlying operating system, file system, etc.
我找到了一种更简单的方法来做到这一点,不使用 kiosk 模式或 gpedits 或任何类似的东西。
在我的应用程序中,我用这两个非常简单的东西制作了一个按钮 - 没有问题!
我使用 shell.cmd 启动一个单击一次应用程序 appref-ms,它很有魅力。
观看我的软件启动,就像它拥有 Windows 一样!
想了解更多它在完整 apscect 中的工作原理吗?
I found a much simpler way to do this not using kiosk mode or gpedits or any things like that.
In my application I made a button with these two damn simple things- no questions asked!
I used shell.cmd to start a click once application ,appref-ms and it works a charm.
Watch my software boot as if it owns windows!
Want to understand more how it works in the full apscect?