Sign in to follow this  
Followers 0
johnyV

File Copying

7 posts in this topic

Hi there,

I'm trying to use the Filecopy command in Windows 7. The script runs well in W-XP, but not in W-7.

Here it is:

FileCopy("\\.....\....\...\Font\CGTR45W.TTF", "C:\Windows\Fonts")

When I copy and paste the file in manually its actually an install. Should I be using fileinstall?

Either way, its not working.

Thanks for your help.

Share this post


Link to post
Share on other sites

Being as it is windows 7 and windows folder, you may need to use admin rights to copy the file to that location.

#requireadmin

or search admin in the help file.


010101000110100001101001011100110010000001101001011100110010000

001101101011110010010000001110011011010010110011100100001

My Android cat and mouse game
https://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek

We're gonna need another Timmy!

Share this post


Link to post
Share on other sites

So it does copy the files but I still need to install them. unfortunetly "fileinstall" is not working .

FileInstall("\\$computername$\c$\Windows\Fonts\CGTR45W.TTF", "C:\Windows\Fonts\CGTR45W.TTF", 0)

what am I missing here?

help.

Thanks,

Share this post


Link to post
Share on other sites

OK so I want to use the FileInstall function but I'm not sure how it works.

I have a *.TTF file and I want to put it in C:\windows\fonts, but in order for it to work I also need it to install.

For this I would imagine the FileInstall command would be appropriate.

I'm not sure how it works though. I put the *.TTF in C:\ directory (for a test).

My command looks like this,

FileInstall("C:\*.TTF", "C:\Windows\Fonts\*.TTF", 0)

I have no idea if this is right or not, I don't exactly understand how the "source & dest" path work, and if I put them in the right order in the command.

anyways all this to say, its not working. (running W-7)

Thanks,

Share this post


Link to post
Share on other sites

please help, :mellow:

Share this post


Link to post
Share on other sites

Fileinstall includes the file into your script when you compile it as an exe, then when the script is run, extracts the file from the exe to the location you chose.

I'm not sure if there is a command line you can run to install a font or not.


010101000110100001101001011100110010000001101001011100110010000

001101101011110010010000001110011011010010110011100100001

My Android cat and mouse game
https://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek

We're gonna need another Timmy!

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

So it does copy the files but I still need to install them. unfortunetly "fileinstall" is not working .

FileInstall("\\$computername$\c$\Windows\Fonts\CGTR45W.TTF", "C:\Windows\Fonts\CGTR45W.TTF", 0)

what am I missing here?

help.

Thanks,

You must read the help! You cannot use variables for the source path. Then I expect you need to run the script with admin privledges to write to the windows folder.

Edited by martin

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

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