Saturday, August 8, 2020

App-V 5.1: Unable to launch .bat Shortcuts. Batch file launching failed with error" The system cannot find the path specified"

Problem:

Unable to sequence the applications which have .bat shortcuts using App-v Application virtualization. While launching Batch file shortcuts, showing error "Windows Cannot find the C:\Program files (x86)\Java\bin\javaw".

Mostly Java based based applications facing this issues while calling Java in Batch file.


Reason:

Normally App-V applications are virtualized applications which should run under a virtual bubble, kind of run time environment. But during Batch file execution, the Windows Command Prompt (cmd.exe) is is executing native instead of virtual bubble. This is common behavior in App-v while running Batch file shortcuts. So it showing the above error because native command prompt cannot read the path inside the virtual file system.


Solution:

Below steps explaining the easy way to run the .bat file under virtual bubble.

For running the application inside virtual bubble, we need 2 information.

1. "Package ID" and "Version ID" of App-V Package.

2. Path of shortcut Target .bat file.


Step 1: 

Find the "Package ID" and "Version ID" of App-V Package.

a) Open "PowerShell" in Client Machine.

b) Execute "Get-AppvClientPackage"

c) Note down the Package ID and Version ID.

Step 2:

Find the Shortcut target path from existing shortcut or from Virtual File system.

In My example, Target path is 

"%LOCALAPPDATA%\Microsoft\AppV\Client\Integration\C6C9251D-CAAA-4EE7-A97D-26D87996C6B7\Root\VFS\ProgramFilesX86\Sirsi\JWF\My-Java-App.bat"


Step 3: 

Create New Shortcut with below Syntax.

cmd.exe /c <Batch File Path> /appvve:PackageID_VersionID

In My example, 

The shortcut target is

cmd.exe /c C:\Users\ctxpoc1\AppData\Local\Microsoft\AppV\Client\Integration\C6C9251D-CAAA-4EE7-A97D-26D87996C6B7\Root\VFS\ProgramFilesX86\MyJavaApp\My-java-app.bat /appvve:c6c9251d-caaa-4ee7-a97d-26d87996c6b7_03e309c5-e1a9-44a7-a0c4-b437b3c40f70

Launch the new shortcut and test the App-v Application functionality.

Note: Double check the shortcut target and the parameters properly if you get error again. There is a chance of manual error while making the shortcut because of path length and many switches.


5 comments:

  1. You really should experience a tournament first of the finest blogs on the internet. I’m going to suggest this website! slotxo

    ReplyDelete
  2. You can apply for, update, renew or replace a passport online. requirements for passport renewal

    ReplyDelete
  3. You are mistaken. Let’s discuss it. Write to me in PM, we will communicate. Ac installation las vegas

    ReplyDelete
  4. I’m not that much of a internet reader to be honest but your blogs really nice, keep it up! I’ll go ahead and bookmark your site to come back down the road. Cheers Graffiti Removal Los Angeles

    ReplyDelete
  5. The best thing about airsoft handguns is that you can easily find affordable Gas Blow-Back (GBB) models at your favorite online stockist. GBB airsoft handguns offer a realistic experience; it is probably as realistic as you can get to real guns. Plus, you can also find several high-quality items offering full-metal slide and realistic body with complete marking. You can never tell the difference between the real gun and its airsoft counterpart unless you take a look at the magazines to compare the two. magazine shotguns

    ReplyDelete

Enter Comments...