Sign in to follow this  
Followers 0
Guest pcoccimi

Macros

7 posts in this topic

I have the following line in a script:

FileCopy ("C:\Program Files\Citrix\ICA Client\pn.ini", @AppDataDir & "\ICAClient\pn.ini", 1)

However, the file does not get copied. Is there something wrong with the syntax I used?

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Are you sure that the destination directory exists?

You could check using FileExists and use DirCreate if it doesn't.

In your post there isn't a space between ICA and Client in the destination, but there is in the source. Is a typo causing you to refer to the wrong directory?

Edited by etn

Share this post


Link to post
Share on other sites

Yes, the destination directory exists.

The paths are correct. For some reason, the Citrix install creates the ICAClient folder underneath the user's profile application data folder.

Does the syntax look correct?

Share this post


Link to post
Share on other sites

in your source directory there is a SPACE between ICA and CLIENT but in your target there is none.... is that the way it should be ??


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Syntax looks fine as far as I can tell.

Share this post


Link to post
Share on other sites

You could try using the 'copy' DOS/Console command. Not tested, but I think I got the syntax correct:

$orginalWorkDir = @WorkingDir
FileChangeDir(@AppDataDir & "\ICAClient")
_RunCmd('copy "C:\Program Files\Citrix\ICA Client\pn.ini" "pn.ini")
FileChangeDir($originalWorkDir)

Func _RunCmd( $x )
  Return RunWait( @ComSpec & " /C " & $x , "", @SW_HIDE )
EndFunc

Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!

Share this post


Link to post
Share on other sites

I actually have the Citrix client installed and ran the script at the start of this thread and it worked fine (Windows XP).

Make sure that @AppDataDir is correct for you

MsgBox(0, "", @AppDataDir)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0