Softgrid: Clear the AppV cache

Many AppV client issue’s are solved by clearing the virtual application cache.  Also while troubleshooting sequenced applications whipping the cache is a common task.  Here are several possibilities to clear the Softgrid cache.

First, get a list of all AppV applications:

sftmime query obj:app /short

Remove all applications from the cache:

sftmime.exe remove obj:app /global /complete

Remove a specific application from the cache:

sftmime.exe remove app:”applicationName” /complete

 

Or if you need to wipe the complete cache, set the Registry State key to zero:

Changing the State key to zero, and reboot the machine. This will completely clear the file system cache.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SoftGrid\4.5\Client\AppFS\

Clear the Softgrid AppV cache via the State registry key

Update: I had to clear the User Cache for a specific application only, let’s call it “MyApp v1.0”. Using some batch- and OSD-scripting I was getting there.

Batch-script (Softgrid_clear_userCache_myApp.cmd);

SET _Path=C:\Users\%username%\AppData\Roaming\SoftGrid Client\%appDir%

SET _logfile=%systemroot%\_SOMEFOLDER_\MyAPP_cleanup.log

:: ### CHECK ###

If exist “%_logfile%” goto SKIP

:: ### REMOVE MyApp USER CACHE ###

If exist “%_Path%” rd “%_Path%” /S /Q

echo MyApp v1.0 AppV user cache cleared >> “%_logfile%”

goto END

:SKIP

echo Script already did his job before, quitting ..

goto END

:END

echo End script

OSD-script (to launch the batch script);

<DEPENDENCY>

<SCRIPT EVENT=”LAUNCH” TIMING=”PRE” PROTECT=”FALSE” WAIT=”TRUE” TIMEOUT=”0″>

<SCRIPTBODY>

@CALL \\\\server\\contentShare\MyApp1.0\\Softgrid_clear_userCache_myApp.cmd \n

..

 

 

 

 

 

 

 

 

 

 

 

Softgrid/App-V: Inside the bubble

There are some ways to view inside the virtual Softgrid / App-V bubble.

1. First method is by editing the .OSD file, inside the <DEPENDENCY> tag add:

<SCRIPT EVENT="LAUNCH" TIMING="PRE" PROTECT="TRUE" WAIT="TRUE" TIMEOUT="">
<HREF>cmd.exe</HREF>
</SCRIPT>

2. Second way by using sfttray (starting from AppV version 4.5 you can use this method):

  • Get the ApplicationName:
    • sftmime /query obj:app /short -> gives you a list of all Softgrid applications on your client
      Or use the AppV Console (sftcmc.msc) instead, to get your applicationName and version.
  • Launch a DOS Box in the bubble:
    • sfttray /exe cmd.exe /launch “applicationName Version”

For example:

  • sfttray /EXE cmd.exe /launch “Notepad++ 5.4.2” -> launches a command prompt in the bubble
  • sfttray /exe cmd.exe /launch “SnagIt 5.0.2.0”

 

This way we can leave our OSD’s in production untouched!