SoftGrid -related scripts

Scripts currently available:

  • SoftGridPreloadApps - script for preloading applications 100% to cache
  • SoftGridProfileJanitor - script for maintaining user-specific SoftGrid Client cache


    SoftGridPreloadApps

    Summary

    Application pre-loading script that can be run on client machine in order to have all application packages for the user 100% cached.

    This script will run through the list of application available to user and issue Load command against those ones currently not 100% cached. It will also take in the account that multiple applications/shortcuts might exists for one SoftGrid package so that load is not initiated more than once per package. This is done by reading through cached OSDs and identifying unique packages by GUID in <CODEBASE> element.

    Additional parameters can be "switched on" inside script to prevent unwanted load commands when operating without connection to SoftGrid Server as each failed load-attempt will display error indicator on-screen 30 seconds (by default) per failed load.

    If script is not able to open cached OSD, this will usually indicate NTFS ACLs set inappropriately and as such error is logged by script if silent-mode is not in effect.

    Requirements

  • Visual Basic scripting support enabled

    Download

  • SoftGridPreloadApps 1.3 - As VBS file (might be blocked by more aggressive content-filtering firewalls)
  • SoftGridPreloadApps 1.3 - As ZIP package
    (revision history)

    Usage

    You can execute script using either cscript.exe (runs in console-window) or wscript.exe (does not show console) by issuing command:

    cscript.exe //nologo ..path_to..\SoftGridPreloadApps.vbs
    wscript.exe //nologo ..path_to..\SoftGridPreloadApps.vbs
    This command can then be included in logon-scripts, Run-key in registry etc. to have it run when user logs on. Inside script, you can change following variables to affect script operation:

    Silent = True (default) to run everything silently or False to output status and error messages. Non-silent mode might not be wanted behaviour when running with wscript.exe as it will prompt dialog boxes to user for each and every message.

    CheckOfflineState = True (default) to detect if explicit offline-mode has been switched on (only applicable in 4.x series clients) and skip loading if so. Change to "False" to disable checking on 3.x clients.

    CheckAvailability = True to check availability of specified SoftGrid Server (see SoftGridServerAddress) when starting up or False (default) to disable this extra check. In simpler environments, where all applications are streamed from the same VAS address (be it virtual-IP/name or not) this can globally block script running any further (causing failed loads) if VAS server is detected to not answer to network.

    SoftGridServerAddress = Address (IP-address or network name) of your SoftGrid VAS, which will be used to check availability against to. This parameter has no effect if CheckAvailability is set to "False".

    CheckPerAppAvailability = True to check VAS availability per application to be loaded, using server address from HREF -attribute inside OSD, or False (default) to skip per application VAS availability check. This functionality can be used if multiple VAS servers are used to stream-in content to clients and addresses might vary inside OSDs, preventing effective one-off check at beginning.

    CheckTimeoutMs = Timeout in milliseconds that is used when determining if server answers from the network. This parameters is only used if either global (CheckAvailability) or per-application (CheckPerAppAvailability) check is in effect. Does not affect name-resolution timeouts.

    SoftGridProfileJanitor

    Summary

    Cleanup/maintenance script to be run under user's context in order to clear out leftover files from SoftGrid data directory.

    This script will examine which cached ICO (icon) files are currently referenced by active applications and associated FTAs (file types) and/or whether there is any leftover .bat files (in form of swxxxx.bat, created by SoftGrid Client but sometimes not properly deleted after use) from OSD SCRIPTBODY -scripting. If "orphaned" files are found, they will be removed to save space on user's profile directory which is the default location where SoftGrid Client will cache user-specific data. For orphaned .bat files, age threshold can be adjusted to prevent script from deleting any .bat -files currently active by SoftGrid Client.

    Alternatively script can be run in Report Only -mode, which will display (provided that output is enabled) those files that are considered to be removable by the script but not actually remove them.

    Script will, by default and for safety reasons, run in Report Only -mode so be sure to change it to fully operational before actually deploying!

    Requirements

  • Visual Basic scripting support enabled

    Download

  • SoftGridProfileJanitor 1.0 - As VBS file (might be blocked by more aggressive content-filtering firewalls)
  • SoftGridProfileJanitor 1.0 - As ZIP package
    (revision history)

    Usage

    You can execute script using either cscript.exe (runs in console-window) or wscript.exe (does not show console) by issuing command:

    cscript.exe //nologo ..path_to..\SoftGridProfileJanitor.vbs
    wscript.exe //nologo ..path_to..\SoftGridProfileJanitor.vbs
    This command can then be included in logon-scripts, Run-key in registry etc. to have it run when user logs on; important thing is to make sure script is really run in user's context rather than in machine-context. Inside script, you can change following variables to affect script operation:

    Silent = True (default) to run everything silently or False to output status and error messages. Non-silent mode might not be wanted behaviour when running with wscript.exe as it will prompt dialog boxes to user for each and every message, but if script is run for reporting purposes silent -mode needs to be switched off.

    ReportOnly = True (default) to only report on files that script consider eligible for removal. If you want script to actually do cleanup, change to False.

    SearchOrphanICOs = If set to True (default) will perform search and cleanup (mode of operation dependent on ReportOnly parameter) of orphaned ICO files for applications and FTAs no longer available to user. Change to False to skip search for ICOs.

    SearchLeftoverScripts = If set to True (default) will perform search and cleanup (mode of operation dependent on ReportOnly parameter) of leftover OSD scripting scripts. Change to False to skip search for swxxxx.bat files.

    AgeThreshold = File [creation] age in minutes (5 by default) that much be exceeded by leftover script before it's removed. This parameter is used as failsafe -limit which will prevent script from deleting OSD scripts currently running if. If long-running SCRIPTBODY -scripts are used in OSDs, consider increasing threshold.

    © 2007 Kalle Saunamäki (kalle.saunamaki@cdgeurope.fi); all comments, suggestions and feedback in general is greatly appreciated.

    Back