William Larkin
asked on
copying files to workstation(s) public folders
Hi.. I know.. this is probably VERY basic stuff.. not sure why I'm having such a hard time with this. I have created a folder on our server that is accessible to everyone. My task is to copy the entire contents of this folder and to put them on the public desktop of workstations. (sound easy right.. but I'm having trouble). The files that I'm trying to copy are customized shortcuts. Thanks for any help! - Bill (btw.. I'm not familiar with powershell or scripting.. I've been trying to do this using batch files (command line stuff).. I wouldn't be opposed to powershell, but would need help every step of the way.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
William,
Did you try my solution ID: 40885335? It works fine for me.
Did you try my solution ID: 40885335? It works fine for me.
ASKER
Thanks Again.. I will give this a try.
If you put the copy command in the same script as the net use commands that won't work; Net use commands should run in the user context, as a network mapping is user-specific. The copy command however requires write rights in the C:\Users\Public folder, which the users does not have.
Therefore you should run the Net Use commands in a login script (which runs in the user context) and the copy command in a System startup script (which runs in the system context).
Therefore you should run the Net Use commands in a login script (which runs in the user context) and the copy command in a System startup script (which runs in the system context).
ASKER
Thanks for ALL help.. I was able to take this information and use parts of all comments to finally get a "workable" solution.. I Really need to learn scripting! - Bill
ASKER
net use G: \\ServerName\ShortcutFolde
G:
copy *.* C:\Users\Public\Desktop
net use G: /delete
and I place this file on a network share so I can type in (the run line) \\ServerName\Share\copy and it doesn't work properly.. I have tried many things.. so I've made two separate batch files that do the job, but I just thought that I could get this to work.. What's happening is that after I execute the copy.bat file it does setup the mapped drive, but that's it.. I have been able to get around this, but then I get access denied messages..
Sorry for the rambling on, but it seems like such a simple thing.. I'm pulling from Way back in my DOS days.. but can't seem to solve this.. I do not know enough about scripting or powershell, but that maybe the way to proceed. Thanks again for your comments