How set a website as homepage in IE, Firefox, Chrome and Safari with C++?

后端 未结 3 1521
栀梦
栀梦 2021-01-07 15:58

Is there a way to set a website like google.com as homepage through C++ or C ? How ?

3条回答
  •  悲哀的现实
    2021-01-07 16:24

    Yes.

    Find the way each browser saves its configuration to disk and edit that (*). It may be a file, or records in a database, or some data in a central registry, or some other scheme --- the browser documentation should tell you.

    To open/read/write/save/close a file, the C functions declared in the header may be helpful.

    (*) for Firefox it's a file named "prefs.ini" in a directory somewhere under the users home path; there may be more than 1 such file if the user has more than 1 profile.

提交回复
热议问题