App-V Error: Cannot create file when that file already exists (2C-000000B7)

I needed to make an empty application, which calls an external batch file. No problem for the batch file, but you cannot create a sequence whithout shortcuts right?

So I sequenced the local notepad and changed FILENAME from NOTEPAD.EXE to CMD.EXE (with “/C” as parameter to hide the DOS Box).

PARAMETERS=”/C” FILENAME=”%CSIDL_SYSTEM%\cmd.exe”

When the shortcut was launched, the App-V client throws this error:

App-V Error: Cannot create file when that file already exists (2C-000000B7)

After changing the SUBSYSTEM from windows to console this error was solved.

UPDATE 23/03/2012

Using CMD.EXE with PARAMETER /C in de CODEBASE tag makes SFTTRAY.EXE to load my application multiple times! So I changed the design; I don’t use a PRE or POST LAUNCH script but places the batch file in de FILENAME property of the CODEBASE tag. This way the batch file is the application.

Old:

PARAMETERS=”/C” FILENAME=”%CSIDL_SYSTEM%\cmd.exe”

New:

FILENAME=”\\server\share\batchfile.cmd”

Leave a Reply