update: window.navigator should be a property you can overwrite via IDispatchEx (IExpando on the CLR runtime wrapper) in Javascript.
something like
var document=webBrowser1.Document.DomDocument as MSHTML.IHTMLDocument2;
var expando =(IExpando)document.parentWindow;
expando.RemoveProperty(expando.GetMember("navigator",BindingFlags.Instance | BindingFlags.Public));
expando.AddProperty("navigator").SetValue(expando,myNavigator);
here myNavigator is a variable of a COM visible type that has an appName property.
not working:
pinvoke UrlMkSetSessionOption and pass URLMON_OPTION_USERAGENT as the option flag.