kuldeep Posted October 11, 2012 Posted October 11, 2012 Hi, I am new to autoit and programming also. I am developing an application using autoit in which user will click a button and file will get copied from remote machine to his machine. I can copy a file locally using FileCopy but i don't know how to copy a file from remote machine. I tried to copy file by providing path of remote machine FileCopy(\\10.70.160.85\C$\temp.txt, "C:\dir\") but it is not working.So can anyone help me how can i copy file from remote machine and how can i provide user credential who has rights to access that path.
Juvigy Posted October 15, 2012 Posted October 15, 2012 Does it work when you manually do it ? (open 10.70.160.85C$ and copy/paste) ?
Tjalve Posted October 15, 2012 Posted October 15, 2012 I think this is a windows security issue. If you want to use the c$ share on a machine, you need admin priviliges unless you have manually added the user in question. My suggestion would be to share a specific folder (Like C:Myshare) and give the users the access they need to that folder. And then use: filecopy("10..70.160.85Mysharetemp.txt","C:dir")
kuldeep Posted October 18, 2012 Author Posted October 18, 2012 Hi, Thanks for help...I have got the solution. I have used Runas command as belowRunAsWait("userid","domain","Password", 0, @ComSpec & ' /c ' & 'copy "\\10.70.160.85\C$\temp.txt, "C:\dir\"', "", @SW_HIDE)It is working fine
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now