windows 如何使用InnoSetup设置MicrosoftStore中列表的“错误返回代码”

a5g8bdjr  于 2023-01-14  发布在  Windows
关注(0)|答案(1)|浏览(55)

我想使用Inno安装程序列出MicrosoftStore上的exe文件。
当在MicrosoftStore Jmeter 板上注册应用程序时,我被要求为exe文件注册“错误返回代码”。
下图是显示它们的列表的捕获。

它们的文本化如下。

-Installation cancelled by user
-Application already exists
-Installation already in progress
-Disk space is full
-Reboot requiresd
-Network failure
-Package rejected during installation
-Installation successful

Past StackOverFlow questions and answers about error codes。它们很有帮助,但在InnoSetup错误代码的情况下,如果用户取消查找,则返回代码可能是“2”或“5”。相比之下,Microsoft Store中只有一个注册的错误代码条目。
在这种情况下,是否需要自定义InnoSetup的返回代码?在InnoSetup中应该编写什么代码?
下面的代码是我的InnoSetup代码。

; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "testApp"
#define MyAppVersion "1.00"
#define MyAppPublisher "My Company, Inc."
#define MyAppURL "http://www.example.com/"
#define MyAppExeName "test.exe"

[Setup]
; NOTE: The value of AppId uniquely identifies this application. Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{3D8E37F3-FB32-4AF9-8C64-58C37D542248}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={autopf}\{#MyAppName}
DisableProgramGroupPage=yes
; Uncomment the following line to run in non administrative install mode (install for current user only.)
;PrivilegesRequired=lowest
OutputDir=C:\Users\taichi\Desktop
OutputBaseFilename=mysetup
Compression=lzma
SolidCompression=yes
WizardStyle=modern

[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"

[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked

[Files]
Source: "C:\Users\taichi\Desktop\dist\test\test.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\taichi\Desktop\dist\test\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
; NOTE: Don't use "Flags: ignoreversion" on any shared system files

[Icons]
Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon

[Run]
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
anauzrmj

anauzrmj1#

似乎 “添加更多” 链接存在的原因很简单:
允许您添加25

相关问题