locked
app-v can't find a file in %programdata% RRS feed

  • Question

  • Hi,

    We have an app-v package that we want to use for multiple environments.

    For this specific package we need a license file per environment.

    We copy the application.lic to the physical %programdata%\applciation folder. Inside the .appv the %programdata%\application folder (which contains files and folders) is set to 'merge with local'.

    However, whet starting the application it doesn't seem to find the lic file (starts in trial mode).

    Does anybody know what might be the problem?

    Does anyone know of a method to use a generic app-v with different license files?

    Thanks,

    Robin Ramaekers.

    Monday, June 29, 2015 4:46 PM

Answers

  • Try sequencing the application again, but this time manually create the %ProgramData%\Application folder first before you start the sequencing process, and ensure you don't copy the license file into that location. This will flag to the sequencer that it should merge with the local folder.

    Tuesday, June 30, 2015 9:30 AM
  • Thank you for your answer.

    Yes, when I use the sequencer to expand the package locally, and I copy the license file to the %proramdata%\application folder, the application works fine. so I know my location is ok.

    It's just strange, when I run a cmd using /appvve I cannot find the file anymore.

    A few things going on because you should be able to see it in its VFS location, but can you try the powershell method for invoking the VE instead of /appve? One of the potential problems with /appve /appvpid is that if you supply a wrong parameter the native app spins up and no error is shown.

    This means you could do cmd.exe /appvve badguid_badver and cmd will open up.  I've done it to myself a few times where I think I'm opening the cmd window in the VE and I'm not.

    Once you can find the file where you expect it to be you and the program still doesn't work, you need to start using procmon.  Sometimes apps do really weird things to find files that aren't apparent until you virtualize them.  Doing procmon will help you figure out what the app is doing.  Unfortunately there often isn't a 1 solution for all.

    Wednesday, July 1, 2015 2:08 PM

All replies

  • I would suggest you to use Process Monitor & see where the Application is searching for the License File.

    Monday, June 29, 2015 5:14 PM
  • You could create a script in the Dynamic Deployment Configuration Files (XML) that will copy the required license file into the virtual %ProgramData%\application folder. You'll want to use the StartVirtualEnvironment event trigger and use RunInVirtualEnvironment="true".

    You'll need to ensure that this option is checked in the "Advanced" tab of the sequencer - "Full write permissions to the VFS" - otherwise the users will get the permissions to copy the file into that location.

    You'll also need to ensure the App-V client is configured to allow scripts to run, if not set already, using this bit of PowerShell

    Set-AppvClientConfiguration -EnablePackageScripts 1

    Here are some good resources on using and editing the Dynamic Deployment Configuration Files:

    https://technet.microsoft.com/en-gb/library/jj713466.aspx

    http://app-virtual.blogspot.co.uk/2013/01/writing-script-to-dynamic-configuration.html

    http://virtualengine.co.uk/vet/ace/

    Also does the license file you're copying also exist in the virtual environment i.e. did it get copied there when you created the sequence? if so that might answer why the application can't see the physical file.

    I presume the application looks for the license file in the location you're expecting it to?.

     

    Monday, June 29, 2015 5:26 PM
  • Thank you for your answer.

    Yes, when I use the sequencer to expand the package locally, and I copy the license file to the %proramdata%\application folder, the application works fine. so I know my location is ok.

    It's just strange, when I run a cmd using /appvve I cannot find the file anymore.

    Tuesday, June 30, 2015 8:18 AM
  • Try sequencing the application again, but this time manually create the %ProgramData%\Application folder first before you start the sequencing process, and ensure you don't copy the license file into that location. This will flag to the sequencer that it should merge with the local folder.

    Tuesday, June 30, 2015 9:30 AM
  • Thank you for your answer.

    Yes, when I use the sequencer to expand the package locally, and I copy the license file to the %proramdata%\application folder, the application works fine. so I know my location is ok.

    It's just strange, when I run a cmd using /appvve I cannot find the file anymore.

    A few things going on because you should be able to see it in its VFS location, but can you try the powershell method for invoking the VE instead of /appve? One of the potential problems with /appve /appvpid is that if you supply a wrong parameter the native app spins up and no error is shown.

    This means you could do cmd.exe /appvve badguid_badver and cmd will open up.  I've done it to myself a few times where I think I'm opening the cmd window in the VE and I'm not.

    Once you can find the file where you expect it to be you and the program still doesn't work, you need to start using procmon.  Sometimes apps do really weird things to find files that aren't apparent until you virtualize them.  Doing procmon will help you figure out what the app is doing.  Unfortunately there often isn't a 1 solution for all.

    Wednesday, July 1, 2015 2:08 PM