Search code examples
c#internet-explorer-8webbrowser-controlwatinuser-agent

Change User Agent


I am using Watin and i want to change User Agent can it be done in watin c#.Some websites say it is done by changing registries and some say that IE8 has addon to change that but i want to change it by programming


Solution

  • From your last comment I am not sure if you are familiar with registry classes. Here are some tutorials on accessing and modifying registry.

    Then you need to modify HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\User Agent key.

    You can find detailed explanation about user agent string at msdn.

    You can test your user agent string at useragentstrings

    You can find list of user agent string here.

    Here's a small guide on changing user agent string at pctools.