在Inno Setup中创建快捷方式来执行带有命令行参数的程序 [英] Creating a shortcut to execute a program with command-line parameters in Inno Setup

查看:479
本文介绍了在Inno Setup中创建快捷方式来执行带有命令行参数的程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到问题,正在为程序进行自定义安装,原始安装程序在桌面上创建了一个快捷方式,该快捷方式的目标如下:

I have a problem and I am doing a custom installer for a program, the original installer program creates a shortcut on the desktop and the target of the shortcut is the following:

"C:\Program Files\Soft name\soft.exe" -soft run

在Inno Setup脚本中,我使用以下内容:

In Inno Setup script I am using the following:

Name: "{commondesktop}\Soft name"; Filename: "{app}\soft.exe" -soft run; \
    IconFilename: {app}\icon.ico;

这是在运行编译器以创建安装程序时引起的错误:

And this is the error that causes when I run the compiler to create the installer:

参数文件名"上的引号不匹配或放错了位置

Mismatched or misplaced quotes on parameter "Filename"

我已设法纠正了该错误,但是在桌面上创建快捷方式后,它似乎没有目标,也找不到该程序的exe.

I have managed to correct the error but when the shortcut is created on the desktop, it appears without a target and does not find the exe of the program.

重要:

直接访问目标应为以下内容,因为程序需要这样:

The direct access target should be the following because the program needs it like this:

"C:\Program Files\Soft name\soft.exe" -soft run

如何使通过Inno Setup创建的快捷方式目标如此?

How can I make the shortcut target created by Inno Setup be this way?

"C:\Program Files\Soft name\soft.exe" -soft run

推荐答案

快捷方式目标程序的命令行参数转到

Command-line parameters of the shortcut target program go to Parameters parameter:

[Icons]
Name: "{commondesktop}\Soft name"; Filename: "{app}\soft.exe"; \
    Parameters: "-soft run"; IconFilename: {app}\icon.ico;

这篇关于在Inno Setup中创建快捷方式来执行带有命令行参数的程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆