我正在尝试以当前登录用户以外的其他用户身份运行WPF WebBrowser(使用Powershell Start-Process -FilePath "app.exe" -Credentials xxx
。不幸的是,某些网站无法正常运行,例如Microsoft支持页面-https://support.microsoft.com/en-us/help/923196/you-receive-an-error-message-that-states-that-you-do-not-have-the-most。
问题是,这些页面没有完全加载-我遇到了"Script Error"
或"An internal error occurred in Microsoft Internet Extensions"
例外,并且页面仍然空白(仅加载了部分网站源代码)。有人知道发生了什么吗?是否有什么应该在WebBrowser中配置的,以便在其他用户处运行?
复制步骤:
1) Create simple WPF app and add WebBrowser control to it.
2) Run app using "Start-Process" using powershell or "runas" using cmd as other
user than currently logged in and navigate to
https://support.microsoft.com/en-us/help/923196/you-receive-an-error-message-that-states-that-you-do-not-have-the-most
3) Issue occured
关于, Hawex
答案 0 :(得分:0)
我发现,解决此问题的方法很简单-只需在-LoadUserProfile
或powershell
的{{1}}中添加/noprofile
自变量。