1.命令行:
rem 火狐;
:"C:\Program Files\Mozilla Firefox\firefox.exe" www.baidu.com
start firefox www.baidu.com
pause
rem Edge;
start explorer http://www.baidu.com
pause
rem ie浏览器;
start iexplore http://www.baidu.com
pause
rem 谷歌浏览器;
start chrome www.baidu.com
pause
2.找注册表中的路径
ChromeHTML,IE.HTTPS,FirefoxHTML,360seURL
#include <QProcess>
#include <QDebug>
#include <Windows.h>
#include <QSettings>
#include <QDesktopServices>
#include <QUrl>
#include <windows.h>
QString FindWebBrouseExeStr(const QString &strWebType)
{
QSettings settings2(QString("HKEY_CLASSES_ROOT\\%1\\shell\\open\\command\\").arg(strWebType), QSettings::NativeFormat);
QString FilePath = settings2.value("Default", "").toString();
in