编译错误:进程无法访问该文件,因为另一个进程正在使用该文件


Compile Error: The process cannot access the file because it is being used by another process

我想在exe文件中创建一个php站点。所以我使用Innoscript软件来创建exe文件。。编译inno脚本时将发生错误

编译错误:进程无法访问该文件,因为它正被另一个进程使用

#define MyAppName "indexapp"
#define MyAppVersion "0.0.1"
#define MyAppPublisher "My Company, Inc."
#define MyAppURL "http://www.example.com/"
#define MyAppExeName "phpdesktop-chrome.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={{890F1243-E039-4AE5-8407-A5D227471A18}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={pf}'{#MyAppName}
DisableProgramGroupPage=yes
OutputDir=C:'Users'VEPL-PHP'Desktop'setup
OutputBaseFilename=setupindex
Compression=lzma
SolidCompression=yes
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
[Files]
Source: "F:'xampp'htdocs'phpdesktop old - Copy'phpdesktop-chrome.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "F:'xampp'htdocs'phpdesktop old - Copy'cef.pak"; DestDir: "{app}"; Flags: ignoreversion
Source: "F:'xampp'htdocs'phpdesktop old - Copy'd3dcompiler_43.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "F:'xampp'htdocs'phpdesktop old - Copy'd3dcompiler_46.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "F:'xampp'htdocs'phpdesktop old - Copy'debug.log"; DestDir: "{app}"; Flags: ignoreversion
Source: "F:'xampp'htdocs'phpdesktop old - Copy'devtools_resources.pak"; DestDir: "{app}"; Flags: ignoreversion
Source: "F:'xampp'htdocs'phpdesktop old - Copy'ffmpegsumo.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "F:'xampp'htdocs'phpdesktop old - Copy'icudt.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "F:'xampp'htdocs'phpdesktop old - Copy'libcef.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "F:'xampp'htdocs'phpdesktop old - Copy'libEGL.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "F:'xampp'htdocs'phpdesktop old - Copy'libGLESv2.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "F:'xampp'htdocs'phpdesktop old - Copy'license.txt"; DestDir: "{app}"; Flags: ignoreversion
Source: "F:'xampp'htdocs'phpdesktop old - Copy'settings.json"; DestDir: "{app}"; Flags: ignoreversion
Source: "F:'xampp'htdocs'phpdesktop old - Copy'locales'*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "F:'xampp'htdocs'phpdesktop old - Copy'php'*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "F:'xampp'htdocs'phpdesktop old - Copy'webcache'*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "F:'xampp'htdocs'phpdesktop old - Copy'www'*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[Icons]
Name: "{commonprograms}'{#MyAppName}"; Filename: "{app}'{#MyAppExeName}"
Name: "{commondesktop}'{#MyAppName}"; Filename: "{app}'{#MyAppExeName}"; Tasks: desktopicon
[Run]
Filename: "{app}'{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent

请帮我解决这个错误。

停止OneDrive,错误消失。

这可能是您计算机上运行的其他软件的问题。尝试关闭所有程序,包括在后台运行的程序。发现同步程序引起的类似问题:

将Innosetup与Sync结合使用的唯一方法是:关闭同步,运行Innosetup,重新启动同步以同步新文件。

https://forum.getsync.com/topic/32041-sync-14-file-replacement-issue-can-cause-file-loss/

我不得不关闭Dropbox和Avast防病毒软件。之后,这个错误立即消失了。其中一个可能锁定了一些文件。