SetupGuy
Posts: 12
Joined: Mon Nov 08, 2010 4:52 pm

Re: Can't finish - build error

Okay. Guess I'll have to start sending emails to the rest of the company before building now to ensure that none of my co-workers has the directory opened... And/or deny access to the output folder to anyone else.
SetupGuy
Posts: 12
Joined: Mon Nov 08, 2010 4:52 pm

Re: Can't finish - build error

So...

I have asked everyone to leave the directory, should they have it open (which no one did, anyway).
Just to be sure, I have moved everything (project files, files to be installed, prerequisites, etc.) to a new folder which is not shared.
The output folder was changed to one that isn't shared.
I have closed my antivirus software (and even deactivated the related services via services.msc).
I have deactivated the Windows Search indexer service.
I am the only user on the machine.
I have rebooted the machine.

After all this, I still cannot build a single project, not even the unchanged old ones.

When is this next version you spoke of coming out? And is there anything else I can try to work around that? I'm out of ideas at the moment...
SetupGuy
Posts: 12
Joined: Mon Nov 08, 2010 4:52 pm

Re: Can't finish - build error

I don't know if this helps, but this only affects the bootstrapper exe. If I only build as an MSI file, everything is fine, but as soon as I want to create an .exe I've got trouble again...
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Can't finish - build error

Hello,

Please contact us via e-mail to support at advancedinstaller dot com so we can provide you with a RC for the latest version.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Jim Beveridge
Posts: 32
Joined: Wed May 10, 2006 10:54 pm

Re: Can't finish - build error

Cosmin,

I am a Microsoft MVP. If you can give me some details on the API you are using and what you are doing when it fails, I can usually get the issue elevated for a response.

Jim Beveridge
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Can't finish - build error

Hi Jim,

The CreateFile function fails when opening a file for append. This happens only sometimes and only if the file is visible in Windows Explorer. We haven't found the exact problem, but the function seems to work when called again after a small delay. We think that Windows Explorer is somehow keeping an open handle to the file.

If you need more details, you can contact us at support at advancedinstaller dot com.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
SetupGuy
Posts: 12
Joined: Mon Nov 08, 2010 4:52 pm

Re: Can't finish - build error

I just wanted to say that after a quick test, the 8.2 RC doesn't seem to change anything. I have restarted the machine again, but the error still occurs. Is it possible that I'm encountering a different bug here? Something with the same message but a different cause? To ensure I'm not missing something or mixing something up, here is the message I get, but I'm quite sure it's the same thing as in the opening post:
Signing MSI... done.
error.
Exception - Failed to localize one or more elements in the EXE bootstrapper. Make sure that [D:\Setup Dateien\ASM V8SP1Test\ASM V8 SP1 Setup.exe] is not being used by another process and the elements used by the bootstrapper can be accessed.
GetLastError() returned: Das Handle ist ungültig.

Build finished because an error was encountered.
The GetLastError() bit translates to "the handle is invalid".
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Can't finish - build error

Hi,

Where is your project output created? Are you using a local folder? Does the build work when using a folder on desktop or any other location which doesn't require Administrator privileges? Did the build work at any time in your current output folder?

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
SetupGuy
Posts: 12
Joined: Mon Nov 08, 2010 4:52 pm

Re: Can't finish - build error

cosmin wrote:Hi,

Where is your project output created? Are you using a local folder? Does the build work when using a folder on desktop or any other location which doesn't require Administrator privileges? Did the build work at any time in your current output folder?

Regards,
Cosmin
Hi,

Yes, I'm using a local folder. I have tried several locations (none of them requires Administrator privileges) as build output, and even moved the project files (including prerequisites, files to be installed etc.) to a different folder, but it didn't change anything. It all worked like a charm since we've got our licence renewed and set the new version up on a new machine (that was in mid february). It is a virtual machine, but that didn't give us any trouble before. Occasionally there was a hiccup where I got this same error message and had to restart the build once or twice, but then it usually worked.
If I build the setup as MSI file, there's no problem. It seems to be the creation of the bootstrapper EXE that gives us trouble.

This is probably unrelated, but after I last successfully built a setup, I created a new project for a windows mobile device and built that. It was after I did this that the building started to fail for other projects. As I said, this is probably unrelated and just a coincidence, but I'm trying to provide as much information as I can to help with identifying the problem.
SetupGuy
Posts: 12
Joined: Mon Nov 08, 2010 4:52 pm

Re: Can't finish - build error

I've backed up some files, set the VM back to a snapshot from approx. two months ago, copied some files around and back and now it's working again. Maybe I'll post if (or when?) the problem comes up again.
stomanova
Posts: 6
Joined: Thu Jan 22, 2009 10:58 am

Re: Can't finish - build error

Hello, I have got the same error as described here with version 10.8 build 54215.
My target exe is not in use, switch off antivirus did not help, when I build only msi, everything seems to work.
But when I run the msi, my older vbs for reading path from existing ini file does not work as well. What has happened with this version, please ?
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Can't finish - build error

Hello,

Can you try to isolate the behavior in a sample which replicates this and send us to support at advancedinstaller dot com so we can investigate? Also, you can try to iterate a step by step test case scenario which replicates the behavior on a clean machine and send it us.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
stomanova
Posts: 6
Joined: Thu Jan 22, 2009 10:58 am

Re: Can't finish - build error

Hello,
I have found it is because of the parameter combination I have used. The screen shots I will send to your email. Short message - when I use exe setup, LZMA compression does not produce the error. First I was using CAB files.
Q53
Posts: 3
Joined: Fri Mar 10, 2023 6:10 pm

Re: Can't finish - build error

I am suddenly getting the same error. I must turn off Bitdefender to stop it. Bitdefender says Disinfection in progress but doesn't put anything in its log. This occurs when forming an EXE, not an MSI.

Update: Fixed by whitelisting. Still curious as to what happened.
Catalin
Posts: 6608
Joined: Wed Jun 13, 2018 7:49 am

Re: Can't finish - build error

Hello,

Thank you for your followup on this.

As you mentioned, this indeed seems to be happening because BitDefender keeps the file in use during the build process.

What you have done (whitelist the EXE) is indeed the correct approach.

On top of that, I would advise scanning the EXE after the build process and, if any detection comes up, submit it for whitelisting, so we avoid any eventual false positive detections.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”