The Collection

A collection of useful information.

Filtering by Category: App-V

PowerShell: App-V Suite-In-Place

A powershell script to suite two applications in the local OSD cache, for testing interaction and hotfixing a user if need be. At some point I may update it to accept arguments.

$offcGuid = "22C76228-3DF0-48DD-853C-77FDC955CC86"
$sPath = "RTSPS://%SFT_SOFTGRIDSERVER%:322/Power Pivot for Excel.sft"
$sGuid = "F5B20FA7-E437-4E03-885B-3D5B67F3DC22"
$sParam = ""
$sFile = "%CSIDL_PROGRAM_FILES%\Microsoft Analysis Services\AS Excel Client\10\Microsoft.AnalysisServices.AtomLauncher.exe"
$sGuard = "POWPIVOT.1\osguard.cp"
$sSize = "323267785"
$sMand = "FALSE"

$path = "C:\ProgramData\Microsoft\Application Virtualization Client\SoftGrid Client\OSD Cache\"
$dir = Get-ChildItem $path
$list = $dir | where {$_.extension -eq ".osd"}

foreach ($i in $list)
{
    [xml] $xml = gc ($path + $i)
    if($xml.SOFTPKG.IMPLEMENTATION.CODEBASE.GUID -eq $offcGuid)
    {
        $final = ($path + $i)
        
        [xml] $excel = gc $final

        $newitem = $excel.CreateElement("CODEBASE")
        $newitem.SetAttribute("HREF", $sPath)
        $newitem.SetAttribute("GUID", $sGuid)
        $newitem.SetAttribute("PARAMETERS", $sParam)
        $newitem.SetAttribute("FILENAME", $sFile)
        $newitem.SetAttribute("SYSGUARDFILE", $sGuard)
        $newitem.SetAttribute("SIZE", $sSize)
        $newitem.SetAttribute("MANDATORY", $sMand)
        
        $excel.SOFTPKG.IMPLEMENTATION.VIRTUALENV.DEPENDENCIES.AppendChild($newitem)
        $excel.Save($final)
    }
}

App-V: Windows 7 locations.

Client Log File Location:
C:\ProgramData\Microsoft\Application Virtualization Client\sftlog.txt

Icon Cache:
C:\ProgramData\Microsoft\Application Virtualization Client\SoftGrid Client\Icon Cache

OSD Cache:
C:\ProgramData\Microsoft\Application Virtualization Client\SoftGrid Client\OSD Cache

Machine AppFS Storage:
C:\ProgramData\Microsoft\Application Virtualization Client\SoftGrid Client\AppFS Storage

User AppFS Non-Roaming:
C:\Users\fulbripd\AppData\Local\SoftGrid Client

User AppFS Roaming:
C:\Users\fulbripd\AppData\Roaming\SoftGrid Client

 

Why would I need or want to know these locations?

Well, the OSD cache is important if you want to, say, suite something in-place (i.e. suite two applications together just on the machine to test integration or to hotfix someone until you can update it on the backend), the icon cache is useful for determining whether or not Windows Icon database is corrupt or if the icons provided by App-V are corrupt. The log file location is...hopefully obvious.

My personal favorite however is the AppFS locations.

I wouldn't worry to much about WHAT files are in there. But these locations are where the user changes that are saved "to the bubble" are stored. They are broken down into basically three types. Changes that are global (say, an HKLM key), changes that only apply to the user but shouldn't roam (say, an HKCU key with the machine name in it), and changes that are user specific and are ok to roam (say, an .ini file with preferences stored in it).

Where knowing this comes in handy is when, for whatever reason, the client decides to not truly clear the AppFS when you tell it to. I've had more than one instance of clearing multiple times, clearing after log off, after reboot, and the client just isn't capable of deleting it, maybe something random locked the folder, maybe something got corrupted, either way the only solution at that point is to find the folder for the app you want to clear and manually delete it in all three locations.

Likewise if you ONLY want to clear a certain segment of the AppFS for a package you can do so manually as opposed to the client which does not give you any options.

And example of what the folders look like it: CTXAPPS-3E12E23B-2C95-4986

You will notice after looking at a few that they tend to have the 8.3 folder name you used when you sequenced them, followed by a semi-GUID (semi because the first block is user generated and not random, therefor not TRULY globally unique).

App-V: Access Permissions

Quick note that seems to be escaping a few people.

In App-V Standalone Server you can set access permissions (i.e.: who recieves the application) at two levels, the Application Group (folder) level, or at the Application level (each individual program or shortcut INSIDE the package).

There is inheritence and it SHOULD always inheret folder level permissions, but unless you have a specific need to grant or deny access to a single appication without a sequence you should avoid setting access permissions below the folder level.

App-V: Shortcuts.

Have an App-V app that creates shortcuts you don't want? You have two options.

First Option:

In the sequencer, on the Customize Applications screen, you can expand the application, right-click on Edit Shortcut and uncheck everything. This will leave the application (and thus the .osd, which is needed to suite, say a plug-ing, with another sequence) intact but not display a shortcut.

Second Option:

If you use the App-V standalone server you can modify, anytime, on the fly, what shortcuts are displayed and where they are. For instance, our users wanted Office Communicator 2007 to run on startup, I simply went into the console and added a shortcut to %CSIDL_STARTUP%

App-V Error: 4A-40000194

There are a few possible problems here but I find the most common is that the OSD is not pointing to either the right location, deployment method, or both.

Check the OSD's (or go in via the Sequencer if you wish, but that will typically generate a new version of the .sft, though I haven't tried in 4.6SP1, maybe that was one of the two things they got right) to ensure the correct method and location are specified.

Remember that typically speaking it will be something like:
":<port>/<appsubfolder>/<pathtosft>"

And seldom if ever:
":<port>/<pathtosft>"

RunAsInvoker

If you have an App-V app that complains about elevation but SHOULDN'T really need it, try adding this:

<ENVIRONMENT VARIABLE="__COMPAT_LAYER">RunAsInvoker</ENVIRONMENT>

 That goes inside the <IMPLEMENTATION><VIRTUALENV><ENVLIST> tag. As always, location inside the tag doesn't matter, just that it's inside the tag. You can also use the same trick to set "process level" environment variables. Say, adding something to the PATH variable.