Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

InnoSetup: "The volume for a file has been externally altered"

Tags:

inno-setup

InnoSetup appears to be corrupting my executable when compiling the setup project. Executing the source file works fine, but executing the file after installation produces Win32 error 1006 "The volume for a file has been externally altered".

I've tried disabling compression and setting various flags, to no avail.

Has anyone experienced this?

UPDATE

Okay there's been some twists to the situation:

At the moment, I can even manually copy a working file to the location it is installed to and get "The volume for a file...". To be clear: I uninstall the application, create the same folder and paste the files there and run.

UPDATE 2

Some more details for those that want it: The InnoSetup script is compiled by FinalBuilder using output from msbuild, also executed by FinalBuilder, running on my machine with XP SP3. The executable is a C# .Net assembly compiled in configuration Release|AnyCPU. The file works when executed in the folder the Install Script takes it from. It produces the same behaviour on an XP Virtual Machine. The MD5 hashes of the source file and the installed file are the same.

like image 507
Andre Luus Avatar asked Mar 21 '11 10:03

Andre Luus


3 Answers

Ok, I just received this same error. I have a config which my executable uses. I looked in my folder a million times - but finally notice the config file was zero length. I corrected the config and the error stopped occurring.

Check the simplest things first... good lucK!

like image 56
M. Farrell Avatar answered Oct 26 '22 15:10

M. Farrell


ERROR_FILE_INVALID 1006 (0x3EE): The volume for a file has been externally altered so that the opened file is no longer valid.

I suspect you're having this issue after moving the files to a network share. It seems to me that what's happening is you have an open file-handle - possibly to a temporary file you are creating - and then some other process (perhaps running on a different host) is coming along and renaming or deleting that file or its' parent directory tree.

So my advice is:

  1. Try installing to a local directory
  2. Run after an anti-virus scan, in safe-mode or on a different machine to see if there isn't some background nasty changing volume/directory properties while your program is running.
  3. Make sure the program itself isn't doing anything weird with the volume or directory tree you're working with.
like image 40
SpliFF Avatar answered Oct 26 '22 15:10

SpliFF


Never seen that before. I've got a few questions and suggestions: - Are you signing the EXE during the compile of the setup? If so, try leaving that part out. - WHat OS are you installing on or does it happen on all machines you've tried?
- Run the install with the /LOG="c:\install.log" option and post the log. It might show something happening during install. - Run a byte compare or MD5 check on the source EXE and the installed EXE. Are they the same? Do they have the same version resource?

like image 35
mirtheil Avatar answered Oct 26 '22 14:10

mirtheil