C#写小程序来配置internet setting的代理服务器enable/disable.

janeyjian 2009-12-07 10:07:26
因为要频繁enbable/disable代理服务器, 所以想写个小程序...要怎么写啊? 谢谢!
...全文
43 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
蒋晟 2009-12-07
  • 打赏
  • 举报
回复
改全局的还是当前进程的代理设置?
全局的用InternetSetOptionEx当前进程的用UrlMkSetSessionOption
5.36 is now RTM! NEW/IMPROVED: There's now a built-in interactive RegEx utility! Press Ctrl+Shift+F1, or choose the option on the Help menu. The utility is implemented as a LINQPad script - click on the built-in samples to view. LINQPad now includes a set of HTML controls for writing interactive queries. Unlike WPF and Windows Forms controls, these render in the same output panel as your results. To use them, just instantiate and dump them: // All the controls live in the LINQPad.Controls namespace. var txt = new TextBox().Dump(); txt.TextInput += (sender, args) => $"You typed {txt.Text}".Dump(); Click here for an interactive tutorial. The NuGet search engine now recognizes SemVer2 prerelease packages, and uses a new faster API. You can now reference NuGet packages that include only native DLLs, such as Microsoft.ChakraCore. To invoke the native methods, set the query type to 'C# Program' and declare the methods that you want to call prefixed with the appropriate DllImport attributes. LINQPad now identifies NuGet packages with duplicate extension attributes in Content_Types.xml, and automatically removes the duplicates so that the package loader will not throw an InvalidOperationException. C# 7.3 is now supported. When connecting to SQL Azure, you can now opt for Universal Active Directory authentication, with support for multi-factor authentication. There are new methods in LINQPad's Util class to load/save strings or byte arrays to a central machine store (shared between queries). These methods are Util.SaveString, Util.SaveBytes, Util.LoadString, and Util.LoadBytes. LINQPad's embedded ILSpy has now been updated to V4. You can now enable or disable compiler optimizations on a per-query basis, by starting your query with the following code: #LINQPad optimize+ // To force optimizations on for this query #LINQPad optimize- // To force optimizations off for this query In the SQL connection dialog, when you choose the 'Display all databases in TreeView' opt

111,121

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Creator Browser
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧