Когда я использовал Windows11 для установки программного пакета Net6.0, возникли проблемы. Я не видел никакой другой информации, поэтому я не уверен, где именно произошла ошибка. Я запустил соответствующий программный пакет индивидуально, и это было нормально.
Ниже приведен мой файл ISS < /p>
#define AppName "GKeyManager"
#define AppVersion "1.4.8"
#include "CodeDependencies.iss"
[Setup]
AppName={#AppName}
AppVersion={#AppVersion}
DefaultDirName=C:\Program Files\GKey
DefaultGroupName=GKey
OutputDir=C:\Users\Administrator\source\repos\GF\output\put
OutputBaseFilename={#AppName}_{#AppVersion}_gld_auto
DisableDirPage=yes
Compression=zip
SolidCompression=yes
PrivilegesRequired=admin
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
Name: "chinesesimplified"; MessagesFile: "compiler:Languages\ChineseSimplified.isl"
[Files]
Source: "D:\File\Project\gld\Login_update.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "D:\File\Project\gld\Main.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "D:\File\Project\gld\Keyauth_Service.exe"; DestDir: "{app}\Libraries"; Flags: ignoreversion
Source: "D:\File\Project\netcorecheck.exe"; DestDir: "{tmp}";
Source: "D:\File\Project\vc_redist.x86.exe"; DestDir: "{tmp}"; Flags: dontcopy
Source: "D:\File\Project\windowsdesktop-runtime-6.0.20-win-x86.exe"; DestDir: "{tmp}"; Flags: dontcopy
Source: "D:\File\Project\Windows6.1-KB2533623-x64.msu"; DestDir: "{tmp}"; Flags: dontcopy
Source: "D:\File\Project\Windows6.1-KB2533623-x86.msu"; DestDir: "{tmp}"; Flags: dontcopy
[Icons]
Name: "{commondesktop}\keymanager"; Filename: "{app}\Main.exe"; Flags: createonlyiffileexists
Name: "{group}\Uninstall {#AppName}"; Filename: "{uninstallexe}"; Flags: createonlyiffileexists
[UninstallDelete]
Type: files; Name: "{app}\Login_update.exe"
Type: files; Name: "{app}\Main.exe"
Type: files; Name: "{app}\Libraries\Keyauth_Service.exe"
Код: Выделить всё
function IsKB2533623Installed: Boolean;
var
ResultCode: Integer;
begin
Result := Exec('cmd.exe', '/C wmic qfe where HotFixID="KB2533623" | findstr KB2533623', '', SW_HIDE, ewWaitUntilTerminated, ResultCode) and (ResultCode = 0);
end;
function InitializeSetup: Boolean;
var
ResultCode: Integer;
begin
// Extract dependency files to the temporary directory in advance
ExtractTemporaryFile('vc_redist.x86.exe');
ExtractTemporaryFile('windowsdesktop-runtime-6.0.20-win-x86.exe');
ExtractTemporaryFile('Windows6.1-KB2533623-x64.msu');
ExtractTemporaryFile('Windows6.1-KB2533623-x86.msu');
// Install Windows update patch KB2533623 if not installed
if not IsKB2533623Installed then begin
if IsWin64 then
Dependency_Add('Windows6.1-KB2533623-x64.msu', '/quiet /norestart', // Silent installation but shows progress on the dependencies page
'Windows Update Patch KB2533623', '', '', False, False)
else
Dependency_Add('Windows6.1-KB2533623-x86.msu', '/quiet /norestart',
'Windows Update Patch KB2533623', '', '', False, False);
end;
Dependency_ForceX86 := True;
if not Dependency_IsNetCoreInstalled('-n Microsoft.WindowsDesktop.App -v 6.0.20') then begin
Dependency_Add('windowsdesktop-runtime-6.0.20-win-x86.exe', '/lcid ' + IntToStr(GetUILanguage) + ' /quiet /norestart',
'.NET Desktop Runtime 6.0.20', '', '', False, False);
end;
Dependency_ForceX86 := False;
// Add Microsoft Visual C++ 2015 Redistributable if not installed
if not IsMsiProductInstalled(
Dependency_String( '{65E5BD06-6392-3027-8C26-853107D3CF1A}', '{36F68A90-239C-34DF-B58C-64B30153CE35}' ),
PackVersionComponents(14, 30, 33810, 0)) then begin
Dependency_Add('vc_redist.x86.exe', '/quiet /norestart',
'Visual C++ 2015-2022 Redistributable', '', '', False, False);
end;
Result := True;
end;
< /code>
Я вручную выполняю каждый шаг, и все нормально, встречается только с этой проблемой при использовании сценария установки. Система-Windows 11 64-битная
Подробнее здесь: [url]https://stackoverflow.com/questions/79451715/runtime-error-at-75328-when-creating-an-installation-package-with-inno-setup[/url]