gpt4 book ai didi

c# - "This file came from another computer and might be blocked to protect this computer."- 如何以编程方式在 C# .net 中删除此属性?

转载 作者:可可西里 更新时间:2023-11-01 14:37:48 26 4
gpt4 key购买 nike

<分区>

我用 C# 编写了一个程序。如果用户勾选此框,它会将自身复制到启动。

应用程序使用注册表项“SOFTWARE\Microsoft\Windows\CurrentVersion\Run”将自身添加到启动。

它工作正常,除了每次重新启动机器时都会提示用户是否确定要运行该程序,因为它被 Windows 阻止,因为它“来自另一台计算机”。

有什么方法可以通过代码摆脱这个 Windows“已阻止”标志,以便每次程序尝试自行运行时都不会提示用户?

谢谢

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com