Copy File  
Author Message
samara





PostPosted: Thu Jan 26 20:15:59 CST 2006 Top

VB Scripts >> Copy File

Hello, I am trying to use the following script to copy out files needed to
customize Citrix Neighborhood. Problem is users only have read/execute
permissions on the C:\program files\citrix client folder. I tried dropping
this script into GPO but it fails because of this. Any thoughts how I can
get this script to work copying the files under an admin context? Thanks.

Ben

Dim fso
set fso = CreateObject("Scripting.FileSystemObject")
fso.CopyFile "\\server\share\pn.ini", "c:\Program Files\Citrix\ICA Client\"
& "pn.ini"
fso.CopyFile "\\server\share\APPSRV.ini", "c:\Program Files\Citrix\ICA
Client\" & "APPSRV.ini"
set fso = nothing

Set FS = CreateObject("Scripting.FileSystemObject")
Set DocsFolder = FS.GetFolder("c:\Documents and Settings\")
Set Folderset = DocsFolder.Subfolders
For Each SubFolder In Folderset
On Error Resume Next
Set UserFolder = FS.GetFolder(SubFolder&"\Application Data\ICAClient\")
FS.MoveFile UserFolder & "\pn.ini" , UserFolder & "\pn1.ini"
FS.MoveFile UserFolder & "\appsrv.ini" , UserFolder & "\appsrv1.ini"

Next

Visual Studio307  
 
 
Ben





PostPosted: Thu Jan 26 20:15:59 CST 2006 Top

VB Scripts >> Copy File Disregard this. I put the script in the users startup instead of the
computer startup in GPO. Now it works.

Ben



> Hello, I am trying to use the following script to copy out files needed to
> customize Citrix Neighborhood. Problem is users only have read/execute
> permissions on the C:\program files\citrix client folder. I tried
> dropping this script into GPO but it fails because of this. Any thoughts
> how I can get this script to work copying the files under an admin
> context? Thanks.
>
> Ben
>
> Dim fso
> set fso = CreateObject("Scripting.FileSystemObject")
> fso.CopyFile "\\server\share\pn.ini", "c:\Program Files\Citrix\ICA
> Client\" & "pn.ini"
> fso.CopyFile "\\server\share\APPSRV.ini", "c:\Program Files\Citrix\ICA
> Client\" & "APPSRV.ini"
> set fso = nothing
>
> Set FS = CreateObject("Scripting.FileSystemObject")
> Set DocsFolder = FS.GetFolder("c:\Documents and Settings\")
> Set Folderset = DocsFolder.Subfolders
> For Each SubFolder In Folderset
> On Error Resume Next
> Set UserFolder = FS.GetFolder(SubFolder&"\Application Data\ICAClient\")
> FS.MoveFile UserFolder & "\pn.ini" , UserFolder & "\pn1.ini"
> FS.MoveFile UserFolder & "\appsrv.ini" , UserFolder & "\appsrv1.ini"
>
> Next
>