How to change home page in Internet Explorer using C#?

后端 未结 5 1811
感情败类
感情败类 2021-01-13 08:28

Is it possible to change home page in Internet Explorer in C# application? Solution for other browsers (Firefox, Chrome) would be also nice.

5条回答
  •  北荒
    北荒 (楼主)
    2021-01-13 08:40

    IE: edit the registery key HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\Start Page

    Firefox: find the settings in the profile folder (you will need to parse the file)

    Chrome: find the default 'homepage' setting in the preferences file: C:\Users\%USERNAME%/AppData\AppData\Local\Google\Chrome\User Data\Default

    For the registry use the .NET RegistryKey class. For the files you will need to parse the files and modify them.

提交回复
热议问题