# Copying files to Vista Program Files in ruby script

**URL:** <https://www.ruby-forum.com/t/copying-files-to-vista-program-files-in-ruby-script/115836>\
**Category:** Ruby\
**Created:** [September 28, 2007, 11:21pm UTC](https://www.ruby-forum.com/t/copying-files-to-vista-program-files-in-ruby-script/115836 "2007-09-28T23:21:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![shawniemc](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/8baadc/32.png) [@shawniemc](https://www.ruby-forum.com/u/shawniemc)\
**Post date:** [September 28, 2007, 11:21pm UTC](https://www.ruby-forum.com/t/copying-files-to-vista-program-files-in-ruby-script/115836/1 "2007-09-28T23:21:24Z")

</div>

Newbie working on a helper script for app testers (who are using various  
OS’s) copying down files from network servers. All is going well until  
hitting this wall with Vista. I am not able to copy down a file from a  
file server to an app folder in Program Files, script runs without  
failure, just no file copied once done.

It seems that this is due to the Vista uac stuff as I am able to copy  
the file when redirecting the script to the Desktop. And just to be  
clear, I am using fileutils for the file copy and XP works without a  
hitch.

i.e. If the end user woud recieve the ‘Destination Folder Access Denied’  
prompt (with the Continue Skip and Cancel buttons) when copying the file  
to a location, the Ruby script will not copy the file. I do need to  
write this so it will work with Vista in its default setup.

I know there must be a way to work around this, I just can’t find it.

Thanks for any help you can provide.
