Case study: Client toolbox to help end-users

In this case study, the customer has created a script to aid the user in common operations like backing up documents, connecting to VPN through Checkpoint VPN, reconnecting network drives and handling proxy server settings on portable computers.

Client toolbox to help end-users

Case Study Note

Case Studies are provided to FastTrack Software by customers and are provided as-is. All case studies are unedited except from in most cases having actual company name, domain names, account names and server names replaced by fictitious names from a fictitious company named Acme. Please use our Contact Form, if you are interested in submitting an anonymous case study.

The toolbox

The user has an icon in the start menu that, when started, will look like this:
Client toolbox script



Step 1: Create the shortcut in the logon script

The script file is put into the FSHBin folder of the netlogon share, which will replicate the script to the users' local app data directory, as described in the FastTrack Logon documentation. In the logon script it is checked whether or not the user already has the icon, or has removed it. If there is no icon in the users' start menu, one will be created in the Logon Script, as shown below.
Part of file \\Acme\Netlogon\Fshbin\Prelogon.fsh

If Not FileExists [UserStartMenuDir]\Toolbox.lnk Then

  CreateShortCut [UserStartMenuDir],Toolbox,[FastTrackPath]\Toolbox.fsh

End If

Step 2: The toolbox script

The script file is now in the users' local app data directory and can be started from the users' start menu regardless of the user being offline on a portable computer or online on a desktop or portable computer on the corporate LAN.
File \\Acme\Netlogon\Fshbin\Toolbox.fsh

:Rerun

SetVar Choice,[Menu Toolbox,Network|Connect to VPN,Download|Surf the Internet,Recycle|Reconnect network drives, _

                    HardDrive|Synchronize offline files,Documents|Backup PST file(s),Shield|Backup profile data,Shield|Restore profile data, _

                    Tools|Cleanup outlook addresses,Config|Configure internal WLAN,HelpDesk HomePage,Document|About the toolbox]

If [Var Choice]= Then Exit

Goto [Var Choice]

 

:Connect to VPN

  Launch [ProgramFilesDir]\CheckPoint\SecuRemote\Bin\ConnSHApp.exe,-p Acme VPN

  DisableProxyServer

  Exit

 

:Surf the Internet

  If Alive AcmeProxy Then

    EnableProxyServer

    WriteRegistry HKEY_CURRENT_USER\software\microsoft\internet explorer\main\start page,http://intra.acme.com

    Launch http://intra.acme.com

  Else

    DisableProxyServer

    WriteRegistry HKEY_CURRENT_USER\software\microsoft\internet explorer\main\start page,http://www.google.dk

    Launch http://www.google.com

  End If

  Exit

 

:Reconnect network drives

  If Not Alive AcmeProxy Then

    ShowMessage No network connectivity

  Else

    ''==== CONNECT REGULAR SHARES ====

    SmallSplash Mapping network drives (Drive M) ...

    ConnectShare [UserHomeDrive],[UserHomeDir],Personal files

    SmallSplash Mapping network drives (Drive G) ...

    ConnectShare G:,\\Acme\Common,Shared files

    SmallSplash Mapping network drives (Drive H) ...

    ConnectShare H:,\\Acme\Dep,Corporate department files

    SmallSplash Mapping network drives (Drive Y) ...

    ConnectShare Y:,\\Acme\Resources,Common resources

 

    ''==== CONNECT DOMAIN GROUP SHARES ====

    SmallSplash Mapping network drives (Groups) ...

    Loop GroupName,[UserGroups]

      If FileExists [FastTrackPath]\GroupShares\[Var GroupName].FSH Then

        Include [FastTrackPath]\GroupShares\[Var GroupName].FSH

      End If

    End Loop

    EnableProxyServer

  End If

  Goto Rerun

 

:Synchronize offline files

  If Not Alive AcmeProxy Then

    ShowMessage No network connectivity

    Goto Rerun

  End If

  SmallSplash Doing offline sync...

  Run [WinDir]\system32\mobsync.exe

  RemoveSmallSplash

  Goto Rerun

 

:Backup PST file(s)

  If Not Alive AcmeProxy Then

    ShowMessage No network connectivity

    Goto Rerun

  End If

  If ProcessRunning Microsoft Outlook Then

    ShowMessage You cannot perform backup of your PST file(s) while Outlook is open.[Return][Return]Please close Outlook and try again.

  Else

    If Ask Do you wish to backup your PST file(s)? then

      Loop File,[Files [UserAppDataDir]\Microsoft\Outlook]

        If [Right [Var File],3]=PST Then

          CopyFile [UserAppDataDir]\Microsoft\Outlook\[Var File],[UserHomeDrive]\Backup\Outlook\[Var File]

        End If

      End Loop

      ShowMessage PST backup complete

    End If

  End If

  Goto Rerun

 

:Backup profile data

  If [UserHomeDir]= Then

    ShowMessage You do not have a valid home drive - please contact HelpDesk.

  Else

    If Ask "Do you want to backup your documents, favorites and desktop?" Then

      SyncDir [UserDocumentsDir],[UserHomeDir]\Backup\Documents

      SyncDir [UserDesktopDir],[UserHomeDir]\Backup\Desktop

      SyncDir [UserFavoritesDir],[UserHomeDir]\Backup\Favorites

      ShowMessage Document backup complete

    End If

  End If

  Goto Rerun

 

:Restore profile data

  If Not DirectoryExists [UserHomeDir]\Backup\Documents Then

    ShowMessage You do not have a backup to restore.

  Else

    If Ask "Are you sure you want to restore your documents, favorites and desktop?" Then

      If Ask "Would you like keep any new files that are not in your backup?" Then

        CopyDir [UserHomeDir]\Backup\Documents,[UserDocumentsDir]

        CopyDir [UserHomeDir]\Backup\Desktop,[UserDesktopDir]

        CopyDir [UserHomeDir]\Backup\Favorites,[UserFavoritesDir]

      Else

        SyncDir [UserHomeDir]\Backup\Documents,[UserDocumentsDir]

        SyncDir [UserHomeDir]\Backup\Desktop,[UserDesktopDir]

        SyncDir [UserHomeDir]\Backup\Favorites,[UserFavoritesDir]

      End If

      ShowMessage Document restore complete

    End If

  End If

  Goto Rerun

 

:Cleanup outlook addresses

  If ProcessRunning Microsoft Outlook Then

    ShowMessage This operation cannot be performed while Outlook is open.[Return][Return]Please close Outlook and try again.

  Else

    Loop File,[Files [UserAppDataDir]\Microsoft\Outlook]

      If [Right [Var File],3]=OAB then

        DeleteFile [UserAppDataDir]\Microsoft\Outlook\[Var File]

      End If

      IF [Right [Var File],3]=NK2 then

        DeleteFile [UserProfileDir]\Microsoft\Outlook\[Var File]

      End If

    End Loop

    ShowMessage Cached Outlook address information has been removed.

  End If

  Goto Rerun

 

:Configure internal WLAN

  If Ask Do you want to connect to the internal WLAN? Then

    SmallSplash Connecting to wireless network...

    Run [ProgramFilesDir]\Acme\zwlancfg.exe,/import:"[ProgramFilesDir]\Acme\Internet.xml"

    RemoveSmallSplash

    If NetworkPresent Then

      ShowMessage Wireless LAN connected!,Information

    Else

      ShowMessage There was a problem connecting to the wireless LAN. Please check availability and retry.

    End If

  End If

  Goto Rerun

 

:HelpDesk HomePage

  IF Alive acmeproxy Then

    Launch http://HelpDesk

  Else

    ShowMessage You must on the internal network to go to the HelpDesk homepage

  End If

  Exit

 

:About the toolbox

  Run [ProgramFilesDir]\Acme\AboutToolbox.doc

  Goto Rerun



Rating: 5 out of 5

"Use this as a replacement for VBScript and PowerShell"

"It's easy to include attractive GUI elements in FastTrack scripts, beyond the basic dialog boxes and text input that VBScript offers ... Another powerful feature is the ability to distribute scripts as Windows Installer (.msi) or standard .exe files. Although interesting in its own right, this ability results in a much more intriguing capability: to repackage -- or wrap -- software installers as .msi files without using snapshots. If you've ever created an .msi installer file from before-and-after system snapshots, for use with a software distribution system such as Group Policy or SCCM, then you know how hit-and-miss the results can be."

Read full review


Rating: 8 out of 10

"Faster than the rest"

"We found the FastTrack syntax to be more transparent and easier to learn than Microsoft's PowerShell – the editor in particular provided good support in this regard. the Script Editor offers a large number of options from the command set through to simple output of graphical elements, which cannot be achieved at all with PowerShell or other solutions or only with a significantly greater level of effort."

"Anyone wanting to tackle the many hurdles in everyday admin and especially anyone for whom logon scripts and client automation is a priority will benefit from the variety of functions offered by FastTrack."

Review in English      Review in German