Inno setup 在Inno安装程序中运行.exe文件时出错

Inno setup 在Inno安装程序中运行.exe文件时出错,inno-setup,Inno Setup,我正在尝试使脚本运行此文件: 安装应用程序之前/之后都无所谓 这是我的剧本: ; Script generated by the Inno Setup Script Wizard. ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! ; Flags: skipifsilent [Setup] ; NOTE: The value of AppId uniquely identifies this ap

我正在尝试使脚本运行此文件:

安装应用程序之前/之后都无所谓

这是我的剧本:

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

; Flags: skipifsilent

[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={{AEDD3A70-5044-452B-B78D-9CCE4E130654}
AppName=Pong
AppVersion=2.0
;AppVerName=Pong 2.0
AppPublisher=Roymunson_Studios
AppPublisherURL=http://www.example.com/
AppSupportURL=http://www.example.com/
AppUpdatesURL=http://www.example.com/
DefaultDirName={pf}\Pong
DefaultGroupName=Pong
AllowNoIcons=yes
OutputBaseFilename=setup
Compression=lzma
SolidCompression=yes

 [Run]
 Filename: "{app}\Installers\NDP451-KB2858728-x86-x64-AllOS-ENU.exe"; StatusMsg: "Installing .NET Framework 4.5.1"

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

[Files]
Source: "C:\Users\vroy\Desktop\Debug\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[Icons]
Name: "{commondesktop}\Pong"; Filename: "{app}\Pong.exe";
但是,当它尝试编译.NET 4.5.1安装程序文件时,会显示以下错误:

进程无法访问该文件,因为其他进程正在使用该文件


这毫无意义,因为在我编译Inno脚本时没有使用.NET 4.5.1安装程序。

尝试将项目文件放在桌面以外的其他位置。非系统文件夹最适合这种情况。@RobeN已经工作了,但是现在当我运行安装程序时,我得到一个错误:无法执行文件位置CreateProcess faled;代码267。目录名无效。我怀疑这是因为我的系统上已经安装了.NET 4.5.1。如果已经安装了.NET 4.5.1,如何使安装程序不会显示错误消息?不,这不会导致任何问题。您将只看到安装了.NET的信息,以及是否要卸载或修复的问题。也许您在[Run]部分指出错误,或者您试图在没有管理员权限的情况下运行它?@RobeN我知道它正在显示错误消息,因为我已经安装了.NET 4.5.1。我检查了Windows事件查看器,发现了错误:然后您应该使用参数:/passive/norestart,或者您应该编写一个检查函数,仅当未安装.NET或安装了较低版本时才启动.NET安装。