InstallerLinker fails with ERROR: The system cannot open the device or file specified

Feb 3, 2010 at 3:38 PM

InstallerLinker fails with ERROR: The system cannot open the device or file specified

I've just been fighting with this error, it's cause by in my case Microsoft security essentials anti-virus spotting the InstallerLinker messing with a setup.exe and stopping it (It gives a sharing violation).

Note this is a informational post and I should be able to add InstallLinker.exe to my ignore processes list. It might however be worth adding this into the message that the InstallerLinker displays as a possible reason.

Hopefully this will help someother poor soul.

Feb 3, 2010 at 3:45 PM

Maybe this was the cause of the issue I was having earlier, I'll try this out.

Feb 3, 2010 at 4:25 PM

It's quite possible I was getting some very odd results with AV running. Running the linker twice sometimes would succeed.

Feb 3, 2010 at 10:00 PM

This was causing my previous issue, however adding InstallerLinker to the ignore processes list did not fix the issue completely. I had to temporarily disable the RTS module before I could run my BuildSetup.bat file.

Feb 4, 2010 at 1:43 PM

After some more testing this morning, I added the entire directory that I build my install from to the my AV's RTS exceptions and didn't get any errors.

Feb 6, 2010 at 3:39 AM


I am seeing this happen as well.

"D:\Working\Third Party\dotNetInstaller\1.8\Bin\InstallerLinker.exe" /o:"D:\Working\MyApp\Setup\Setup Installer.exe" /b:"D:\Working\MyApp\Setup\banner.bmp" /t:"D:\Working\Third Party\dotNetInstaller\1.8\Bin\dotNetInstaller.exe" /c:"D:\Working\MyApp\Setup\dotNetInstaller.xml" /v+ /z:0 /i:"D:\Working\MyApp\Setup\icon.ico" /m:"D:\Working\MyApp\Setup.manifest"
InstallerLinker: dotNetInstaller Packager (1.8.6754.0)

Creating "D:\Working\MyApp\Setup\Setup Installer.exe" from "D:\Working\Third Party\dotNetInstaller\1.8\Bin\dotNetInstaller.exe"
Embedding banner "D:\Working\MyApp\Setup\banner.bmp"
Embedding configuration "D:\Working\MyApp\Setup\dotNetInstaller.xml"
Updating binary attributes in "D:\Working\MyApp\Setup\Setup Installer.exe"
 CompanyName: MyCorporation
 ProductName: MyApp
 FileDescription: MyApp
 Copyright: MyCorporation
 LegalCopyright: MyCorporation
Embedding icon "D:\Working\MyApp\Setup\icon.ico"
 16x16, 16x16, 32x32, 32x32, 48x48, 48x48
Compressing files in "D:\Working\MyApp\Setup"
 D:\Working\MyApp\Setup\Setup.exe (Setup.exe)
Writing CABs to "C:\Documents and Settings\Rami\Local Settings\Temp\f3e3c98f-51fe-4355-89f9-0f71d6d638b7"
 Setup.exe - 7.8MB
Embedding CABs
EXEC : error : The system cannot open the device or file specified
"D:\Working\Third Party\dotNetInstaller\1.8\Bin\InstallerLinker.exe" /o:"D:\Working\MyApp\Setup\Setup Installer.exe" /b:"D:\Working\MyApp\Setup\banner.bmp" /t:"D:\Working\Third Party\dotNetInstaller\1.8\Bin\dotNetInstaller.exe" /c:"D:\Working\MyApp\Setup\dotNetInstaller.xml" /v+ /z:0 /i:"D:\Working\MyApp\Setup\icon.ico" /m:"D:\Working\MyApp\Setup.manifest" returned exit code: -2


I am thinking this is an issue with the ResourceLib dependency.  For example, the file may still be in use after it calls EndUpdateResource.  I.e., the managed garbage collector has not yet freed open handles\resources from pinvoke.

Feb 6, 2010 at 3:50 AM

For reference, I have also reported the issue here:


Feb 10, 2010 at 2:41 PM

I've committed code that should make this error clearer: I am not convinced that the problem is the source file vs. the target file. The exception will now say which file it is. I uploaded build 1.9.10454.0, lets see if we can move this forward - give it a try.

Apr 5, 2011 at 1:03 PM
Edited Apr 5, 2011 at 1:16 PM


Just for information: Got the same issue for InstallerLinker 2.0.673.0 as well as 1.10.1525.0 on Win7 64Bit with activated virus software. 

On Win7 with activated virus software:

Embedding icon "D:\myIcon.ico"
 32x32, 16x16, 48x48, 32x32, 16x16, 0x0, 48x48, 32x32, 16x16
ERROR: The system cannot open the device or file specified.


  • On the same machine: When creating a Icon with IcoFX 1.6.4 48x48  True Color + Alpha Channel (32 Bits) and embed this icon it works fine
  • When not using a icon on Win7 64Bit works fine



Used a non .exe file as output: /Output:"Setup.test" and afterwards renamed it.