Jump to content

Macros


Guest pcoccimi
 Share

Recommended Posts

Guest pcoccimi

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?

Link to comment
Share on other sites

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
Link to comment
Share on other sites

Guest pcoccimi

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?

Link to comment
Share on other sites

  • Developers

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 ??

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
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!
Link to comment
Share on other sites

  • Administrators

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)

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...