login vsi company logo login vsi company logo 250x40
header-03.jpg

Warning

JUser: :_load: Unable to load user with ID: 22029

Quickly Clear Cache with Login AM 2012 Cache Cleaner

Quickly Clear Cache with Login AM 2012 Cache Cleaner

You are probably aware that Login AM will create an entry in the tracking.cache after the application installation is finished. Even when the installation failes this entry is created. To install the application again by Login AM you will have to remove the application entry from the tracking.cache and reboot to start the install phase again. By deleting the entry, Login AM will think the application is new because it is not in the tracking.cache.

A customer of ours asked if it is possible to create a tool that removes an entry from the tracking.cache based on only the servername. This triggered me to create the following tool.

For the GUI I used a program PrimalForms. With PrimalForms it is very easy to create buttons, input fields, tabs etc. When the GUI is created in PrimalForms, use the Export Powershell button to create a powershell script. My GUI looks like this:

login am cache cleaner

Login AM Cache Cleaner

Because the GUI is just a GUI we need to create some actions for the buttons.

Analyze Button

In the code of the Analyze Button I set two variables. The first variable $path2tracking is the path to the cache file. Always use the admin share path without the servername (i.e. C$\S4\workfolder). The second variable $servername will use the servername from the input field.

 $Button_Analyze_On-Click= {
 
#variables
$path2tracking = "c$\s4\workfolder" #Fill in path to tracking.cache via adminshare
$servername = $Input_ServerName.Text #Get servername from inputfield
 #Get TrackingCache Result
$result = Get-Content \\$servername\$path2tracking\tracking.cache
    Foreach ($item in $result) {
        $Dropdown_TrackingEntry.items.Add($item)
    }
}

The result is shown in a dropdown menu.

dropdown menu

Dropdown menu

Then we have to delete the entry from the cache file. This is done by selecting an entry via de dropdown menu and to click the delete entry button.

 $Button_Delete_On-Click= 
{
#Select entry from tracking.cache, delete and save tracking.cache
 $SelectedItem = $Dropdown_trackingEntry.SelectedItem #Select dropdown item
 $SelectedItem_esc = $SelectedItem -replace "\\","\\" #Changing format
 $result -notmatch "$SelectedItem_esc" | out-file \\$servername\$path2tracking\tracking.cache #Save changed cache file
 #Clear Dropdown menu
 $Dropdown_trackingEntry.items.Clear()
 $Dropdown_trackingEntry.Text = ""
}

The Login AM 2012 Cache Cleaner is available for download at the following location.

Can this tool be used for other purposes? Yes it can, Login AM also uses a printerdrivers.cache file with the same format as the tracking.cache. Just change the path to the cache file.

I hope this tool can make your life a little bit easier when it comes to reinstalling applications with Login AM. Please let me know if this helped.

About the author

Tags: How-to, Login AM

What our customers are saying

Michael Cooper - Citrix

"We use Login VSI as a level set. If we are looking at a system that we are putting on brand new hardware or that we are putting in the cloud, we may see those environments completely differently but the end result is: is the user going to have a good solid happy user experience? And what Login VSI provides us on all three platforms is fairly consistent apples-to-apples comparison: is the user happy?"

Michael Cooper, Director of Solutions Architecture and Global Alliances at Citrix Systems


Nick Couper - Bet365

"LoginVSI is an essential tool for our company which enables us to load test our virtual desktop environment so that we can capacity plan with confidence. We would struggle to benchmark our systems without it."

Nick Couper, IT Services Delivery Manager at Bet365


Kelly Murphy - Gridstore

"Ultimately, VDI is about performance. If a customer's virtual experience is not as fast as the physical experience, they don’t use it. Login VSI is great in helping us to really quantify and to show performance, to test systems and design those systems in such a way to ensure that you can deliver that kind of performance."

Kelly Murphy, CTO and Founder at HyperGrid

Login VSI, Inc.

300 Tradecenter

Suite 3460
Woburn, MA 01801

Phone: +1 844 828 3693

Login VSI B.V.

De Entree 85
1101 BH Amsterdam
The Netherlands

Phone: +31 20 705 1200