5 Years 6 Months 2 Weeks and 1 Day ago my mate Justin Zarb wrote a brilliant blog post on Specifying a Working Directory in App-V 4.x and how we can use the .OSD to achieve this.
Well here I am a good while later, posting about how we do the same thing in App-V 5.0. Time does fly!
A lot of apps will register a working directory somewhere in its installation folder during installation by default these working directories will be translated to somewhere in:
"%ALLUSERSPROFILE%\Microsoft\AppV\Client – For globally published apps
%LOCALAPPDATA%\Microsoft\AppV\Client – For user published apps
There are two opportunities to set working directories with App-V 5.0, at sequencing or post sequencing…
This method is simple, just change the working directory on your shortcut during the monitoring phase to whatever you desire. Here the users documents folder has been specified:
This action will get captured and then end up embedded within the appxmanifest.xml file held within the .appv:
You will notice that the user’s documents folder has been change to a variable, this is something you see a lot with all versions of App-V Sequencer, it helps to make our state portable with no or little ties back to the OS the package was sequenced on or the user who sequenced it.
You can see a list of these parsers in the sequencer under Tools -> Options -> Parse Items
We also have the option to change working directories after sequencing at deployment time, in the absence of our .OSD file we had in App-V 4.x we can leverage our config.xml files.
Remember the deploymentconfig.xml file can be used using the Add-AppvClientPackage to target a deployment:
Add-AppvClientPackage -Path 'C:\Packages\R 3.0.0\R 3.0.0.appv' -DynamicDeployConfiguration 'C:\Packages\R 3.0.0\R 3.0.0_DeploymentConfig.xml'
The userconfig.xml can be applied at publish time to target the change at specific users
Publish-AppvClientPackage "R 3.0.0" -DynamicUserConfigurationPath 'C:\Packages\R 3.0.0\R 3.0.0_UserConfig.xml'
This can of course all be done from the management console too but if you want to know more about the add/publish in standalone read here.
Good article mate - just what I was looking for!
Good to hear Mark, thanks!