'========================================================================== ' ' NAME: Script written to copy file necessary to get twain redirection ' working on a Citrix published application ' ' AUTHOR: CitrixTools ' ' COMMENT: ' '========================================================================== Option Explicit 'Global variable declarations Dim oWSH Dim oWshShell Dim oFSO,sCommand Dim sUserHDrive,sUserHomePath Dim oUserProfilePath Dim osystemroot Const OverwriteExisting = True Set oWSH = CreateObject("WScript.Shell") Set oFSO = CreateObject("Scripting.FileSystemObject") Set oUserProfilePath = oWSH.Environment("Process") osystemroot = oWSH.ExpandEnvironmentStrings("%Systemroot%") sUserHDrive = oUserProfilePath("HOMEDRIVE") sUserHomePath = oUserProfilePath("HOMEPATH") ' Copy file(s) necessary oFSO.CopyFile osystemroot & "\TWAIN_32.dll",sUserHDrive & sUserHomePath & "\windows\",OverwriteExisting ' Launch Application oWSH.exec("m:\applicationpath\appexecutible.exe")