autoitaddicted Posted April 18, 2012 Share Posted April 18, 2012 Normally, i am using that code for enabling compatibly mode in IE: $wshNetwork = ObjCreate("WScript.Network") $struser = $wshNetwork.Username $objWMIService = ObjGet("winmgmts:\\.\root\cimv2") $objAccount = $objWMIService.Get('Win32_UserAccount.Name="' & $struser & '",Domain="' & @ComputerName & '"') $uyumluluk = RegRead("HKU\" & $objAccount.SID & "\Software\Microsoft\Internet Explorer\BrowserEmulation\", "AllSitesCompatibilityMode") It works perfect with english chars but If there is special chars like "-" or "öçğü" in variables, ($struser and @ComputerName), script gives this error: The requested action with this object has failed.: $objAccount = $objWMIService.Get('Win32_UserAccount.Name="' & $struser & '",Domain="' & @ComputerName & '"') $objAccount = $objWMIService.Get('Win32_UserAccount.Name="' & $struser & '",Domain="' & @ComputerName & '"')^ ERROR How to solve this problem ? Link to comment Share on other sites More sharing options...
autoitaddicted Posted April 18, 2012 Author Share Posted April 18, 2012 any ideas ? Link to comment Share on other sites More sharing options...
Zedna Posted April 18, 2012 Share Posted April 18, 2012 (edited) Use COM error handler to get exact error description. Search helpfile/forum for details/examples ... Edited April 18, 2012 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now