将安装好的酷狗拷贝到C:\data目录中
1.创建桌面快捷方式
QFile::link("C:/data/KuGou.exe", QStandardPaths::writableLocation(QStandardPaths::DesktopLocation).append("/").append("KuGou.lnk"));
2.创建开始菜单快捷方式
QString startMenuPath=QStandardPaths::writableLocation(QStandardPaths::ApplicationsLocation).append("/").append(QStringLiteral("酷狗"));
QDir dir(startMenuPath);
if(!dir.exists())
{
dir.mkdir(startMenuPath);
}
if(dir.exists())
{
QFile::link("C:/data/KuGou.exe", startMenuPath.append("/").append("KuGou.lnk"));
}
3.将快捷方式锁定到任务栏
Win7、Win8有效
//快捷方