0%

windows应用UWP无法使用系统代理

UWP应用是类似于沙盒应用,无法使用系统的代理,如果想要用google登陆UWP应用,会由于无法使用系统搭理而代理登陆失败。

解决方法

把下面这段代码复制到记事本中,后缀名改成.vbs,然后双击运行

1
2
3
4
5
6
7
8
9
10
Set ws = WScript.CreateObject("wscript.shell")  
app = ws.ExpandEnvironmentStrings("%USERPROFILE%\AppData\Local\Packages")
Set fso = WScript.CreateObject("scripting.filesystemobject")
Set fs = fso.GetFolder(app).SubFolders
Set bat = fso.createtextfile(ws.ExpandEnvironmentStrings("%TEMP%\WindowsAppProxyAccess.bat"))
For Each f In fs
bat.WriteLine ("CheckNetIsolation.exe LoopbackExempt -a -n=" & f.name)
Next
bat.WriteLine ("del %0")
CreateObject("Shell.Application").ShellExecute ws.ExpandEnvironmentStrings("%TEMP%\WindowsAppProxyAccess.bat"),"","","runas",1